summaryrefslogtreecommitdiffstats
path: root/src/searchbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/searchbar.cpp')
-rw-r--r--src/searchbar.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/searchbar.cpp b/src/searchbar.cpp
index 113bb4d..a77cf51 100644
--- a/src/searchbar.cpp
+++ b/src/searchbar.cpp
@@ -17,12 +17,12 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qlabel.h>
+#include <ntqlineedit.h>
+#include <ntqlayout.h>
+#include <ntqlistbox.h>
+#include <ntqtimer.h>
+#include <ntqtooltip.h>
+#include <ntqlabel.h>
#include <kcombobox.h>
#include <kpushbutton.h>
@@ -38,10 +38,10 @@
namespace KBibTeX
{
- SearchBar::SearchBar( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ SearchBar::SearchBar( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- m_timerInput = new QTimer( this );
+ m_timerInput = new TQTimer( this );
connect( m_timerInput, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
setupGUI();
@@ -69,7 +69,7 @@ namespace KBibTeX
m_comboboxFilter->setFont( KGlobalSettings::generalFont() );
}
- void SearchBar::setSearch( const QString&text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
+ void SearchBar::setSearch( const TQString&text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
{
m_comboboxFilter->setCurrentText( text );
switch ( filterType )
@@ -83,39 +83,39 @@ namespace KBibTeX
void SearchBar::setupGUI()
{
- QBoxLayout * layout = new QHBoxLayout( this, 3 /* KDialog::marginHint()*/, KDialog::spacingHint() );
+ TQBoxLayout * layout = new TQHBoxLayout( this, 3 /* KDialog::marginHint()*/, KDialog::spacingHint() );
KIconLoader iconLoader = KIconLoader( "kbibtex" );
m_pushButtonAddElement = new KPushButton( this );
- m_pushButtonAddElement->setIconSet( QIconSet( BarIcon( "add" ) ) );
+ m_pushButtonAddElement->setIconSet( TQIconSet( BarIcon( "add" ) ) );
layout->addWidget( m_pushButtonAddElement );
- QToolTip::add( m_pushButtonAddElement, i18n( "Add a new BibTeX entry, comment or macro to this file" ) );
+ TQToolTip::add( m_pushButtonAddElement, i18n( "Add a new BibTeX entry, comment or macro to this file" ) );
m_pushButtonSearchOnlineDatabases = new KPushButton( this );
- m_pushButtonSearchOnlineDatabases->setIconSet( QIconSet( BarIcon( "network" ) ) );
+ m_pushButtonSearchOnlineDatabases->setIconSet( TQIconSet( BarIcon( "network" ) ) );
layout->addWidget( m_pushButtonSearchOnlineDatabases );
- QToolTip::add( m_pushButtonSearchOnlineDatabases, i18n( "Add a new BibTeX entry from an online database" ) );
+ TQToolTip::add( m_pushButtonSearchOnlineDatabases, i18n( "Add a new BibTeX entry from an online database" ) );
connect( m_pushButtonSearchOnlineDatabases, SIGNAL( clicked() ), this, SIGNAL( onlineSearch() ) );
layout->insertSpacing( 2, KDialog::spacingHint() );
m_pushButtonClearSearchText = new KPushButton( this );
- m_pushButtonClearSearchText->setIconSet( QIconSet( BarIcon( "locationbar_erase" ) ) );
+ m_pushButtonClearSearchText->setIconSet( TQIconSet( BarIcon( "locationbar_erase" ) ) );
layout->addWidget( m_pushButtonClearSearchText );
- QToolTip::add( m_pushButtonClearSearchText, i18n( "Erase current search pattern" ) );
- m_pushButtonClearSearchText->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
+ TQToolTip::add( m_pushButtonClearSearchText, i18n( "Erase current search pattern" ) );
+ m_pushButtonClearSearchText->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
- QLabel *label = new QLabel( i18n( "&Search:" ), this );
+ TQLabel *label = new TQLabel( i18n( "&Search:" ), this );
layout->addWidget( label );
m_comboboxFilter = new KHistoryCombo( TRUE, this, "search_combobox" );
layout->addWidget( m_comboboxFilter );
label->setBuddy( m_comboboxFilter );
- m_comboboxFilter->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
+ m_comboboxFilter->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
m_comboboxFilter->setMaxCount( 256 );
m_comboboxFilterType = new KComboBox( FALSE, this );
- m_comboboxFilterType->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ m_comboboxFilterType->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
layout->addWidget( m_comboboxFilterType );
m_comboboxFilterType->insertItem( i18n( "Exact" ) );
@@ -123,10 +123,10 @@ namespace KBibTeX
m_comboboxFilterType->insertItem( i18n( "Any word" ) );
m_comboboxFilterType->setCurrentItem( 1 );
- label = new QLabel( i18n( "Restrict to:" ), this );
+ label = new TQLabel( i18n( "Restrict to:" ), this );
layout->addWidget( label );
m_comboboxRestrictTo = new KComboBox( FALSE, this );
- m_comboboxRestrictTo->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ m_comboboxRestrictTo->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
layout->addWidget( m_comboboxRestrictTo );
label->setBuddy( m_comboboxRestrictTo );
@@ -137,16 +137,16 @@ namespace KBibTeX
m_comboboxRestrictTo->insertItem( Settings::fieldTypeToI18NString( fieldType ) );
}
- connect( m_comboboxFilter->lineEdit(), SIGNAL( textChanged( const QString & ) ), this, SLOT( slotKeyPressed() ) );
- connect( m_comboboxFilter, SIGNAL( activated( const QString& ) ), m_comboboxFilter, SLOT( addToHistory( const QString& ) ) );
+ connect( m_comboboxFilter->lineEdit(), SIGNAL( textChanged( const TQString & ) ), this, SLOT( slotKeyPressed() ) );
+ connect( m_comboboxFilter, SIGNAL( activated( const TQString& ) ), m_comboboxFilter, SLOT( addToHistory( const TQString& ) ) );
connect( m_pushButtonClearSearchText, SIGNAL( clicked() ), this, SLOT( slotClear() ) );
- connect( m_comboboxFilterType, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotAnnounceDoSearch() ) );
- connect( m_comboboxFilter, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotAnnounceDoSearch() ) );
+ connect( m_comboboxFilterType, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotAnnounceDoSearch() ) );
+ connect( m_comboboxFilter, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotAnnounceDoSearch() ) );
connect( m_comboboxFilter->lineEdit(), SIGNAL( returnPressed() ), this, SLOT( slotAnnounceDoSearch() ) );
connect( m_comboboxFilterType, SIGNAL( activated( int ) ), this, SLOT( slotTimeout() ) );
connect( m_comboboxRestrictTo, SIGNAL( activated( int ) ), this, SLOT( slotTimeout() ) );
- setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
+ setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
}
void SearchBar::slotClear()