diff options
Diffstat (limited to 'kandy/src/kandyview.cpp')
-rw-r--r-- | kandy/src/kandyview.cpp | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/kandy/src/kandyview.cpp b/kandy/src/kandyview.cpp index 5b9f06194..27d3b7b6b 100644 --- a/kandy/src/kandyview.cpp +++ b/kandy/src/kandyview.cpp @@ -24,19 +24,19 @@ #include <unistd.h> -#include <qpainter.h> -#include <qlayout.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qtextedit.h> -#include <qlistview.h> -#include <qdom.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqtextedit.h> +#include <tqlistview.h> +#include <tqdom.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <kurl.h> #include <kmessagebox.h> @@ -57,90 +57,90 @@ #include "kandyview.h" #include "kandyview.moc" -KandyView::KandyView(CommandScheduler *scheduler,QWidget *parent) - : QWidget(parent) +KandyView::KandyView(CommandScheduler *scheduler,TQWidget *parent) + : TQWidget(parent) { mModified = false; mScheduler = scheduler; - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); - QSplitter *mainSplitter = new QSplitter( Horizontal, this ); + TQSplitter *mainSplitter = new TQSplitter( Horizontal, this ); topLayout->addWidget( mainSplitter ); - QWidget *commandBox = new QWidget( mainSplitter ); + TQWidget *commandBox = new TQWidget( mainSplitter ); - QBoxLayout *commandLayout = new QVBoxLayout( commandBox ); + TQBoxLayout *commandLayout = new TQVBoxLayout( commandBox ); commandLayout->setMargin( KDialog::marginHint() ); commandLayout->setSpacing( KDialog::spacingHint() ); - mCommandList = new QListView( commandBox ); + mCommandList = new TQListView( commandBox ); mCommandList->addColumn( i18n( "Name" ) ); mCommandList->addColumn( i18n( "Command" ) ); mCommandList->addColumn( i18n( "Hex" ) ); commandLayout->addWidget( mCommandList ); - connect( mCommandList, SIGNAL( doubleClicked(QListViewItem*) ), - SLOT( executeCommand() ) ); + connect( mCommandList, TQT_SIGNAL( doubleClicked(TQListViewItem*) ), + TQT_SLOT( executeCommand() ) ); - QPushButton *buttonAdd = new QPushButton( i18n("Add..."), commandBox ); + TQPushButton *buttonAdd = new TQPushButton( i18n("Add..."), commandBox ); commandLayout->addWidget( buttonAdd ); - connect( buttonAdd, SIGNAL( clicked() ), SLOT( addCommand() ) ); + connect( buttonAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( addCommand() ) ); - QPushButton *buttonEdit = new QPushButton( i18n("Edit..."), commandBox ); + TQPushButton *buttonEdit = new TQPushButton( i18n("Edit..."), commandBox ); commandLayout->addWidget( buttonEdit ); - connect( buttonEdit, SIGNAL( clicked() ), SLOT( editCommand() ) ); + connect( buttonEdit, TQT_SIGNAL( clicked() ), TQT_SLOT( editCommand() ) ); - QPushButton *buttonDelete = new QPushButton( i18n("Delete"), commandBox ); + TQPushButton *buttonDelete = new TQPushButton( i18n("Delete"), commandBox ); commandLayout->addWidget( buttonDelete ); - connect( buttonDelete, SIGNAL( clicked() ), SLOT( deleteCommand() ) ); + connect( buttonDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( deleteCommand() ) ); - QPushButton *buttonExecute = new QPushButton( i18n("Execute"), commandBox ); + TQPushButton *buttonExecute = new TQPushButton( i18n("Execute"), commandBox ); commandLayout->addWidget( buttonExecute ); - connect( buttonExecute, SIGNAL( clicked() ), SLOT( executeCommand() ) ); + connect( buttonExecute, TQT_SIGNAL( clicked() ), TQT_SLOT( executeCommand() ) ); - QSplitter *ioSplitter = new QSplitter( Vertical, mainSplitter ); + TQSplitter *ioSplitter = new TQSplitter( Vertical, mainSplitter ); - QWidget *inBox = new QWidget( ioSplitter ); + TQWidget *inBox = new TQWidget( ioSplitter ); - QBoxLayout *inLayout = new QVBoxLayout( inBox ); + TQBoxLayout *inLayout = new TQVBoxLayout( inBox ); - QLabel *inLabel = new QLabel( i18n("Input:"), inBox ); + TQLabel *inLabel = new TQLabel( i18n("Input:"), inBox ); inLabel->setMargin( 2 ); inLayout->addWidget( inLabel ); - mInput = new QTextEdit( inBox ); + mInput = new TQTextEdit( inBox ); inLayout->addWidget( mInput ); - QWidget *outBox = new QWidget( ioSplitter ); + TQWidget *outBox = new TQWidget( ioSplitter ); - QBoxLayout *outLayout = new QVBoxLayout( outBox ); + TQBoxLayout *outLayout = new TQVBoxLayout( outBox ); - QLabel *outLabel = new QLabel( i18n( "Output:"), outBox ); + TQLabel *outLabel = new TQLabel( i18n( "Output:"), outBox ); outLabel->setMargin( 2 ); outLayout->addWidget( outLabel ); - mOutput = new QTextEdit( outBox ); + mOutput = new TQTextEdit( outBox ); mOutput->setReadOnly( true ); outLayout->addWidget( mOutput ); - QVBox *resultBox = new QVBox( mainSplitter ); + TQVBox *resultBox = new TQVBox( mainSplitter ); - QLabel *resultLabel = new QLabel( i18n("Result:"), resultBox ); + TQLabel *resultLabel = new TQLabel( i18n("Result:"), resultBox ); resultLabel->setMargin( 2 ); - mResultView = new QTextEdit( resultBox ); + mResultView = new TQTextEdit( resultBox ); mResultView->setReadOnly( true ); - connect (mInput,SIGNAL(returnPressed()),SLOT(processLastLine())); + connect (mInput,TQT_SIGNAL(returnPressed()),TQT_SLOT(processLastLine())); - connect(mScheduler->modem(),SIGNAL(gotLine(const char *)), - SLOT(appendOutput(const char *))); + connect(mScheduler->modem(),TQT_SIGNAL(gotLine(const char *)), + TQT_SLOT(appendOutput(const char *))); - connect(mScheduler,SIGNAL(result(const QString &)), - mResultView,SLOT(setText(const QString &))); - connect(mScheduler,SIGNAL(commandProcessed(ATCommand *)), - SLOT(setResult(ATCommand *))); + connect(mScheduler,TQT_SIGNAL(result(const TQString &)), + mResultView,TQT_SLOT(setText(const TQString &))); + connect(mScheduler,TQT_SIGNAL(commandProcessed(ATCommand *)), + TQT_SLOT(setResult(ATCommand *))); } KandyView::~KandyView() @@ -148,7 +148,7 @@ KandyView::~KandyView() } -void KandyView::print(QPainter *, int, int) +void KandyView::print(TQPainter *, int, int) { // do the actual printing, here // p->drawText(etc..) @@ -158,12 +158,12 @@ void KandyView::importPhonebook() { #if 0 createMobileGui(); - connect (mMobileGui,SIGNAL(phonebookRead()),mMobileGui,SLOT(writeKab())); + connect (mMobileGui,TQT_SIGNAL(phonebookRead()),mMobileGui,TQT_SLOT(writeKab())); mMobileGui->readPhonebook(); #endif } -void KandyView::slotSetTitle(const QString& title) +void KandyView::slotSetTitle(const TQString& title) { emit signalChangeCaption(title); } @@ -212,7 +212,7 @@ void KandyView::addCommand() int result = dlg->exec(); - if (result == QDialog::Accepted) { + if (result == TQDialog::Accepted) { new CommandItem(mCommandList,cmd); mScheduler->commandSet()->addCommand(cmd); setModified(); @@ -223,7 +223,7 @@ void KandyView::addCommand() void KandyView::editCommand() { - QListViewItem *item = mCommandList->currentItem(); + TQListViewItem *item = mCommandList->currentItem(); if (item) { CommandItem *cmdItem = (CommandItem *)item; ATCommand *cmd = cmdItem->command(); @@ -232,7 +232,7 @@ void KandyView::editCommand() int result = dlg->exec(); - if (result == QDialog::Accepted) { + if (result == TQDialog::Accepted) { cmdItem->setItemText(); setModified(); } @@ -244,13 +244,13 @@ void KandyView::executeCommand() CommandItem *item = (CommandItem *)(mCommandList->currentItem()); if (item) { ATCommand *cmd = item->command(); - QPtrList<ATParameter> paraList = cmd->parameters(); + TQPtrList<ATParameter> paraList = cmd->parameters(); for(uint i=0;i<paraList.count();++i) { ATParameter *p = paraList.at(i); if (p->userInput()) { bool ok = false; - QString value = KInputDialog::getText(QString::null, - i18n("Enter value for %1:").arg(p->name()),QString::null,&ok,this); + TQString value = KInputDialog::getText(TQString::null, + i18n("Enter value for %1:").arg(p->name()),TQString::null,&ok,this); if (!ok) return; p->setValue(value); @@ -271,13 +271,13 @@ void KandyView::deleteCommand() } } -bool KandyView::loadFile(const QString& filename) +bool KandyView::loadFile(const TQString& filename) { mCommandList->clear(); if (!mScheduler->loadProfile(filename)) return false; - QPtrList<ATCommand> *cmds = mScheduler->commandSet()->commandList(); + TQPtrList<ATCommand> *cmds = mScheduler->commandSet()->commandList(); for(uint i=0;i<cmds->count();++i) { new CommandItem(mCommandList,cmds->at(i)); @@ -292,7 +292,7 @@ bool KandyView::loadFile(const QString& filename) return true; } -bool KandyView::saveFile(const QString& filename) +bool KandyView::saveFile(const TQString& filename) { if (!mScheduler->saveProfile(filename)) return false; |