summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/kbbmainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbugbuster/gui/kbbmainwindow.cpp')
-rw-r--r--kbugbuster/gui/kbbmainwindow.cpp170
1 files changed, 85 insertions, 85 deletions
diff --git a/kbugbuster/gui/kbbmainwindow.cpp b/kbugbuster/gui/kbbmainwindow.cpp
index 66a9b588..24730fda 100644
--- a/kbugbuster/gui/kbbmainwindow.cpp
+++ b/kbugbuster/gui/kbbmainwindow.cpp
@@ -16,13 +16,13 @@
#include "kbbmainwindow.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
-#include <qprogressbar.h>
-#include <qpushbutton.h>
-#include <qtextview.h>
-#include <qwidgetstack.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
+#include <tqtextview.h>
+#include <tqwidgetstack.h>
#include <kaction.h>
#include <kbookmarkmenu.h>
@@ -61,15 +61,15 @@ using namespace KBugBusterMainWindow;
class TextViewer : public KDialogBase
{
public:
- TextViewer( const QString &title, QWidget *parent = 0 )
+ TextViewer( const TQString &title, TQWidget *parent = 0 )
: KDialogBase( Plain, title, Ok, Ok, parent, 0,
false )
{
- QFrame *topFrame = plainPage();
+ TQFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mTextView = new QTextEdit( topFrame );
+ mTextView = new TQTextEdit( topFrame );
mTextView->setReadOnly( true );
mTextView->setTextFormat( PlainText );
topLayout->addWidget( mTextView );
@@ -77,27 +77,27 @@ class TextViewer : public KDialogBase
resize( 600, 400 );
}
- void setText( const QString &text )
+ void setText( const TQString &text )
{
mTextView->setText( text );
}
private:
- QTextEdit *mTextView;
+ TQTextEdit *mTextView;
};
KBookmarkManager* KBBBookmarkManager::s_bookmarkManager;
-KBBMainWindow::KBBMainWindow( const QCString &initialPackage,
- const QCString &initialComponent,
- const QCString &initialBug,
- QWidget * , const char * name )
+KBBMainWindow::KBBMainWindow( const TQCString &initialPackage,
+ const TQCString &initialComponent,
+ const TQCString &initialBug,
+ TQWidget * , const char * name )
: KMainWindow( 0, name ), mPreferencesDialog( 0 ), mResponseViewer( 0 ),
mBugSourceViewer( 0 ), mPackageSelectDialog( 0 )
{
BugSystem::self()->setCurrentServer( KBBPrefs::instance()->mCurrentServer );
- m_statusLabel = new QLabel( i18n( "Welcome to <b>KBugBuster</b>." ), statusBar() );
+ m_statusLabel = new TQLabel( i18n( "Welcome to <b>KBugBuster</b>." ), statusBar() );
m_statusLabel->setMaximumHeight( statusBar()->fontMetrics().height() + 6 );
m_statusLabel->setIndent( KDialog::marginHint() / 2 );
statusBar()->addWidget( m_statusLabel, 1 );
@@ -108,25 +108,25 @@ KBBMainWindow::KBBMainWindow( const QCString &initialPackage,
initActions();
- m_progressBar = new QProgressBar( 100, statusBar() );
+ m_progressBar = new TQProgressBar( 100, statusBar() );
m_progressBar->setCenterIndicator( true );
m_progressBar->setMinimumWidth( 150 );
m_progressBar->setMaximumHeight( statusBar()->fontMetrics().height() + 6 );
statusBar()->addWidget( m_progressBar );
- connect( m_mainWidget, SIGNAL( resetProgressBar() ),
- m_progressBar, SLOT( reset() ) );
- connect( m_mainWidget, SIGNAL( searchPackage() ),
- this, SLOT( searchPackage() ) );
- connect( m_mainWidget, SIGNAL( searchBugNumber() ),
- this, SLOT( searchBugNumber() ) );
+ connect( m_mainWidget, TQT_SIGNAL( resetProgressBar() ),
+ m_progressBar, TQT_SLOT( reset() ) );
+ connect( m_mainWidget, TQT_SIGNAL( searchPackage() ),
+ this, TQT_SLOT( searchPackage() ) );
+ connect( m_mainWidget, TQT_SIGNAL( searchBugNumber() ),
+ this, TQT_SLOT( searchBugNumber() ) );
- connect( BugSystem::self(), SIGNAL( infoMessage( const QString & ) ),
- SLOT( slotStatusMsg( const QString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( infoMessage( const TQString & ) ),
+ TQT_SLOT( slotStatusMsg( const TQString & ) ) );
- connect( BugSystem::self(), SIGNAL( infoMessage( const QString & ) ),
- SLOT( slotStatusMsg( const QString & ) ) );
- connect( BugSystem::self(), SIGNAL( infoPercent( unsigned long ) ),
- SLOT( slotSetPercent( unsigned long ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( infoMessage( const TQString & ) ),
+ TQT_SLOT( slotStatusMsg( const TQString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( infoPercent( unsigned long ) ),
+ TQT_SLOT( slotSetPercent( unsigned long ) ) );
m_mainWidget->readConfig();
}
@@ -145,60 +145,60 @@ void KBBMainWindow::initActions()
{
// Prepare and create XML GUI
fileQuit = KStdAction::quit( this,
- SLOT( close() ), actionCollection() );
+ TQT_SLOT( close() ), actionCollection() );
fileQuit->setToolTip( i18n( "Quit KBugBuster" ) );
- new KAction( i18n("See &Pending Changes"), "contents", 0, this, SLOT( slotListChanges() ),
+ new KAction( i18n("See &Pending Changes"), "contents", 0, this, TQT_SLOT( slotListChanges() ),
actionCollection(), "file_seechanges" );
- new KAction( i18n("&Submit Changes"), "mail_send", 0, this, SLOT( slotSubmit() ),
+ new KAction( i18n("&Submit Changes"), "mail_send", 0, this, TQT_SLOT( slotSubmit() ),
actionCollection(), "file_submit" );
- reloadpacklist = new KAction( i18n("Reload &Product List"), "reload", CTRL+Qt::Key_F5, m_mainWidget, SLOT( slotReloadPackageList() ),
+ reloadpacklist = new KAction( i18n("Reload &Product List"), "reload", CTRL+Qt::Key_F5, m_mainWidget, TQT_SLOT( slotReloadPackageList() ),
actionCollection(), "reload_packagelist" );
- reloadpack= new KAction( i18n("Reload Bug &List (for current product)"), "reload", Qt::Key_F5, m_mainWidget, SLOT( slotReloadPackage() ),
+ reloadpack= new KAction( i18n("Reload Bug &List (for current product)"), "reload", Qt::Key_F5, m_mainWidget, TQT_SLOT( slotReloadPackage() ),
actionCollection(), "reload_package" );
- reloadbug = new KAction( i18n("Reload Bug &Details (for current bug)"), "reload", SHIFT+Qt::Key_F5, m_mainWidget, SLOT( slotReloadBug() ),
+ reloadbug = new KAction( i18n("Reload Bug &Details (for current bug)"), "reload", SHIFT+Qt::Key_F5, m_mainWidget, TQT_SLOT( slotReloadBug() ),
actionCollection(), "reload_bug" );
- loadMyBugs = new KAction( i18n( "Load &My Bugs List" ), 0, m_mainWidget, SLOT( slotLoadMyBugs() ),
+ loadMyBugs = new KAction( i18n( "Load &My Bugs List" ), 0, m_mainWidget, TQT_SLOT( slotLoadMyBugs() ),
actionCollection(), "load_my_bugs" );
- reloadall = new KAction( i18n("Load All Bug Details (for current product)"), Qt::Key_F6, m_mainWidget, SLOT( slotRetrieveAllBugDetails() ), actionCollection(), "load_allbugs" );
- new KAction( i18n("Extract &Attachments"), "filesave", Qt::Key_F4, m_mainWidget, SLOT( slotExtractAttachments() ),
+ reloadall = new KAction( i18n("Load All Bug Details (for current product)"), Qt::Key_F6, m_mainWidget, TQT_SLOT( slotRetrieveAllBugDetails() ), actionCollection(), "load_allbugs" );
+ new KAction( i18n("Extract &Attachments"), "filesave", Qt::Key_F4, m_mainWidget, TQT_SLOT( slotExtractAttachments() ),
actionCollection(), "extract_attachments" );
- new KAction( i18n("Clear Cache"), 0, this, SLOT( clearCache() ),
+ new KAction( i18n("Clear Cache"), 0, this, TQT_SLOT( clearCache() ),
actionCollection(), "clear_cache" );
new KAction( i18n("&Search by Product..."), "goto", CTRL+Qt::Key_P, this,
- SLOT( searchPackage() ), actionCollection(), "search_package" );
+ TQT_SLOT( searchPackage() ), actionCollection(), "search_package" );
new KAction( i18n("Search by Bug &Number..."), "filefind", CTRL+Qt::Key_N, this,
- SLOT( searchBugNumber() ), actionCollection(), "search_bugnumber" );
+ TQT_SLOT( searchBugNumber() ), actionCollection(), "search_bugnumber" );
// For now "Description" searches by title. Maybe later we can have a
// full-text search interfacing bugs.kde.org and rename the current one to "By Title".
new KAction( i18n("Search by &Description...") ,"find", CTRL+Qt::Key_D, this,
- SLOT( searchDescription() ), actionCollection(), "search_description" );
+ TQT_SLOT( searchDescription() ), actionCollection(), "search_description" );
// new KAction( i18n("&Merge"), "view_remove", CTRL+Qt::Key_M, m_mainWidget,
-// SLOT( mergeBugs() ), actionCollection(), "cmd_merge" );
+// TQT_SLOT( mergeBugs() ), actionCollection(), "cmd_merge" );
// new KAction( i18n("&Unmerge"), "view_top_bottom", CTRL+SHIFT+Qt::Key_M, m_mainWidget,
-// SLOT( unmergeBugs() ), actionCollection(), "cmd_unmerge" );
+// TQT_SLOT( unmergeBugs() ), actionCollection(), "cmd_unmerge" );
new KAction( i18n("C&lose..."), "edittrash", CTRL+Qt::Key_L, m_mainWidget,
- SLOT( closeBug() ), actionCollection(), "cmd_close" );
+ TQT_SLOT( closeBug() ), actionCollection(), "cmd_close" );
// new KAction( i18n("Clos&e Silently"), "edittrash", CTRL+Qt::Key_E, m_mainWidget,
-// SLOT( closeBugSilently() ), actionCollection(), "cmd_close_silently" );
+// TQT_SLOT( closeBugSilently() ), actionCollection(), "cmd_close_silently" );
new KAction( i18n("Re&open"), "idea", CTRL+Qt::Key_O, m_mainWidget,
- SLOT( reopenBug() ), actionCollection(), "cmd_reopen" );
+ TQT_SLOT( reopenBug() ), actionCollection(), "cmd_reopen" );
// new KAction( i18n("Re&assign..."), "folder_new", CTRL+Qt::Key_A, m_mainWidget,
-// SLOT( reassignBug() ), actionCollection(), "cmd_reassign" );
+// TQT_SLOT( reassignBug() ), actionCollection(), "cmd_reassign" );
// new KAction( i18n("Change &Title..."), "text_under", CTRL+Qt::Key_T, m_mainWidget,
-// SLOT( titleBug() ), actionCollection(), "cmd_title" );
+// TQT_SLOT( titleBug() ), actionCollection(), "cmd_title" );
// new KAction( i18n("Change &Severity..."), "edit", CTRL+Qt::Key_S, m_mainWidget,
-// SLOT( severityBug() ), actionCollection(), "cmd_severity" );
+// TQT_SLOT( severityBug() ), actionCollection(), "cmd_severity" );
new KAction( i18n("&Reply..."), "mail_replyall",CTRL+Qt::Key_R , m_mainWidget,
- SLOT( replyBug() ), actionCollection(), "cmd_reply" );
+ TQT_SLOT( replyBug() ), actionCollection(), "cmd_reply" );
new KAction( i18n("Reply &Privately..."), "mail_reply", CTRL+Qt::Key_I, m_mainWidget,
- SLOT( replyPrivateBug() ), actionCollection(), "cmd_replyprivate" );
+ TQT_SLOT( replyPrivateBug() ), actionCollection(), "cmd_replyprivate" );
- KStdAction::showMenubar(this, SLOT( slotToggleMenubar() ), actionCollection() );
+ KStdAction::showMenubar(this, TQT_SLOT( slotToggleMenubar() ), actionCollection() );
#if KDE_IS_VERSION( 3, 1, 90 )
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
@@ -206,7 +206,7 @@ void KBBMainWindow::initActions()
m_disconnectedAction = new KToggleAction( i18n("&Disconnected Mode"), 0,
this,
- SLOT( slotDisconnectedAction() ),
+ TQT_SLOT( slotDisconnectedAction() ),
actionCollection(),
"settings_disconnected" );
m_disconnectedAction->setChecked( BugSystem::self()->disconnected() );
@@ -215,16 +215,16 @@ void KBBMainWindow::initActions()
m_pamBookmarks = new KActionMenu( i18n( "&Bookmarks" ), "bookmark", actionCollection(), "bookmarks" );
m_pBookmarkMenu = new KBookmarkMenu( KBBBookmarkManager::self(), this, m_pamBookmarks->popupMenu(), actionCollection(), true );
- KStdAction::preferences( this, SLOT(preferences()), actionCollection() );
+ KStdAction::preferences( this, TQT_SLOT(preferences()), actionCollection() );
- KToggleAction *toggleTmp = new KToggleAction( i18n("Show Closed Bugs"), "recycled", 0, this, SLOT( slotToggleDone() ),
+ KToggleAction *toggleTmp = new KToggleAction( i18n("Show Closed Bugs"), "recycled", 0, this, TQT_SLOT( slotToggleDone() ),
actionCollection(), "cmd_toggle_done" );
#if KDE_IS_VERSION( 3, 2, 90 )
toggleTmp->setCheckedState(i18n("Hide Closed Bugs"));
#endif
toggleTmp->setChecked( KBBPrefs::instance()->mShowClosedBugs );
- toggleTmp =new KToggleAction( i18n("Show Wishes"), "bookmark", 0, this, SLOT( slotToggleWishes() ),
+ toggleTmp =new KToggleAction( i18n("Show Wishes"), "bookmark", 0, this, TQT_SLOT( slotToggleWishes() ),
actionCollection(), "cmd_toggle_wishes" );
#if KDE_IS_VERSION( 3, 2, 90 )
toggleTmp->setCheckedState(i18n("Hide Wishes"));
@@ -233,7 +233,7 @@ void KBBMainWindow::initActions()
mSelectServerAction = new KSelectAction( i18n( "Select Server" ), 0, 0,
this,
- SLOT( slotSelectServer() ),
+ TQT_SLOT( slotSelectServer() ),
actionCollection(),
"select_server" );
@@ -241,10 +241,10 @@ void KBBMainWindow::initActions()
if ( KBBPrefs::instance()->mDebugMode ) {
new KAction( i18n("Show Last Server Response..."), 0 , this,
- SLOT( showLastResponse() ), actionCollection(),
+ TQT_SLOT( showLastResponse() ), actionCollection(),
"debug_lastresponse" );
new KAction( i18n("Show Bug HTML Source..."), 0 , this,
- SLOT( showBugSource() ), actionCollection(),
+ TQT_SLOT( showBugSource() ), actionCollection(),
"debug_showbugsource" );
}
@@ -268,12 +268,12 @@ void KBBMainWindow::slotToggleMenubar()
void KBBMainWindow::setupSelectServerAction()
{
- QStringList servers;
+ TQStringList servers;
int current = -1;
- QValueList<BugServer *> serverList = BugSystem::self()->serverList();
- QValueList<BugServer *>::ConstIterator it;
+ TQValueList<BugServer *> serverList = BugSystem::self()->serverList();
+ TQValueList<BugServer *>::ConstIterator it;
for ( it = serverList.begin(); it != serverList.end(); ++it ) {
- QString name = (*it)->serverConfig().name();
+ TQString name = (*it)->serverConfig().name();
servers.append( name );
if ( name == KBBPrefs::instance()->mCurrentServer ) {
current = servers.count() - 1;
@@ -285,9 +285,9 @@ void KBBMainWindow::setupSelectServerAction()
}
}
-QString KBBMainWindow::currentURL() const
+TQString KBBMainWindow::currentURL() const
{
- QString number=m_mainWidget->currentNumber();
+ TQString number=m_mainWidget->currentNumber();
if (number.isEmpty())
return "";
@@ -295,20 +295,20 @@ QString KBBMainWindow::currentURL() const
return "bug:"+number;
}
-QString KBBMainWindow::currentTitle() const
+TQString KBBMainWindow::currentTitle() const
{
return "#"+m_mainWidget->currentNumber()+": "+m_mainWidget->currentTitle();
}
-void KBBMainWindow::openBookmarkURL( const QString & url )
+void KBBMainWindow::openBookmarkURL( const TQString & url )
{
if ( url.left(4)=="bug:" ) {
- QString bugnumber = url.mid(4);
+ TQString bugnumber = url.mid(4);
m_mainWidget->slotRetrieveBugDetails( Bug::fromNumber( bugnumber ) );
}
}
-// --- SLOT IMPLEMENTATIONS -------------------------------------------------
+// --- TQT_SLOT IMPLEMENTATIONS -------------------------------------------------
void KBBMainWindow::slotDisconnectedAction()
{
@@ -324,7 +324,7 @@ void KBBMainWindow::slotDisconnectedAction()
loadMyBugs->setEnabled( enable );
}
-void KBBMainWindow::slotStatusMsg( const QString &text )
+void KBBMainWindow::slotStatusMsg( const TQString &text )
{
// Change status message permanently
m_statusLabel->setText( text );
@@ -337,12 +337,12 @@ void KBBMainWindow::slotSubmit()
void KBBMainWindow::slotListChanges()
{
- QStringList list = BugSystem::self()->server()->listCommands();
+ TQStringList list = BugSystem::self()->server()->listCommands();
if (list.count() > 0)
{
int ret = KMessageBox::questionYesNoList( this, i18n("List of pending commands:"),
- list, QString::null, KStdGuiItem::clear(), KStdGuiItem::close() );
+ list, TQString::null, KStdGuiItem::clear(), KStdGuiItem::close() );
if ( ret == KMessageBox::Yes )
{
// Ask for confirmation, it's too easy to click the wrong button in the above dlg box
@@ -371,7 +371,7 @@ void KBBMainWindow::searchPackage()
}
mPackageSelectDialog->setPackages( BugSystem::self()->packageList() );
BugServerConfig cfg = BugSystem::self()->server()->serverConfig();
- QStringList recent = cfg.recentPackages();
+ TQStringList recent = cfg.recentPackages();
kdDebug() << "MainWindow RECENT: " << recent.join(",") << endl;
mPackageSelectDialog->setRecentPackages( recent );
@@ -382,16 +382,16 @@ void KBBMainWindow::searchPackage()
return;
}
- QString component = mPackageSelectDialog->selectedComponent();
+ TQString component = mPackageSelectDialog->selectedComponent();
m_mainWidget->slotRetrieveBugList( package.name(), component );
}
void KBBMainWindow::searchBugNumber()
{
bool ok = false;
- QString result = KInputDialog::getText( i18n("Search for Bug Number"),
+ TQString result = KInputDialog::getText( i18n("Search for Bug Number"),
i18n("Please enter a bug number:"),
- QString::null, &ok, this );
+ TQString::null, &ok, this );
if ( ok ) {
//Strip whitespace and # if needed
result = result.stripWhiteSpace();
@@ -420,7 +420,7 @@ bool KBBMainWindow::queryClose()
if ( ! BugSystem::self()->server()->commandsPending() ) return true;
int result = KMessageBox::warningYesNoCancel(this,i18n("There are unsent bug commands."
- " Do you want to send them now?"), QString::null, i18n("Send"), i18n("Do Not Send"));
+ " Do you want to send them now?"), TQString::null, i18n("Send"), i18n("Do Not Send"));
if ( result == KMessageBox::Cancel ) return false;
if ( result == KMessageBox::Yes ) {
BugSystem::self()->sendCommands();
@@ -432,10 +432,10 @@ void KBBMainWindow::preferences()
{
if (!mPreferencesDialog) {
mPreferencesDialog = new PreferencesDialog(this);
- connect( mPreferencesDialog, SIGNAL( configChanged() ),
- SLOT( setupSelectServerAction() ) );
- connect( mPreferencesDialog, SIGNAL( configChanged() ),
- m_mainWidget, SLOT( slotReloadPackage() ) );
+ connect( mPreferencesDialog, TQT_SIGNAL( configChanged() ),
+ TQT_SLOT( setupSelectServerAction() ) );
+ connect( mPreferencesDialog, TQT_SIGNAL( configChanged() ),
+ m_mainWidget, TQT_SLOT( slotReloadPackage() ) );
}
mPreferencesDialog->show();
mPreferencesDialog->raise();
@@ -462,7 +462,7 @@ void KBBMainWindow::slotSelectServer()
{
m_mainWidget->writeConfig();
- QString currentServer = mSelectServerAction->currentText();
+ TQString currentServer = mSelectServerAction->currentText();
BugSystem::self()->setCurrentServer( currentServer );