summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/packageselectdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbugbuster/gui/packageselectdialog.cpp')
-rw-r--r--kbugbuster/gui/packageselectdialog.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kbugbuster/gui/packageselectdialog.cpp b/kbugbuster/gui/packageselectdialog.cpp
index 7b791e9d..31dfdcef 100644
--- a/kbugbuster/gui/packageselectdialog.cpp
+++ b/kbugbuster/gui/packageselectdialog.cpp
@@ -1,6 +1,6 @@
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qheader.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqheader.h>
#include <kdebug.h>
#include <kcompletion.h>
@@ -14,10 +14,10 @@
#include "packageselectdialog.h"
#include "packageselectdialog.moc"
-PackageListView::PackageListView( QWidget *parent ) :
- QListView( parent )
+PackageListView::PackageListView( TQWidget *parent ) :
+ TQListView( parent )
{
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
}
void PackageListView::resetTyped()
@@ -25,41 +25,41 @@ void PackageListView::resetTyped()
mTyped = "";
}
-void PackageListView::keyPressEvent( QKeyEvent *e )
+void PackageListView::keyPressEvent( TQKeyEvent *e )
{
// Disable listview text completion for now
- QListView::keyPressEvent( e );
+ TQListView::keyPressEvent( e );
return;
int k = e->key();
if ( k == Key_Return || k == Key_Escape ) e->ignore();
- QString key = e->text();
+ TQString key = e->text();
mTyped.append(key);
emit typed( mTyped );
}
-PackageSelectDialog::PackageSelectDialog(QWidget *parent,const char *name) :
+PackageSelectDialog::PackageSelectDialog(TQWidget *parent,const char *name) :
KDialogBase( parent, name, true, i18n("Select Product"), Ok|Cancel )
{
- QWidget *topWidget = new QWidget( this );
+ TQWidget *topWidget = new TQWidget( this );
setMainWidget( topWidget );
- QBoxLayout *topLayout = new QVBoxLayout( topWidget );
- QSplitter *topSplitter = new QSplitter( QSplitter::Vertical, topWidget );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topWidget );
+ TQSplitter *topSplitter = new TQSplitter( TQSplitter::Vertical, topWidget );
topSplitter->setOpaqueResize( true );
topLayout->addWidget( topSplitter );
- mRecentList = new QListView( topSplitter );
+ mRecentList = new TQListView( topSplitter );
mRecentList->addColumn( i18n("Recent") );
mRecentList->resize( mRecentList->width(), mRecentList->fontMetrics().height() *
KBBPrefs::instance()->mRecentPackagesCount );
- connect( mRecentList, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int) ),
- SLOT( recentSelected( int, QListViewItem * ) ) );
- connect( mRecentList, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( slotOk() ) );
+ connect( mRecentList, TQT_SIGNAL( mouseButtonPressed( int, TQListViewItem *, const TQPoint &, int) ),
+ TQT_SLOT( recentSelected( int, TQListViewItem * ) ) );
+ connect( mRecentList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( slotOk() ) );
mCompletion = new KCompletion;
mCompletion->setCompletionMode( KGlobalSettings::CompletionAuto );
@@ -69,21 +69,21 @@ PackageSelectDialog::PackageSelectDialog(QWidget *parent,const char *name) :
mCompleteList->addColumn( i18n("Description") );
mCompleteList->setRootIsDecorated(true);
mCompleteList->setAllColumnsShowFocus( true );
- connect( mCompleteList, SIGNAL( typed( const QString & ) ),
- SLOT( completeTyped( const QString & ) ) );
+ connect( mCompleteList, TQT_SIGNAL( typed( const TQString & ) ),
+ TQT_SLOT( completeTyped( const TQString & ) ) );
- connect( mCompleteList, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int) ),
- SLOT( completeSelected( int, QListViewItem * ) ) );
- connect( mCompleteList, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( slotOk() ) );
+ connect( mCompleteList, TQT_SIGNAL( mouseButtonPressed( int, TQListViewItem *, const TQPoint &, int) ),
+ TQT_SLOT( completeSelected( int, TQListViewItem * ) ) );
+ connect( mCompleteList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( slotOk() ) );
mPackageEdit = new KLineEdit( topWidget );
mPackageEdit->setFocus();
topLayout->addWidget( mPackageEdit );
- connect( mPackageEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( completeTyped( const QString & ) ) );
+ connect( mPackageEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( completeTyped( const TQString & ) ) );
enableButtonOK( !mPackageEdit->text().isEmpty() );
}
@@ -92,12 +92,12 @@ PackageSelectDialog::~PackageSelectDialog()
delete mCompletion;
}
-void PackageSelectDialog::setRecentPackages( const QStringList &recent )
+void PackageSelectDialog::setRecentPackages( const TQStringList &recent )
{
mRecentList->clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = recent.begin(); it != recent.end(); ++it ) {
- new QListViewItem( mRecentList, *it );
+ new TQListViewItem( mRecentList, *it );
}
}
@@ -108,13 +108,13 @@ void PackageSelectDialog::setPackages( const Package::List &pkgs )
mCompletionDict.clear();
Package::List::ConstIterator it;
for( it = pkgs.begin(); it != pkgs.end(); ++it ) {
- PackageLVI *item = new PackageLVI( mCompleteList, (*it), QString::null );
- QStringList components = (*it).components();
+ PackageLVI *item = new PackageLVI( mCompleteList, (*it), TQString::null );
+ TQStringList components = (*it).components();
if (components.count() > 1) {
- for( QStringList::ConstIterator cit = components.begin(); cit != components.end(); ++cit ) {
+ for( TQStringList::ConstIterator cit = components.begin(); cit != components.end(); ++cit ) {
PackageLVI *component = new PackageLVI( item, (*it), (*cit) );
- QString completionName = (*it).name() + "/" + (*cit);
+ TQString completionName = (*it).name() + "/" + (*cit);
mCompletion->addItem( completionName );
mCompletionDict.insert( completionName, component );
@@ -126,7 +126,7 @@ void PackageSelectDialog::setPackages( const Package::List &pkgs )
}
}
-void PackageSelectDialog::recentSelected( int, QListViewItem *item )
+void PackageSelectDialog::recentSelected( int, TQListViewItem *item )
{
kdDebug() << "PackageSelectDialog::recentSelected()" << endl;
if ( item ) {
@@ -139,7 +139,7 @@ void PackageSelectDialog::recentSelected( int, QListViewItem *item )
}
}
-void PackageSelectDialog::completeSelected( int, QListViewItem *item )
+void PackageSelectDialog::completeSelected( int, TQListViewItem *item )
{
PackageLVI *lvi = dynamic_cast<PackageLVI*>(item);
@@ -161,14 +161,14 @@ void PackageSelectDialog::slotOk()
mSelectedPackage = item->package();
mSelectedComponent = item->component();
- QString recent_key;
+ TQString recent_key;
if ( item->component().isEmpty() )
recent_key = item->package().name();
else
recent_key = item->package().name() + "/" + item->component();
BugServer *server = BugSystem::self()->server();
- QStringList recent = server->serverConfig().recentPackages();
+ TQStringList recent = server->serverConfig().recentPackages();
if( !recent.contains( recent_key ) ) {
recent.prepend( recent_key );
if ( int( recent.count() ) > KBBPrefs::instance()->mRecentPackagesCount ) {
@@ -178,9 +178,9 @@ void PackageSelectDialog::slotOk()
server->serverConfig().setRecentPackages( recent );
}
} else {
- QListViewItem *recentItem = mRecentList->selectedItem();
+ TQListViewItem *recentItem = mRecentList->selectedItem();
if ( recentItem ) {
- QStringList tokens = QStringList::split( '/', recentItem->text( 0 ) );
+ TQStringList tokens = TQStringList::split( '/', recentItem->text( 0 ) );
mSelectedPackage = BugSystem::self()->package( tokens[0] );
mSelectedComponent = tokens[1];
}
@@ -194,15 +194,15 @@ Package PackageSelectDialog::selectedPackage()
return mSelectedPackage;
}
-QString PackageSelectDialog::selectedComponent()
+TQString PackageSelectDialog::selectedComponent()
{
return mSelectedComponent;
}
-void PackageSelectDialog::completeTyped( const QString &typed )
+void PackageSelectDialog::completeTyped( const TQString &typed )
{
kdDebug() << "completeTyped: " << typed << endl;
- QString completed = mCompletion->makeCompletion( typed );
+ TQString completed = mCompletion->makeCompletion( typed );
kdDebug() << "completed: " << completed << endl;
if ( !completed.isEmpty() ) {
mCompleteList->setSelected( mCompletionDict[ completed ], true );