summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/centralwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kbugbuster/gui/centralwidget.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbugbuster/gui/centralwidget.cpp')
-rw-r--r--kbugbuster/gui/centralwidget.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/kbugbuster/gui/centralwidget.cpp b/kbugbuster/gui/centralwidget.cpp
index 80bd0672..f90564f1 100644
--- a/kbugbuster/gui/centralwidget.cpp
+++ b/kbugbuster/gui/centralwidget.cpp
@@ -14,10 +14,10 @@
*************************************************************************
*/
-#include <qsplitter.h>
-#include <qpushbutton.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
+#include <tqsplitter.h>
+#include <tqpushbutton.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <kdebug.h>
@@ -46,20 +46,20 @@
using namespace KBugBusterMainWindow;
-CentralWidget::CentralWidget( const QCString &initialPackage,
- const QCString &initialComponent,
- const QCString &initialBug, QWidget *parent,
+CentralWidget::CentralWidget( const TQCString &initialPackage,
+ const TQCString &initialComponent,
+ const TQCString &initialBug, TQWidget *parent,
const char * name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
// Master layout
- ( new QVBoxLayout( this, 0,
+ ( new TQVBoxLayout( this, 0,
KDialog::spacingHint() ) )->setAutoAdd( true );
- // Create QSplitter children
- m_vertSplitter = new QSplitter( QSplitter::Vertical, this );
+ // Create TQSplitter children
+ m_vertSplitter = new TQSplitter( TQSplitter::Vertical, this );
m_listPane = new CWBugListContainer( m_vertSplitter );
- m_horSplitter = new QSplitter( QSplitter::Horizontal,m_vertSplitter );
+ m_horSplitter = new TQSplitter( TQSplitter::Horizontal,m_vertSplitter );
// The search pane isn't used. Should we remove the code?
m_searchPane = new CWSearchWidget( m_horSplitter );
m_bugPane = new CWBugDetailsContainer( m_horSplitter );
@@ -67,55 +67,55 @@ CentralWidget::CentralWidget( const QCString &initialPackage,
m_searchPane->hide();
// m_listPane->hide();
- m_searchPane->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
- m_horSplitter->setResizeMode( m_searchPane, QSplitter::FollowSizeHint );
+ m_searchPane->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
+ m_horSplitter->setResizeMode( m_searchPane, TQSplitter::FollowSizeHint );
- connect( m_listPane, SIGNAL( resetProgressBar() ),
- SIGNAL( resetProgressBar() ) );
- connect( m_bugPane, SIGNAL( resetProgressBar() ),
- SIGNAL( resetProgressBar() ) );
+ connect( m_listPane, TQT_SIGNAL( resetProgressBar() ),
+ TQT_SIGNAL( resetProgressBar() ) );
+ connect( m_bugPane, TQT_SIGNAL( resetProgressBar() ),
+ TQT_SIGNAL( resetProgressBar() ) );
// Start the proper jobs for loading the package lists
connect( BugSystem::self(),
- SIGNAL( packageListAvailable( const Package::List & ) ),
- SLOT( updatePackageList( const Package::List & ) ) );
+ TQT_SIGNAL( packageListAvailable( const Package::List & ) ),
+ TQT_SLOT( updatePackageList( const Package::List & ) ) );
connect( BugSystem::self(),
- SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ),
- SLOT( updateBugList( const Package &, const QString &, const Bug::List & ) ) );
+ TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ),
+ TQT_SLOT( updateBugList( const Package &, const TQString &, const Bug::List & ) ) );
connect( BugSystem::self(),
- SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ),
- SLOT( updateBugList( const QString &, const Bug::List & ) ) );
+ TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ),
+ TQT_SLOT( updateBugList( const TQString &, const Bug::List & ) ) );
connect( BugSystem::self(),
- SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
- SLOT( updateBugDetails( const Bug &, const BugDetails & ) ) );
+ TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
+ TQT_SLOT( updateBugDetails( const Bug &, const BugDetails & ) ) );
- connect( BugSystem::self(), SIGNAL( loadingError( const QString & ) ),
- SLOT( showLoadingError( const QString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( loadingError( const TQString & ) ),
+ TQT_SLOT( showLoadingError( const TQString & ) ) );
- connect( m_bugPane, SIGNAL( signalCloseBug() ), SLOT( closeBug() ) );
- connect( m_bugPane, SIGNAL( signalCloseBugSilently() ), SLOT( closeBugSilently() ) );
- connect( m_bugPane, SIGNAL( signalReopenBug() ), SLOT( reopenBug() ) );
- connect( m_bugPane, SIGNAL( signalReassignBug() ), SLOT( reassignBug() ) );
- connect( m_bugPane, SIGNAL( signalTitleBug() ), SLOT( titleBug() ) );
- connect( m_bugPane, SIGNAL( signalSeverityBug() ), SLOT( severityBug() ) );
- connect( m_bugPane, SIGNAL( signalReplyBug() ), SLOT( replyBug() ) );
- connect( m_bugPane, SIGNAL( signalReplyPrivateBug() ), SLOT( replyPrivateBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalCloseBug() ), TQT_SLOT( closeBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalCloseBugSilently() ), TQT_SLOT( closeBugSilently() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReopenBug() ), TQT_SLOT( reopenBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReassignBug() ), TQT_SLOT( reassignBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalTitleBug() ), TQT_SLOT( titleBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalSeverityBug() ), TQT_SLOT( severityBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReplyBug() ), TQT_SLOT( replyBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReplyPrivateBug() ), TQT_SLOT( replyPrivateBug() ) );
- connect( m_bugPane, SIGNAL( signalClearCommand() ), SLOT( clearCommand() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalClearCommand() ), TQT_SLOT( clearCommand() ) );
// Add the selection slots for the listviews
connect( m_searchPane->m_searchPackages,
- SIGNAL( activated( const QString & ) ),
- SLOT( slotRetrieveBugList( const QString & ) ) );
+ TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_SLOT( slotRetrieveBugList( const TQString & ) ) );
- connect( m_listPane, SIGNAL( executed( const Bug & ) ),
- SLOT( slotRetrieveBugDetails( const Bug & ) ) );
- connect( m_listPane, SIGNAL( currentChanged( const Bug & ) ),
- SLOT( slotSetActiveBug( const Bug & ) ) );
+ connect( m_listPane, TQT_SIGNAL( executed( const Bug & ) ),
+ TQT_SLOT( slotRetrieveBugDetails( const Bug & ) ) );
+ connect( m_listPane, TQT_SIGNAL( currentChanged( const Bug & ) ),
+ TQT_SLOT( slotSetActiveBug( const Bug & ) ) );
- connect( m_listPane, SIGNAL( searchPackage() ), SIGNAL( searchPackage() ) );
- connect( m_bugPane, SIGNAL( searchBugNumber() ), SIGNAL( searchBugNumber() ) );
+ connect( m_listPane, TQT_SIGNAL( searchPackage() ), TQT_SIGNAL( searchPackage() ) );
+ connect( m_bugPane, TQT_SIGNAL( searchBugNumber() ), TQT_SIGNAL( searchBugNumber() ) );
m_bLoadingAllBugs = false;
@@ -127,15 +127,15 @@ CentralWidget::~CentralWidget()
// kdDebug() << "CentralWidget::~CentralWidget()" << endl;
}
-void CentralWidget::initialize( const QString& p, const QString &c, const QString& b )
+void CentralWidget::initialize( const TQString& p, const TQString &c, const TQString& b )
{
// kdDebug() << "CentralWidget::initialize(): package: '" << p
// << "' bug: '" << b << "'" << endl;
BugServerConfig cfg = BugSystem::self()->server()->serverConfig();
- QString package = p.isEmpty() ? cfg.currentPackage() : p;
- QString bug = b.isEmpty() ? cfg.currentBug() : b;
- QString component = c.isEmpty() ? cfg.currentComponent() : c;
+ TQString package = p.isEmpty() ? cfg.currentPackage() : p;
+ TQString bug = b.isEmpty() ? cfg.currentBug() : b;
+ TQString component = c.isEmpty() ? cfg.currentComponent() : c;
m_listPane->setNoList();
m_bugPane->setNoBug();
@@ -170,8 +170,8 @@ void CentralWidget::writeConfig()
{
#if 0
kdDebug() << "m_vertSplitter" << endl;
- QValueList<int> sizes = m_vertSplitter->sizes();
- QValueList<int>::ConstIterator it;
+ TQValueList<int> sizes = m_vertSplitter->sizes();
+ TQValueList<int>::ConstIterator it;
for( it = sizes.begin(); it != sizes.end(); ++it ) {
kdDebug() << " " << (*it) << endl;
}
@@ -186,12 +186,12 @@ void CentralWidget::writeConfig()
server->serverConfig().setCurrentBug( m_currentBug.number() );
}
-void CentralWidget::slotRetrieveBugList( const QString &package )
+void CentralWidget::slotRetrieveBugList( const TQString &package )
{
- slotRetrieveBugList( package, QString::null );
+ slotRetrieveBugList( package, TQString::null );
}
-void CentralWidget::slotRetrieveBugList( const QString &p, const QString &component )
+void CentralWidget::slotRetrieveBugList( const TQString &p, const TQString &component )
{
if ( p.isEmpty() ) return;
@@ -212,7 +212,7 @@ void CentralWidget::slotRetrieveBugList( const QString &p, const QString &compon
BugSystem::self()->retrieveBugList( m_currentPackage, m_currentComponent );
}
-QString CentralWidget::currentNumber() const
+TQString CentralWidget::currentNumber() const
{
if( m_currentBug.isNull() )
return "";
@@ -220,7 +220,7 @@ QString CentralWidget::currentNumber() const
return m_currentBug.number();
}
-QString CentralWidget::currentTitle() const
+TQString CentralWidget::currentTitle() const
{
if( m_currentBug.isNull() )
return "";
@@ -278,12 +278,12 @@ void CentralWidget::updatePackageList( const Package::List &pkgs )
*/
}
-void CentralWidget::updateBugList( const Package &pkg, const QString &component, const Bug::List &bugs )
+void CentralWidget::updateBugList( const Package &pkg, const TQString &component, const Bug::List &bugs )
{
m_listPane->setBugList( pkg, component, bugs );
}
-void CentralWidget::updateBugList( const QString &label, const Bug::List &bugs )
+void CentralWidget::updateBugList( const TQString &label, const Bug::List &bugs )
{
m_listPane->setBugList( label, bugs );
}
@@ -333,21 +333,21 @@ void CentralWidget::slotExtractAttachments()
if (!m_currentBug.isNull()) {
// Grab bug details (i.e. full-text) from cache, then extract attachments from it
BugDetails details = BugSystem::self()->cache()->loadBugDetails( m_currentBug );
- QValueList<BugDetails::Attachment> attachments = details.extractAttachments();
+ TQValueList<BugDetails::Attachment> attachments = details.extractAttachments();
if ( !attachments.isEmpty() )
{
- QStringList fileList;
- for ( QValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
+ TQStringList fileList;
+ for ( TQValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
{
// Handle duplicates
if ( fileList.contains( (*it).filename ) )
{
int n = 2; // looks stupid to have "blah" and "1-blah", start at 2
- QString fn = QString::number(n) + '-' + (*it).filename;
+ TQString fn = TQString::number(n) + '-' + (*it).filename;
while ( fileList.contains( fn ) )
{
++n;
- fn = QString::number(n) + '-' + (*it).filename;
+ fn = TQString::number(n) + '-' + (*it).filename;
}
(*it).filename = fn;
}
@@ -356,18 +356,18 @@ void CentralWidget::slotExtractAttachments()
int res = KMessageBox::questionYesNoList( this,
i18n("Found the following attachments. Save?"),
- fileList, QString::null, KStdGuiItem::save(), KStdGuiItem::dontSave() );
+ fileList, TQString::null, KStdGuiItem::save(), KStdGuiItem::dontSave() );
if ( res == KMessageBox::No )
return;
- QString dir = KFileDialog::getExistingDirectory( QString::null, this, i18n("Select Folder Where to Save Attachments") );
+ TQString dir = KFileDialog::getExistingDirectory( TQString::null, this, i18n("Select Folder Where to Save Attachments") );
if ( !dir.isEmpty() )
{
if ( !dir.endsWith( "/" ) )
dir += '/';
- for ( QValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
+ for ( TQValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
{
- QString filename = m_currentBug.number() + '-' + (*it).filename;
- QFile file( dir + filename );
+ TQString filename = m_currentBug.number() + '-' + (*it).filename;
+ TQFile file( dir + filename );
if ( file.open( IO_WriteOnly ) )
file.writeBlock( (*it).contents );
else
@@ -381,7 +381,7 @@ void CentralWidget::slotExtractAttachments()
void CentralWidget::mergeBugs()
{
- QStringList bugNumbers = m_listPane->selectedBugs();
+ TQStringList bugNumbers = m_listPane->selectedBugs();
if ( bugNumbers.count() >= 2 ) {
BugSystem::self()->queueCommand(
new BugCommandMerge( bugNumbers, m_currentPackage ) );
@@ -436,7 +436,7 @@ void CentralWidget::reassignBug()
void CentralWidget::titleBug()
{
bool ok = false;
- QString title = KInputDialog::getText( i18n("Change Bug Title"),
+ TQString title = KInputDialog::getText( i18n("Change Bug Title"),
i18n( "Please enter a new title:" ),
m_currentBug.title(), &ok, this );
if ( ok && !title.isEmpty() ) {
@@ -450,7 +450,7 @@ void CentralWidget::severityBug()
SeveritySelectDialog *dlg = new SeveritySelectDialog( this );
dlg->setSeverity( m_currentBug.severity() );
int result = dlg->exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
BugSystem::self()->queueCommand(
new BugCommandSeverity( m_currentBug,
dlg->selectedSeverityAsString(), m_currentPackage ) );
@@ -478,7 +478,7 @@ void CentralWidget::clearCommand()
BugSystem::self()->clearCommands( m_currentBug.number() );
}
-void CentralWidget::searchBugByTitle( int options, const QString& pattern )
+void CentralWidget::searchBugByTitle( int options, const TQString& pattern )
{
m_listPane->searchBugByTitle( options, pattern );
}
@@ -492,7 +492,7 @@ void CentralWidget::slotRetrieveAllBugDetails()
m_bLoadingAllBugs = false;
}
-void CentralWidget::showLoadingError( const QString &text )
+void CentralWidget::showLoadingError( const TQString &text )
{
KMessageBox::error( this, text );
}