summaryrefslogtreecommitdiffstats
path: root/src/entrywidgetother.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entrywidgetother.cpp')
-rw-r--r--src/entrywidgetother.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/entrywidgetother.cpp b/src/entrywidgetother.cpp
index 1c5d13b..cd165f2 100644
--- a/src/entrywidgetother.cpp
+++ b/src/entrywidgetother.cpp
@@ -17,11 +17,11 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <ntqstringlist.h>
+#include <ntqlayout.h>
+#include <ntqtooltip.h>
+#include <ntqlabel.h>
+#include <ntqwhatsthis.h>
#include <kdialog.h>
#include <kapplication.h>
@@ -39,7 +39,7 @@
namespace KBibTeX
{
- EntryWidgetOther::EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetOther::EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_isModified( FALSE )
{
setupGUI();
@@ -63,24 +63,24 @@ namespace KBibTeX
void EntryWidgetOther::apply( BibTeX::Entry *entry )
{
Settings * settings = Settings::self();
- QStringList toBeDeleted;
- for ( QValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
+ TQStringList toBeDeleted;
+ for ( TQValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
{
BibTeX::EntryField *field = *it;
bool doDel = field->fieldType() == BibTeX::EntryField::ftUnknown;
if ( !doDel ) continue;
- QString ftn = field->fieldTypeName().lower();
+ TQString ftn = field->fieldTypeName().lower();
for ( unsigned int i = 0; doDel && i < settings->userDefinedInputFields.count(); ++i )
doDel &= settings->userDefinedInputFields[i]->name.lower() != ftn;
if ( doDel )
toBeDeleted.append( ftn );
}
- for ( QStringList::ConstIterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
+ for ( TQStringList::ConstIterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
entry->deleteField( *it );
- for ( QListViewItemIterator it( m_listViewFields ); it.current(); it++ )
+ for ( TQListViewItemIterator it( m_listViewFields ); it.current(); it++ )
{
ValueListViewItem *vlvi = dynamic_cast<KBibTeX::ValueListViewItem*>( it.current() );
if ( vlvi != NULL )
@@ -99,13 +99,13 @@ namespace KBibTeX
m_listViewFields->clear();
Settings * settings = Settings::self();
- for ( QValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
+ for ( TQValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
{
BibTeX::EntryField *field = *it;
bool doAdd = field->fieldType() == BibTeX::EntryField::ftUnknown;
if ( !doAdd ) continue;
- QString ftn = field->fieldTypeName().lower();
+ TQString ftn = field->fieldTypeName().lower();
for ( unsigned int i = 0; doAdd && i < settings->userDefinedInputFields.count(); ++i )
doAdd &= settings->userDefinedInputFields[i]->name.lower() != ftn;
@@ -116,37 +116,37 @@ namespace KBibTeX
m_isModified = FALSE;
}
- void EntryWidgetOther::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView * /*listViewWarnings*/ )
+ void EntryWidgetOther::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView * /*listViewWarnings*/ )
{
// no warnings neccessary for user fields
}
void EntryWidgetOther::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
m_lineEditKey = new KLineEdit( this, "m_lineEditKey" );
m_lineEditKey->setReadOnly( m_isReadOnly );
gridLayout->addWidget( m_lineEditKey, 0, 1 );
- QToolTip::add( m_lineEditKey, i18n( "Name of the user-defined field" ) );
- QWhatsThis::add( m_lineEditKey, i18n( "The name of the user-defined field. Should only contain letters and numbers." ) );
- QLabel *label = new QLabel( i18n( "&Name:" ), this );
+ TQToolTip::add( m_lineEditKey, i18n( "Name of the user-defined field" ) );
+ TQWhatsThis::add( m_lineEditKey, i18n( "The name of the user-defined field. Should only contain letters and numbers." ) );
+ TQLabel *label = new TQLabel( i18n( "&Name:" ), this );
label->setBuddy( m_lineEditKey );
gridLayout->addWidget( label, 0, 0 );
m_pushButtonAdd = new KPushButton( i18n( "&Add" ), this, "m_pushButtonAdd" );
gridLayout->addWidget( m_pushButtonAdd, 0, 2 );
- m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ m_pushButtonAdd->setIconSet( TQIconSet( SmallIcon( "add" ) ) );
m_fieldLineEditValue = new KBibTeX::FieldLineEdit( i18n( "Value" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditValue" );
gridLayout->addMultiCellWidget( m_fieldLineEditValue, 1, 2, 1, 2 );
- QToolTip::add( m_fieldLineEditValue, i18n( "Content of the user-defined field" ) );
- QWhatsThis::add( m_fieldLineEditValue, i18n( "The content of the user-defined field. May contain any text." ) );
- label = new QLabel( i18n( "&Content:" ), this );
+ TQToolTip::add( m_fieldLineEditValue, i18n( "Content of the user-defined field" ) );
+ TQWhatsThis::add( m_fieldLineEditValue, i18n( "The content of the user-defined field. May contain any text." ) );
+ label = new TQLabel( i18n( "&Content:" ), this );
label->setBuddy( m_fieldLineEditValue );
gridLayout->addWidget( label, 1, 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 110, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
gridLayout->addItem( spacer, 2, 0 );
m_listViewFields = new KListView( this, "m_listViewFields" );
@@ -156,28 +156,28 @@ namespace KBibTeX
m_listViewFields->setFullWidth( TRUE );
gridLayout->addMultiCellWidget( m_listViewFields, 3, 5, 1, 1 );
- label = new QLabel( i18n( "&List:" ), this );
+ label = new TQLabel( i18n( "&List:" ), this );
label->setBuddy( m_listViewFields );
- label->setAlignment( Qt::AlignTop );
+ label->setAlignment( TQt::AlignTop );
gridLayout->addWidget( label, 3, 0 );
m_pushButtonDelete = new KPushButton( i18n( "&Delete" ), this, "m_pushButtonDelete" );
gridLayout->addWidget( m_pushButtonDelete, 3, 2 );
- m_pushButtonDelete->setIconSet( QIconSet( SmallIcon( "delete" ) ) );
+ m_pushButtonDelete->setIconSet( TQIconSet( SmallIcon( "delete" ) ) );
m_pushButtonOpen = new KPushButton( i18n( "Op&en" ), this, "m_pushButtonOpen" );
gridLayout->addWidget( m_pushButtonOpen, 4, 2 );
- m_pushButtonOpen->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpen->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
- spacer = new QSpacerItem( 20, 110, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer = new TQSpacerItem( 20, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
gridLayout->addItem( spacer, 5, 2 );
m_pushButtonOpen->setEnabled( FALSE );
m_pushButtonAdd->setEnabled( FALSE );
m_pushButtonDelete->setEnabled( FALSE );
- connect( m_listViewFields, SIGNAL( clicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( fieldExecute( QListViewItem* ) ) );
- connect( m_lineEditKey, SIGNAL( textChanged( const QString& ) ), this, SLOT( updateGUI() ) );
+ connect( m_listViewFields, SIGNAL( clicked( TQListViewItem*, const TQPoint&, int ) ), this, SLOT( fieldExecute( TQListViewItem* ) ) );
+ connect( m_lineEditKey, SIGNAL( textChanged( const TQString& ) ), this, SLOT( updateGUI() ) );
connect( m_fieldLineEditValue, SIGNAL( textChanged( ) ), this, SLOT( updateGUI() ) );
connect( m_pushButtonAdd, SIGNAL( clicked( ) ), this, SLOT( addClicked( ) ) );
connect( m_pushButtonDelete, SIGNAL( clicked( ) ), this, SLOT( deleteClicked( ) ) );
@@ -186,8 +186,8 @@ namespace KBibTeX
void EntryWidgetOther::updateGUI()
{
- QString text = m_lineEditKey->text();
- QListViewItem * item = m_listViewFields->findItem( text, 0 ) ;
+ TQString text = m_lineEditKey->text();
+ TQListViewItem * item = m_listViewFields->findItem( text, 0 ) ;
bool contains = item != NULL;
bool isUnknown = BibTeX::EntryField::fieldTypeFromString( text ) == BibTeX::EntryField::ftUnknown;
@@ -199,7 +199,7 @@ namespace KBibTeX
m_pushButtonDelete->setEnabled( !m_isReadOnly && contains );
m_pushButtonAdd->setEnabled( !m_isReadOnly && !text.isEmpty() && !m_fieldLineEditValue->isEmpty() && isUnknown );
m_pushButtonAdd->setText( contains ? i18n( "&Apply" ) : i18n( "&Add" ) );
- m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( contains ? "apply" : "fileopen" ) ) );
+ m_pushButtonAdd->setIconSet( TQIconSet( SmallIcon( contains ? "apply" : "fileopen" ) ) );
bool validURL = FALSE;
if ( contains )
@@ -211,7 +211,7 @@ namespace KBibTeX
m_pushButtonOpen->setEnabled( validURL );
}
- void EntryWidgetOther::fieldExecute( QListViewItem * item )
+ void EntryWidgetOther::fieldExecute( TQListViewItem * item )
{
ValueListViewItem * vlvi = dynamic_cast<KBibTeX::ValueListViewItem*>( item );
if ( vlvi != NULL )
@@ -223,8 +223,8 @@ namespace KBibTeX
void EntryWidgetOther::addClicked()
{
- QString key = m_lineEditKey->text();
- QListViewItem * item = m_listViewFields->findItem( key, 0 ) ;
+ TQString key = m_lineEditKey->text();
+ TQListViewItem * item = m_listViewFields->findItem( key, 0 ) ;
ValueListViewItem * vlvi = item != NULL ? dynamic_cast<KBibTeX::ValueListViewItem*>( item ) : NULL;
if ( vlvi != NULL )
@@ -239,7 +239,7 @@ namespace KBibTeX
void EntryWidgetOther::deleteClicked()
{
- QListViewItem * item = m_listViewFields->findItem( m_lineEditKey->text(), 0 );
+ TQListViewItem * item = m_listViewFields->findItem( m_lineEditKey->text(), 0 );
if ( item != NULL )
{
@@ -264,8 +264,8 @@ namespace KBibTeX
m_fieldLineEditValue->setEnabled( FALSE );
}
- ValueListViewItem::ValueListViewItem( const QString& title, BibTeX::Value *value, QListView *parent )
- : QListViewItem( parent ), m_title( title )
+ ValueListViewItem::ValueListViewItem( const TQString& title, BibTeX::Value *value, TQListView *parent )
+ : TQListViewItem( parent ), m_title( title )
{
m_value = new BibTeX::Value( value );
setTexts( m_title );
@@ -281,7 +281,7 @@ namespace KBibTeX
return m_value;
}
- QString ValueListViewItem::title()
+ TQString ValueListViewItem::title()
{
return m_title;
}
@@ -302,13 +302,13 @@ namespace KBibTeX
setTexts( m_title );
}
- void ValueListViewItem::setTitle( const QString &title )
+ void ValueListViewItem::setTitle( const TQString &title )
{
m_title = title;
setTexts( title );
}
- void ValueListViewItem::setTexts( const QString& title )
+ void ValueListViewItem::setTexts( const TQString& title )
{
setText( 0, title );
if ( m_value != NULL )