diff options
Diffstat (limited to 'src/settingskeyword.cpp')
-rw-r--r-- | src/settingskeyword.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/settingskeyword.cpp b/src/settingskeyword.cpp index 6667e01..3e446d6 100644 --- a/src/settingskeyword.cpp +++ b/src/settingskeyword.cpp @@ -17,11 +17,11 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include <qlayout.h> -#include <qpushbutton.h> -#include <qheader.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <ntqlayout.h> +#include <ntqpushbutton.h> +#include <ntqheader.h> +#include <ntqtimer.h> +#include <ntqtooltip.h> #include <klistview.h> #include <kdialog.h> @@ -39,7 +39,7 @@ namespace KBibTeX { - SettingsKeyword::SettingsKeyword( QWidget *parent, const char *name ) : QWidget( parent, name ), m_keywords( NULL ) + SettingsKeyword::SettingsKeyword( TQWidget *parent, const char *name ) : TQWidget( parent, name ), m_keywords( NULL ) { setupGUI(); } @@ -53,7 +53,7 @@ namespace KBibTeX { Settings * settings = Settings::self(); settings->keyword_GlobalList.clear(); - for ( QListViewItemIterator it = QListViewItemIterator( m_listKeywords ); it.current() != NULL; ++it ) + for ( TQListViewItemIterator it = TQListViewItemIterator( m_listKeywords ); it.current() != NULL; ++it ) settings->keyword_GlobalList.append( it.current() ->text( 0 ) ); settings->keyword_GlobalList.sort(); } @@ -62,7 +62,7 @@ namespace KBibTeX { Settings * settings = Settings::self(); m_listKeywords->clear(); - for ( QStringList::Iterator it = settings->keyword_GlobalList.begin(); it != settings->keyword_GlobalList.end(); ++it ) + for ( TQStringList::Iterator it = settings->keyword_GlobalList.begin(); it != settings->keyword_GlobalList.end(); ++it ) { KListViewItem *item = new KListViewItem( m_listKeywords, *it ); item->setPixmap( 0, SmallIcon( "package" ) ); @@ -84,7 +84,7 @@ namespace KBibTeX item->setPixmap( 0, SmallIcon( "package" ) ); m_listKeywords->setSelected( item, TRUE ); m_listKeywords->ensureItemVisible( item ); - QTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) ); + TQTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) ); } void SettingsKeyword::slotEditKeyword() @@ -111,9 +111,9 @@ namespace KBibTeX void SettingsKeyword::slotImportKeywords() { int numImported = m_keywordsFromFile.size(); - for ( QListViewItemIterator it = QListViewItemIterator( m_listKeywords ); it.current() != NULL; ++it ) + for ( TQListViewItemIterator it = TQListViewItemIterator( m_listKeywords ); it.current() != NULL; ++it ) { - QString text = it.current() ->text( 0 ); + TQString text = it.current() ->text( 0 ); if ( !m_keywordsFromFile.contains( text ) ) m_keywordsFromFile.append( text ); else @@ -122,7 +122,7 @@ namespace KBibTeX m_keywordsFromFile.sort(); m_listKeywords->clear(); - for ( QStringList::Iterator it = m_keywordsFromFile.begin(); it != m_keywordsFromFile.end(); ++it ) + for ( TQStringList::Iterator it = m_keywordsFromFile.begin(); it != m_keywordsFromFile.end(); ++it ) { KListViewItem *item = new KListViewItem( m_listKeywords, *it ); item->setPixmap( 0, SmallIcon( "package" ) ); @@ -133,9 +133,9 @@ namespace KBibTeX m_buttonImportKeywords->setEnabled( FALSE ); } - void SettingsKeyword::slotItemRenamed( QListViewItem *item ) + void SettingsKeyword::slotItemRenamed( TQListViewItem *item ) { - QString newText = item->text( 0 ).stripWhiteSpace(); + TQString newText = item->text( 0 ).stripWhiteSpace(); if ( newText.isEmpty() ) item->setText( 0, m_oldText ); else @@ -155,7 +155,7 @@ namespace KBibTeX void SettingsKeyword::setupGUI() { - QGridLayout * gridLayout = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint(), "gridLayout" ); + TQGridLayout * gridLayout = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint(), "gridLayout" ); m_listKeywords = new KListView( this ); m_listKeywords->addColumn( i18n( "Keywords" ) ); @@ -163,19 +163,19 @@ namespace KBibTeX m_listKeywords->setFullWidth( true ); gridLayout->addMultiCellWidget( m_listKeywords, 0, 4, 0, 0 ); - m_buttonNewKeyword = new QPushButton( i18n( "keyword", "New" ), this ); - m_buttonNewKeyword->setIconSet( QIconSet( SmallIcon( "add" ) ) ); + m_buttonNewKeyword = new TQPushButton( i18n( "keyword", "New" ), this ); + m_buttonNewKeyword->setIconSet( TQIconSet( SmallIcon( "add" ) ) ); gridLayout->addWidget( m_buttonNewKeyword, 0, 1 ); - m_buttonEditKeyword = new QPushButton( i18n( "keyword", "Edit" ), this ); - m_buttonEditKeyword->setIconSet( QIconSet( SmallIcon( "edit" ) ) ); + m_buttonEditKeyword = new TQPushButton( i18n( "keyword", "Edit" ), this ); + m_buttonEditKeyword->setIconSet( TQIconSet( SmallIcon( "edit" ) ) ); gridLayout->addWidget( m_buttonEditKeyword, 1, 1 ); - m_buttonDeleteKeyword = new QPushButton( i18n( "keyword", "Delete" ), this ); - m_buttonDeleteKeyword->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) ); + m_buttonDeleteKeyword = new TQPushButton( i18n( "keyword", "Delete" ), this ); + m_buttonDeleteKeyword->setIconSet( TQIconSet( SmallIcon( "editdelete" ) ) ); gridLayout->addWidget( m_buttonDeleteKeyword, 2, 1 ); - m_buttonImportKeywords = new QPushButton( i18n( "keyword", "Import" ), this ); - m_buttonImportKeywords->setIconSet( QIconSet( SmallIcon( "openfile" ) ) ); - QToolTip::add( m_buttonImportKeywords, "Import all keywords from the current BibTeX file" ); + m_buttonImportKeywords = new TQPushButton( i18n( "keyword", "Import" ), this ); + m_buttonImportKeywords->setIconSet( TQIconSet( SmallIcon( "openfile" ) ) ); + TQToolTip::add( m_buttonImportKeywords, "Import all keywords from the current BibTeX file" ); gridLayout->addWidget( m_buttonImportKeywords, 4, 1 ); connect( m_buttonImportKeywords, SIGNAL( clicked() ), this, SLOT( slotImportKeywords() ) ); @@ -183,9 +183,9 @@ namespace KBibTeX connect( m_buttonEditKeyword, SIGNAL( clicked() ), this, SLOT( slotEditKeyword() ) ); connect( m_buttonDeleteKeyword, SIGNAL( clicked() ), this, SLOT( slotDeleteKeyword() ) ); connect( m_listKeywords, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) ); - connect( m_listKeywords, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) ); - connect( m_listKeywords, SIGNAL( doubleClicked( QListViewItem*, const QPoint &, int ) ), this, SLOT( slotEditKeyword() ) ); - connect( m_listKeywords, SIGNAL( itemRenamed( QListViewItem* ) ), this, SLOT( slotItemRenamed( QListViewItem* ) ) ); + connect( m_listKeywords, SIGNAL( currentChanged( TQListViewItem * ) ), this, SLOT( updateGUI() ) ); + connect( m_listKeywords, SIGNAL( doubleClicked( TQListViewItem*, const TQPoint &, int ) ), this, SLOT( slotEditKeyword() ) ); + connect( m_listKeywords, SIGNAL( itemRenamed( TQListViewItem* ) ), this, SLOT( slotItemRenamed( TQListViewItem* ) ) ); updateGUI(); } |