summaryrefslogtreecommitdiffstats
path: root/src/settingsediting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settingsediting.cpp')
-rw-r--r--src/settingsediting.cpp142
1 files changed, 71 insertions, 71 deletions
diff --git a/src/settingsediting.cpp b/src/settingsediting.cpp
index e5c71fc..22f1868 100644
--- a/src/settingsediting.cpp
+++ b/src/settingsediting.cpp
@@ -17,17 +17,17 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qheader.h>
-#include <qcombobox.h>
-#include <qslider.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqdir.h>
+#include <ntqheader.h>
+#include <ntqcombobox.h>
+#include <ntqslider.h>
+#include <ntqtooltip.h>
+#include <ntqwhatsthis.h>
+#include <ntqgroupbox.h>
+#include <ntqpushbutton.h>
+#include <ntqcheckbox.h>
#include <kpushbutton.h>
#include <kdirselectdialog.h>
@@ -45,29 +45,29 @@
namespace KBibTeX
{
- const QChar SettingsEditing::pathListSeparator = QChar( ';' );
+ const TQChar SettingsEditing::pathListSeparator = TQChar( ';' );
- SettingsEditingPaths::SettingsEditingPaths( QStringList& pathList, QWidget*parent, const char *name )
- : QWidget( parent, name ), m_pathList( pathList )
+ SettingsEditingPaths::SettingsEditingPaths( TQStringList& pathList, TQWidget*parent, const char *name )
+ : TQWidget( parent, name ), m_pathList( pathList )
{
- QGridLayout *layout = new QGridLayout( this, 5, 3, 0, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 5, 3, 0, KDialog::spacingHint() );
setMinimumWidth( 480 );
- QLabel *label = new QLabel( i18n( "Path to add:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Path to add:" ), this );
layout->addWidget( label, 0, 0 );
m_urlRequesterNewPath = new KURLRequester( this );
m_urlRequesterNewPath->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
- m_urlRequesterNewPath->completionObject()->setDir( QDir::currentDirPath() );
+ m_urlRequesterNewPath->completionObject()->setDir( TQDir::currentDirPath() );
label->setBuddy( m_urlRequesterNewPath );
layout->addWidget( m_urlRequesterNewPath, 1, 0 );
- QToolTip::add( m_urlRequesterNewPath->button(), i18n( "Select a path to add" ) );
+ TQToolTip::add( m_urlRequesterNewPath->button(), i18n( "Select a path to add" ) );
m_pushButtonAddDir = new KPushButton( i18n( "Add" ), this );
- m_pushButtonAddDir->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ m_pushButtonAddDir->setIconSet( TQIconSet( SmallIcon( "add" ) ) );
m_pushButtonAddDir->setEnabled( FALSE );
- QToolTip::add( m_pushButtonAddDir, i18n( "Add chosen path to list" ) );
+ TQToolTip::add( m_pushButtonAddDir, i18n( "Add chosen path to list" ) );
layout->addWidget( m_pushButtonAddDir, 1, 2 );
- label = new QLabel( i18n( "List of paths:" ), this );
+ label = new TQLabel( i18n( "List of paths:" ), this );
layout->addWidget( label, 2, 0 );
m_listViewPathList = new KListView( this );
m_listViewPathList->addColumn( i18n( "Path" ) );
@@ -78,23 +78,23 @@ namespace KBibTeX
m_pushButtonDelDir = new KPushButton( i18n( "Delete" ), this );
layout->addWidget( m_pushButtonDelDir, 3, 2 );
m_pushButtonDelDir->setEnabled( FALSE );
- m_pushButtonDelDir->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
- QToolTip::add( m_pushButtonDelDir, i18n( "Remove selected path from list" ) );
+ m_pushButtonDelDir->setIconSet( TQIconSet( SmallIcon( "editdelete" ) ) );
+ TQToolTip::add( m_pushButtonDelDir, i18n( "Remove selected path from list" ) );
layout->setRowStretch( 4, 1 );
layout->setColStretch( 0, 1 );
- connect( m_urlRequesterNewPath, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
- connect( m_urlRequesterNewPath, SIGNAL( urlSelected( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ connect( m_urlRequesterNewPath, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotTextChanged( const TQString& ) ) );
+ connect( m_urlRequesterNewPath, SIGNAL( urlSelected( const TQString& ) ), this, SLOT( slotTextChanged( const TQString& ) ) );
connect( m_pushButtonAddDir, SIGNAL( clicked() ), this, SLOT( slotAddDir() ) );
connect( m_listViewPathList, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
connect( m_pushButtonDelDir, SIGNAL( clicked() ), this, SLOT( slotDelDir() ) );
- for ( QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it )
- new QListViewItem( m_listViewPathList, *it );
+ for ( TQStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it )
+ new TQListViewItem( m_listViewPathList, *it );
}
- bool SettingsEditingPaths::execute( QWidget *parent, QStringList &pathList )
+ bool SettingsEditingPaths::execute( TQWidget *parent, TQStringList &pathList )
{
KDialogBase *dlg = new KDialogBase( parent, "SettingsEditingPathsDialog", true, i18n( "Edit Document Search Paths" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, false );
SettingsEditingPaths *sep = new SettingsEditingPaths( pathList, dlg, "SettingsEditingPaths" );
@@ -102,7 +102,7 @@ namespace KBibTeX
connect( dlg, SIGNAL( apply() ), sep, SLOT( slotApply() ) );
connect( dlg, SIGNAL( okClicked() ), sep, SLOT( slotApply() ) );
- bool result = dlg->exec() == QDialog::Accepted;
+ bool result = dlg->exec() == TQDialog::Accepted;
delete dlg;
return result;
@@ -111,7 +111,7 @@ namespace KBibTeX
void SettingsEditingPaths::slotApply()
{
m_pathList.clear();
- QListViewItem *item = m_listViewPathList->firstChild();
+ TQListViewItem *item = m_listViewPathList->firstChild();
while ( item != NULL )
{
m_pathList.append( item->text( 0 ) );
@@ -119,25 +119,25 @@ namespace KBibTeX
}
}
- void SettingsEditingPaths::slotTextChanged( const QString&text )
+ void SettingsEditingPaths::slotTextChanged( const TQString&text )
{
- QDir pathObj( text );
+ TQDir pathObj( text );
m_pushButtonAddDir->setEnabled( pathObj.exists() && pathObj.isReadable() );
}
void SettingsEditingPaths::slotAddDir()
{
- QString path = m_urlRequesterNewPath->lineEdit()->text();
- QDir pathObj( path );
+ TQString path = m_urlRequesterNewPath->lineEdit()->text();
+ TQDir pathObj( path );
if ( pathObj.exists() && pathObj.isReadable() )
{
- QListViewItem *item = new KListViewItem( m_listViewPathList, path );
+ TQListViewItem *item = new KListViewItem( m_listViewPathList, path );
m_listViewPathList->ensureItemVisible( item );
m_listViewPathList->setSelected( item, TRUE );
slotSelectionChanged();
}
else
- KMessageBox::error( this, QString( i18n( "Folder '%1' does not exist or is not readable." ) ).arg( path ) );
+ KMessageBox::error( this, TQString( i18n( "Folder '%1' does not exist or is not readable." ) ).arg( path ) );
}
void SettingsEditingPaths::slotSelectionChanged()
@@ -151,81 +151,81 @@ namespace KBibTeX
slotSelectionChanged();
}
- SettingsEditing::SettingsEditing( QWidget *parent, const char *name )
- : QWidget( parent, name ), m_findDuplicatesSensitivityMin( 3 ), m_findDuplicatesSensitivityMax( 13 )
+ SettingsEditing::SettingsEditing( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), m_findDuplicatesSensitivityMin( 3 ), m_findDuplicatesSensitivityMax( 13 )
{
- QGroupBox * group = NULL;
- QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQGroupBox * group = NULL;
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- group = new QGroupBox( 2, Qt::Horizontal, i18n( "Main List" ), this );
+ group = new TQGroupBox( 2, TQt::Horizontal, i18n( "Main List" ), this );
layout->addWidget( group );
- QLabel *label = new QLabel( i18n( "&Sorting:" ), group );
- m_comboBoxSortingColumn = new QComboBox( FALSE, group );
+ TQLabel *label = new TQLabel( i18n( "&Sorting:" ), group );
+ m_comboBoxSortingColumn = new TQComboBox( FALSE, group );
m_comboBoxSortingColumn->insertItem( i18n( "Element Type" ) );
m_comboBoxSortingColumn->insertItem( i18n( "Entry Id" ) );
for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ )
{
BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i + ( int ) BibTeX::EntryField::ftAbstract );
- QString label = Settings::fieldTypeToI18NString( fieldType );
+ TQString label = Settings::fieldTypeToI18NString( fieldType );
m_comboBoxSortingColumn->insertItem( label );
}
label->setBuddy( m_comboBoxSortingColumn );
- label = new QLabel( i18n( "So&rting order:" ), group );
- m_comboBoxSortingOrder = new QComboBox( FALSE, group );
+ label = new TQLabel( i18n( "So&rting order:" ), group );
+ m_comboBoxSortingOrder = new TQComboBox( FALSE, group );
m_comboBoxSortingOrder->insertItem( i18n( "Ascending" ) );
m_comboBoxSortingOrder->insertItem( i18n( "Descending" ) );
label->setBuddy( m_comboBoxSortingOrder );
- label = new QLabel( i18n( "&Double click action:" ), group );
- m_comboBoxDoubleClickAction = new QComboBox( FALSE, group );
+ label = new TQLabel( i18n( "&Double click action:" ), group );
+ m_comboBoxDoubleClickAction = new TQComboBox( FALSE, group );
m_comboBoxDoubleClickAction->insertItem( i18n( "Edit element" ) );
m_comboBoxDoubleClickAction->insertItem( i18n( "Open document" ) );
label->setBuddy( m_comboBoxDoubleClickAction );
- label = new QLabel( i18n( "On dragging with mouse:" ), group );
- m_comboBoxDragAction = new QComboBox( FALSE, group );
+ label = new TQLabel( i18n( "On dragging with mouse:" ), group );
+ m_comboBoxDragAction = new TQComboBox( FALSE, group );
m_comboBoxDragAction->insertItem( i18n( "Copy reference (\\cite{...})" ) );
m_comboBoxDragAction->insertItem( i18n( "Copy BibTeX text (@article{...})" ) );
label->setBuddy( m_comboBoxDragAction );
- group = new QGroupBox( 1, Qt::Vertical, i18n( "Entry Editing" ), this );
+ group = new TQGroupBox( 1, TQt::Vertical, i18n( "Entry Editing" ), this );
layout->addWidget( group );
- m_checkBoxEnableAllFields = new QCheckBox( i18n( "Enable all &fields for editing" ), group );
+ m_checkBoxEnableAllFields = new TQCheckBox( i18n( "Enable all &fields for editing" ), group );
- group = new QGroupBox( 1, Qt::Vertical, i18n( "Search Bar" ), this );
+ group = new TQGroupBox( 1, TQt::Vertical, i18n( "Search Bar" ), this );
layout->addWidget( group );
- m_checkBoxSearchBarClearField = new QCheckBox( i18n( "Reset field filter when changing filter text" ), group );
+ m_checkBoxSearchBarClearField = new TQCheckBox( i18n( "Reset field filter when changing filter text" ), group );
- group = new QGroupBox( 2, Qt::Horizontal, i18n( "Presentation" ), this );
+ group = new TQGroupBox( 2, TQt::Horizontal, i18n( "Presentation" ), this );
layout->addWidget( group );
- m_checkBoxUseSpecialFont = new QCheckBox( i18n( "Use special &font" ), group );
- m_pushButtonSpecialFont = new QPushButton( group );
- label = new QLabel( i18n( "Author and editor names:" ), group );
- m_comboBoxNameOrder = new QComboBox( group );
+ m_checkBoxUseSpecialFont = new TQCheckBox( i18n( "Use special &font" ), group );
+ m_pushButtonSpecialFont = new TQPushButton( group );
+ label = new TQLabel( i18n( "Author and editor names:" ), group );
+ m_comboBoxNameOrder = new TQComboBox( group );
label->setBuddy( m_comboBoxNameOrder );
m_comboBoxNameOrder->insertItem( i18n( "John Doe" ) );
m_comboBoxNameOrder->insertItem( i18n( "Doe, John" ) );
- QToolTip::add( m_comboBoxNameOrder, i18n( "Show names as 'John Doe' instead of 'Doe, John'" ) );
- QWhatsThis::add( m_comboBoxNameOrder, i18n( "Show names as 'John Doe' instead of 'Doe, John'.\n\nTakes only effect after the next start of KBibTeX." ) );
+ TQToolTip::add( m_comboBoxNameOrder, i18n( "Show names as 'John Doe' instead of 'Doe, John'" ) );
+ TQWhatsThis::add( m_comboBoxNameOrder, i18n( "Show names as 'John Doe' instead of 'Doe, John'.\n\nTakes only effect after the next start of KBibTeX." ) );
- group = new QGroupBox( 1, Qt::Vertical, i18n( "Document Search Paths" ), this );
+ group = new TQGroupBox( 1, TQt::Vertical, i18n( "Document Search Paths" ), this );
layout->addWidget( group );
KPushButton *btnSelectDocumentSearchPath = new KPushButton( SmallIcon( "fileopen" ), i18n( "Edit Search Paths" ), group );
- group = new QGroupBox( 1, Qt::Vertical, i18n( "Find Duplicates" ), this );
+ group = new TQGroupBox( 1, TQt::Vertical, i18n( "Find Duplicates" ), this );
layout->addWidget( group );
- label = new QLabel( i18n( "Sensitivity:" ), group );
- QWidget *spacer = new QWidget( group );
+ label = new TQLabel( i18n( "Sensitivity:" ), group );
+ TQWidget *spacer = new TQWidget( group );
spacer->setFixedSize( KDialog::spacingHint() * 3, KDialog::spacingHint() );
- QLabel *label2 = new QLabel( i18n( "Low" ), group );
- m_sliderBarFindDuplicatesSensitivity = new QSlider( Qt::Horizontal, group );
+ TQLabel *label2 = new TQLabel( i18n( "Low" ), group );
+ m_sliderBarFindDuplicatesSensitivity = new TQSlider( TQt::Horizontal, group );
m_sliderBarFindDuplicatesSensitivity->setMinValue( m_findDuplicatesSensitivityMin );
m_sliderBarFindDuplicatesSensitivity->setMaxValue( m_findDuplicatesSensitivityMax );
m_sliderBarFindDuplicatesSensitivity->setLineStep( 1 );
m_sliderBarFindDuplicatesSensitivity->setPageStep( 5 );
label->setBuddy( m_sliderBarFindDuplicatesSensitivity );
- label2 = new QLabel( i18n( "High" ), group );
+ label2 = new TQLabel( i18n( "High" ), group );
layout->addStretch();
@@ -264,7 +264,7 @@ namespace KBibTeX
settings->editing_FirstNameFirst = m_comboBoxNameOrder->currentItem() == 0;
settings->editing_DocumentSearchPaths.clear();
- for ( QStringList::Iterator it = m_documentSearchPaths.begin(); it != m_documentSearchPaths.end(); ++it )
+ for ( TQStringList::Iterator it = m_documentSearchPaths.begin(); it != m_documentSearchPaths.end(); ++it )
settings->editing_DocumentSearchPaths.append( *it );
settings->editing_findDuplicatesSensitivity = ( m_findDuplicatesSensitivityMin + m_findDuplicatesSensitivityMax ) - m_sliderBarFindDuplicatesSensitivity->value();
@@ -289,7 +289,7 @@ namespace KBibTeX
m_comboBoxNameOrder->setCurrentItem( settings->editing_FirstNameFirst ? 0 : 1 );
m_documentSearchPaths.clear();
- for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it )
+ for ( TQStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it )
m_documentSearchPaths.append( *it );
m_sliderBarFindDuplicatesSensitivity->setValue(( m_findDuplicatesSensitivityMin + m_findDuplicatesSensitivityMax ) - settings->editing_findDuplicatesSensitivity );
@@ -322,7 +322,7 @@ namespace KBibTeX
m_pushButtonSpecialFont->setFont( m_specialFont );
}
- bool SettingsEditing::editPathList( QStringList &pathList )
+ bool SettingsEditing::editPathList( TQStringList &pathList )
{
return SettingsEditingPaths::execute( this, pathList );
}