summaryrefslogtreecommitdiffstats
path: root/src/entrywidgetkeyword.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entrywidgetkeyword.cpp')
-rw-r--r--src/entrywidgetkeyword.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/entrywidgetkeyword.cpp b/src/entrywidgetkeyword.cpp
index b61acc0..da34947 100644
--- a/src/entrywidgetkeyword.cpp
+++ b/src/entrywidgetkeyword.cpp
@@ -17,12 +17,12 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <ntqlayout.h>
+#include <ntqregexp.h>
+#include <ntqpushbutton.h>
+#include <ntqtooltip.h>
+#include <ntqtimer.h>
+#include <ntqlabel.h>
#include <kdialog.h>
#include <klocale.h>
@@ -38,7 +38,7 @@
namespace KBibTeX
{
- KeywordListViewItem::KeywordListViewItem( KListView * parent, const QString & text, bool global ) : QCheckListItem( parent, text, QCheckListItem::CheckBox )
+ KeywordListViewItem::KeywordListViewItem( KListView * parent, const TQString & text, bool global ) : TQCheckListItem( parent, text, TQCheckListItem::CheckBox )
{
setGlobal( global );
}
@@ -63,7 +63,7 @@ namespace KBibTeX
}
}
- EntryWidgetKeyword::EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_bibtexfile( bibtexfile ), m_isModified( FALSE ), m_numKeywords( 0 )
+ EntryWidgetKeyword::EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_bibtexfile( bibtexfile ), m_isModified( FALSE ), m_numKeywords( 0 )
{
setupGUI();
}
@@ -119,7 +119,7 @@ namespace KBibTeX
BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftKeywords );
BibTeX::KeywordContainer *keywordContainer = NULL;
if ( field != NULL && ( keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( field->value()->items.first() ) ) != NULL )
- for ( QValueList<BibTeX::Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
+ for ( TQValueList<BibTeX::Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
m_usedKeywords.append(( *it )->text() );
if ( m_bibtexfile != NULL )
@@ -128,18 +128,18 @@ namespace KBibTeX
KBibTeX::Settings * settings = KBibTeX::Settings::self();
m_globalKeywords = settings->keyword_GlobalList;
- m_availableKeywords = QStringList( m_globalKeywords );
- for ( QStringList::Iterator it = m_fileKeywords.begin(); it != m_fileKeywords.end(); ++it )
+ m_availableKeywords = TQStringList( m_globalKeywords );
+ for ( TQStringList::Iterator it = m_fileKeywords.begin(); it != m_fileKeywords.end(); ++it )
if ( !m_availableKeywords.contains( *it ) )
m_availableKeywords.append( *it );
- for ( QStringList::Iterator it = m_usedKeywords.begin(); it != m_usedKeywords.end(); ++it )
+ for ( TQStringList::Iterator it = m_usedKeywords.begin(); it != m_usedKeywords.end(); ++it )
if ( !m_availableKeywords.contains( *it ) )
m_availableKeywords.append( *it );
setListView();
}
- void EntryWidgetKeyword::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView */*listViewWarnings*/ )
+ void EntryWidgetKeyword::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView */*listViewWarnings*/ )
{
// nothing
}
@@ -152,7 +152,7 @@ namespace KBibTeX
m_buttonToggleGlobal->setEnabled( hasCurrent );
}
- void EntryWidgetKeyword::slotKeywordRenamed( QListViewItem * item, const QString & text, int /*col*/ )
+ void EntryWidgetKeyword::slotKeywordRenamed( TQListViewItem * item, const TQString & text, int /*col*/ )
{
KeywordListViewItem *kwlvi = dynamic_cast<KeywordListViewItem*>( item );
if ( text.isEmpty() )
@@ -165,7 +165,7 @@ namespace KBibTeX
if ( m_availableKeywords.contains( text ) )
{
item->setText( 0, m_beforeRenaming );
- KMessageBox::error( this, QString( i18n( "The keyword '%1' does already exist in the list of keywords.\nThe old name has been restored." ) ).arg( text ), i18n( "Renaming keyword failed" ) );
+ KMessageBox::error( this, TQString( i18n( "The keyword '%1' does already exist in the list of keywords.\nThe old name has been restored." ) ).arg( text ), i18n( "Renaming keyword failed" ) );
}
else
{
@@ -181,7 +181,7 @@ namespace KBibTeX
m_fileKeywords.remove( m_beforeRenaming );
m_fileKeywords.append( text );
}
- QCheckListItem *checkedItem = dynamic_cast<QCheckListItem*>( item );
+ TQCheckListItem *checkedItem = dynamic_cast<TQCheckListItem*>( item );
if ( checkedItem != NULL )
checkedItem->setOn( TRUE );
}
@@ -190,14 +190,14 @@ namespace KBibTeX
void EntryWidgetKeyword::slotNewKeyword()
{
- KeywordListViewItem * item = new KeywordListViewItem( m_listviewKeywords, QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewKeyword%1" ) ).arg( ++m_numKeywords ), FALSE );
+ KeywordListViewItem * item = new KeywordListViewItem( m_listviewKeywords, TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewKeyword%1" ) ).arg( ++m_numKeywords ), FALSE );
m_listviewKeywords->setSelected( item, TRUE );
- QTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) );
+ TQTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) );
}
void EntryWidgetKeyword::slotEditKeyword()
{
- QListViewItem * item = m_listviewKeywords->selectedItem();
+ TQListViewItem * item = m_listviewKeywords->selectedItem();
if ( item != NULL )
{
m_beforeRenaming = item->text( 0 );
@@ -222,7 +222,7 @@ namespace KBibTeX
void EntryWidgetKeyword::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 6, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 6, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( 4, 1 );
m_listviewKeywords = new KListView( this );
@@ -231,33 +231,33 @@ namespace KBibTeX
m_listviewKeywords->addColumn( i18n( "Origin" ) );
gridLayout->addMultiCellWidget( m_listviewKeywords, 0, 4, 0, 0 );
m_listviewKeywords->setAllColumnsShowFocus( TRUE );
- connect( m_listviewKeywords, SIGNAL( currentChanged( QListViewItem* ) ), this, SLOT( slotSelectionChanged() ) );
- connect( m_listviewKeywords, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( slotSelectionChanged() ) );
- connect( m_listviewKeywords, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ), this, SLOT( slotKeywordRenamed( QListViewItem*, const QString&, int ) ) );
+ connect( m_listviewKeywords, SIGNAL( currentChanged( TQListViewItem* ) ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_listviewKeywords, SIGNAL( clicked( TQListViewItem * ) ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_listviewKeywords, SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ), this, SLOT( slotKeywordRenamed( TQListViewItem*, const TQString&, int ) ) );
- m_buttonNew = new QPushButton( i18n( "keyword", "New" ), this );
+ m_buttonNew = new TQPushButton( i18n( "keyword", "New" ), this );
m_buttonNew->setEnabled( !m_isReadOnly );
- m_buttonNew->setIconSet( QIconSet( SmallIcon( "add" ) ) );
- QToolTip::add( m_buttonNew, i18n( "Add a new keyword to the list" ) );
+ m_buttonNew->setIconSet( TQIconSet( SmallIcon( "add" ) ) );
+ TQToolTip::add( m_buttonNew, i18n( "Add a new keyword to the list" ) );
gridLayout->addWidget( m_buttonNew, 0, 1 );
connect( m_buttonNew, SIGNAL( clicked() ), this, SLOT( slotNewKeyword() ) );
- m_buttonEdit = new QPushButton( i18n( "keyword", "Edit" ), this );
- m_buttonEdit->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
- QToolTip::add( m_buttonEdit, i18n( "Edit the selected keyword" ) );
+ m_buttonEdit = new TQPushButton( i18n( "keyword", "Edit" ), this );
+ m_buttonEdit->setIconSet( TQIconSet( SmallIcon( "edit" ) ) );
+ TQToolTip::add( m_buttonEdit, i18n( "Edit the selected keyword" ) );
gridLayout->addWidget( m_buttonEdit, 1, 1 );
m_buttonEdit->setEnabled( FALSE );
connect( m_buttonEdit, SIGNAL( clicked() ), this, SLOT( slotEditKeyword() ) );
- m_buttonToggleGlobal = new QPushButton( i18n( "keyword", "Toggle &global" ), this );
- m_buttonToggleGlobal->setIconSet( QIconSet( SmallIcon( "package" ) ) );
- QToolTip::add( m_buttonToggleGlobal, i18n( "Add or remove the selected keyword to or from the global list" ) );
+ m_buttonToggleGlobal = new TQPushButton( i18n( "keyword", "Toggle &global" ), this );
+ m_buttonToggleGlobal->setIconSet( TQIconSet( SmallIcon( "package" ) ) );
+ TQToolTip::add( m_buttonToggleGlobal, i18n( "Add or remove the selected keyword to or from the global list" ) );
gridLayout->addWidget( m_buttonToggleGlobal, 2, 1 );
m_buttonToggleGlobal->setEnabled( FALSE );
connect( m_buttonToggleGlobal, SIGNAL( clicked() ), this, SLOT( slotToggleGlobal() ) );
- QLabel *label = new QLabel( i18n( "There is no need to delete keywords. Simply uncheck unwanted keywords and make them non-global.\nGlobal keywords can also be edited in the settings dialog." ), this );
- label->setAlignment( QLabel::WordBreak | QLabel::AlignTop );
+ TQLabel *label = new TQLabel( i18n( "There is no need to delete keywords. Simply uncheck unwanted keywords and make them non-global.\nGlobal keywords can also be edited in the settings dialog." ), this );
+ label->setAlignment( TQLabel::WordBreak | TQLabel::AlignTop );
gridLayout->addMultiCellWidget( label, 5, 5, 0, 1 );
}
@@ -265,7 +265,7 @@ namespace KBibTeX
{
m_availableKeywords.sort();
m_listviewKeywords->clear();
- for ( QStringList::Iterator it = m_availableKeywords.begin(); it != m_availableKeywords.end(); ++it )
+ for ( TQStringList::Iterator it = m_availableKeywords.begin(); it != m_availableKeywords.end(); ++it )
{
KeywordListViewItem *item = new KeywordListViewItem( m_listviewKeywords, *it, m_globalKeywords.contains( *it ) );
if ( m_usedKeywords.contains( *it ) )
@@ -276,7 +276,7 @@ namespace KBibTeX
void EntryWidgetKeyword::readListView()
{
m_usedKeywords.clear();
- for ( QListViewItemIterator it = QListViewItemIterator( m_listviewKeywords, QListViewItemIterator::Checked ); it.current() != NULL; ++it )
+ for ( TQListViewItemIterator it = TQListViewItemIterator( m_listviewKeywords, TQListViewItemIterator::Checked ); it.current() != NULL; ++it )
m_usedKeywords.append(( *it ) ->text( 0 ) );
}
}