diff options
Diffstat (limited to 'kgoldrunner/src/kgrdialog.cpp')
-rw-r--r-- | kgoldrunner/src/kgrdialog.cpp | 282 |
1 files changed, 141 insertions, 141 deletions
diff --git a/kgoldrunner/src/kgrdialog.cpp b/kgoldrunner/src/kgrdialog.cpp index 61ca2f29..632eb617 100644 --- a/kgoldrunner/src/kgrdialog.cpp +++ b/kgoldrunner/src/kgrdialog.cpp @@ -28,14 +28,14 @@ #ifdef KGR_PORTABLE KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, - QPtrList<KGrCollection> & gamesList, KGrGame * theGame, - QWidget * parent, const char * name) - : QDialog (parent, name, TRUE, + TQPtrList<KGrCollection> & gamesList, KGrGame * theGame, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, - QPtrList<KGrCollection> & gamesList, KGrGame * theGame, - QWidget * parent, const char * name) + TQPtrList<KGrCollection> & gamesList, KGrGame * theGame, + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Select Game"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help, KDialogBase::Ok, parent, name) @@ -52,66 +52,66 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, #ifdef KGR_PORTABLE int margin = 10; int spacing = 10; - QWidget * dad = this; + TQWidget * dad = this; #else int margin = marginHint(); int spacing = spacingHint(); - QWidget * dad = plainPage(); + TQWidget * dad = plainPage(); #endif - QVBoxLayout * mainLayout = new QVBoxLayout (dad, margin, spacing); + TQVBoxLayout * mainLayout = new TQVBoxLayout (dad, margin, spacing); - collnL = new QLabel (i18n("List of games:"), dad); + collnL = new TQLabel (i18n("List of games:"), dad); mainLayout->addWidget (collnL); - colln = new QListBox (dad); + colln = new TQListBox (dad); mainLayout->addWidget (colln); - QHBox * gameInfo = new QHBox (dad); + TQHBox * gameInfo = new TQHBox (dad); mainLayout->addWidget (gameInfo); gameInfo->setSpacing (spacing); - collnN = new QLabel ("", gameInfo); // Name of selected collection. - QFont f = collnN->font(); + collnN = new TQLabel ("", gameInfo); // Name of selected collection. + TQFont f = collnN->font(); f.setBold (TRUE); collnN->setFont (f); - collnA = new QPushButton (i18n("More Info"), gameInfo); + collnA = new TQPushButton (i18n("More Info"), gameInfo); - collnD = new QLabel ("", dad); // Description of collection. + collnD = new TQLabel ("", dad); // Description of collection. mainLayout->addWidget (collnD); - QFrame * separator = new QFrame (dad); - separator->setFrameStyle (QFrame::HLine + QFrame::Sunken); + TQFrame * separator = new TQFrame (dad); + separator->setFrameStyle (TQFrame::HLine + TQFrame::Sunken); mainLayout->addWidget (separator); if ((action == SL_START) || (action == SL_UPD_GAME)) { dad-> setCaption (i18n("Select Game")); - QLabel * startMsg = new QLabel + TQLabel * startMsg = new QLabel ("<b>" + i18n("Level 1 of the selected game is:") + "</b>", dad); mainLayout->addWidget (startMsg); } else { dad-> setCaption (i18n("Select Game/Level")); - QLabel * selectLev = new QLabel (i18n("Select level:"), dad); + TQLabel * selectLev = new TQLabel (i18n("Select level:"), dad); mainLayout->addWidget (selectLev); } - QGridLayout * grid = new QGridLayout (3, 2, -1); + TQGridLayout * grid = new TQGridLayout (3, 2, -1); mainLayout->addLayout (grid); // Initial range 1->150, small step 1, big step 10 and default value 1. - number = new QScrollBar (1, 150, 1, 10, 1, - QScrollBar::Horizontal, dad); + number = new TQScrollBar (1, 150, 1, 10, 1, + TQScrollBar::Horizontal, dad); grid->addWidget (number, 1, 1); - QHBox * numberPair = new QHBox (dad); + TQHBox * numberPair = new TQHBox (dad); grid->addWidget (numberPair, 2, 1); numberPair->setSpacing (spacing); - numberL = new QLabel (i18n("Level number:"), numberPair); - display = new QLineEdit (numberPair); + numberL = new TQLabel (i18n("Level number:"), numberPair); + display = new TQLineEdit (numberPair); - levelNH = new QPushButton (i18n("Edit Level Name && Hint"), dad); + levelNH = new TQPushButton (i18n("Edit Level Name && Hint"), dad); mainLayout->addWidget (levelNH); - slName = new QLabel ("", dad); + slName = new TQLabel ("", dad); grid->addWidget (slName, 3, 1); thumbNail = new KGrThumbNail (dad); grid->addMultiCellWidget (thumbNail, 1, 3, 2, 2); @@ -122,15 +122,15 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, thumbNail-> setFixedHeight ((FIELDHEIGHT * cellSize) + 2); #ifdef KGR_PORTABLE - QHBox * buttons = new QHBox (this); + TQHBox * buttons = new TQHBox (this); mainLayout->addWidget (buttons); buttons->setSpacing (spacing); // Buttons are for Qt-only portability. NOT COMPILED in KDE environment. - HELP = new QPushButton (i18n("Help"), buttons); - OK = new QPushButton (i18n("&OK"), buttons); - CANCEL = new QPushButton (i18n("&Cancel"), buttons); + HELP = new TQPushButton (i18n("Help"), buttons); + OK = new TQPushButton (i18n("&OK"), buttons); + CANCEL = new TQPushButton (i18n("&Cancel"), buttons); - QPoint p = parent->mapToGlobal (QPoint (0,0)); + TQPoint p = parent->mapToGlobal (TQPoint (0,0)); // Base the geometry of the dialog box on the playing area. int cell = parent->width() / (FIELDWIDTH + 4); @@ -149,7 +149,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, slSetCollections (defaultGame); // Vary the dialog according to the action. - QString OKText = ""; + TQString OKText = ""; switch (slAction) { case SL_START: // Must start at level 1, but can choose a collection. OKText = i18n("Start Game"); @@ -208,41 +208,41 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, } // Paint a thumbnail sketch of the level. - thumbNail->setFrameStyle (QFrame::Box | QFrame::Plain); + thumbNail->setFrameStyle (TQFrame::Box | TQFrame::Plain); thumbNail->setLineWidth (1); slPaintLevel(); thumbNail->show(); - connect (colln, SIGNAL (highlighted (int)), this, SLOT (slColln (int))); - connect (collnA, SIGNAL (clicked ()), this, SLOT (slAboutColln ())); + connect (colln, TQT_SIGNAL (highlighted (int)), this, TQT_SLOT (slColln (int))); + connect (collnA, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slAboutColln ())); - connect (display, SIGNAL (textChanged (const QString &)), - this, SLOT (slUpdate (const QString &))); + connect (display, TQT_SIGNAL (textChanged (const TQString &)), + this, TQT_SLOT (slUpdate (const TQString &))); - connect (number, SIGNAL (valueChanged(int)), this, SLOT(slShowLevel(int))); + connect (number, TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT(slShowLevel(int))); // Only enable name and hint dialog here if saving a new or edited level. // At other times the name and hint have not been loaded or initialised yet. if ((slAction == SL_CREATE) || (slAction == SL_SAVE)) { - connect (levelNH, SIGNAL (clicked()), game, SLOT (editNameAndHint())); + connect (levelNH, TQT_SIGNAL (clicked()), game, TQT_SLOT (editNameAndHint())); } else { levelNH->setEnabled (FALSE); levelNH->hide(); } - connect (colln, SIGNAL (highlighted (int)), this, SLOT (slPaintLevel ())); - connect (number, SIGNAL (sliderReleased()), this, SLOT (slPaintLevel())); - connect (number, SIGNAL (nextLine()), this, SLOT (slPaintLevel())); - connect (number, SIGNAL (prevLine()), this, SLOT (slPaintLevel())); - connect (number, SIGNAL (nextPage()), this, SLOT (slPaintLevel())); - connect (number, SIGNAL (prevPage()), this, SLOT (slPaintLevel())); + connect (colln, TQT_SIGNAL (highlighted (int)), this, TQT_SLOT (slPaintLevel ())); + connect (number, TQT_SIGNAL (sliderReleased()), this, TQT_SLOT (slPaintLevel())); + connect (number, TQT_SIGNAL (nextLine()), this, TQT_SLOT (slPaintLevel())); + connect (number, TQT_SIGNAL (prevLine()), this, TQT_SLOT (slPaintLevel())); + connect (number, TQT_SIGNAL (nextPage()), this, TQT_SLOT (slPaintLevel())); + connect (number, TQT_SIGNAL (prevPage()), this, TQT_SLOT (slPaintLevel())); #ifdef KGR_PORTABLE // Set the exits from this dialog box. - connect (OK, SIGNAL (clicked ()), this, SLOT (accept ())); - connect (CANCEL, SIGNAL (clicked ()), this, SLOT (reject ())); - connect (HELP, SIGNAL (clicked ()), this, SLOT (slotHelp ())); + connect (OK, TQT_SIGNAL (clicked ()), this, TQT_SLOT (accept ())); + connect (CANCEL, TQT_SIGNAL (clicked ()), this, TQT_SLOT (reject ())); + connect (HELP, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotHelp ())); #endif } @@ -343,7 +343,7 @@ void KGrSLDialog::slColln (int i) collnD->setText (i18n("1 level, uses Traditional rules.", "%n levels, uses Traditional rules.", levCnt)); #else - QString levCnt; + TQString levCnt; levCnt = levCnt.setNum (collections.at(n)->nLevels); if (collections.at(n)->settings == 'K') collnD->setText (levCnt + i18n(" levels, uses KGoldrunner rules.")); @@ -373,16 +373,16 @@ void KGrSLDialog::slAboutColln () void KGrSLDialog::slShowLevel (int i) { // Display the level number as the slider is moved. - QString tmp; + TQString tmp; tmp.setNum(i); tmp = tmp.rightJustify(3,'0'); display->setText(tmp); } -void KGrSLDialog::slUpdate (const QString & text) +void KGrSLDialog::slUpdate (const TQString & text) { // Move the slider when a valid level number is entered. - QString s = text; + TQString s = text; bool ok = FALSE; int n = s.toInt (&ok); if (ok) { @@ -410,7 +410,7 @@ void KGrSLDialog::slPaintLevel () void KGrSLDialog::slotHelp () { // Help for "Select Game and Level" dialog box. - QString s = + TQString s = i18n("The main button at the bottom echoes the " "menu action you selected. Click it after choosing " "a game and level - or use \"Cancel\"."); @@ -485,13 +485,13 @@ void KGrSLDialog::slotHelp () *******************************************************************************/ #ifdef KGR_PORTABLE -KGrNHDialog::KGrNHDialog(const QString & levelName, const QString & levelHint, - QWidget * parent, const char * name) - : QDialog (parent, name, TRUE, +KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else -KGrNHDialog::KGrNHDialog(const QString & levelName, const QString & levelHint, - QWidget * parent, const char * name) +KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Edit Name & Hint"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name) @@ -500,45 +500,45 @@ KGrNHDialog::KGrNHDialog(const QString & levelName, const QString & levelHint, #ifdef KGR_PORTABLE int margin = 10; int spacing = 10; - QWidget * dad = this; + TQWidget * dad = this; #else int margin = marginHint(); int spacing = spacingHint(); - QWidget * dad = plainPage(); + TQWidget * dad = plainPage(); #endif - QVBoxLayout * mainLayout = new QVBoxLayout (dad, margin, spacing); + TQVBoxLayout * mainLayout = new TQVBoxLayout (dad, margin, spacing); - QLabel * nameL = new QLabel (i18n("Name of level:"), dad); + TQLabel * nameL = new TQLabel (i18n("Name of level:"), dad); mainLayout->addWidget (nameL); - nhName = new QLineEdit (dad); + nhName = new TQLineEdit (dad); mainLayout->addWidget (nhName); - QLabel * mleL = new QLabel (i18n("Hint for level:"), dad); + TQLabel * mleL = new TQLabel (i18n("Hint for level:"), dad); mainLayout->addWidget (mleL); // Set up a widget to hold the wrapped text, using \n for paragraph breaks. #ifdef QT3 - mle = new QTextEdit (dad); + mle = new TQTextEdit (dad); mle-> setTextFormat (PlainText); #else - mle = new QMultiLineEdit (dad); + mle = new TQMultiLineEdit (dad); #endif mainLayout->addWidget (mle); #ifdef KGR_PORTABLE - QHBox * buttons = new QHBox (dad); + TQHBox * buttons = new TQHBox (dad); mainLayout->addWidget (buttons); buttons->setSpacing (spacing); // Buttons are for Qt-only portability. NOT COMPILED in KDE environment. - QPushButton * OK = new QPushButton (i18n("&OK"), buttons); - QPushButton * CANCEL = new QPushButton (i18n("&Cancel"), buttons); + TQPushButton * OK = new TQPushButton (i18n("&OK"), buttons); + TQPushButton * CANCEL = new TQPushButton (i18n("&Cancel"), buttons); dad-> setCaption (i18n("Edit Name & Hint")); #endif // Base the geometry of the text box on the playing area. - QPoint p = parent->mapToGlobal (QPoint (0,0)); + QPoint p = parent->mapToGlobal (TQPoint (0,0)); int c = parent->width() / (FIELDWIDTH + 4); dad-> move (p.x()+4*c, p.y()+4*c); mle-> setMinimumSize ((FIELDWIDTH*c/2), (FIELDHEIGHT/2)*c); @@ -546,7 +546,7 @@ KGrNHDialog::KGrNHDialog(const QString & levelName, const QString & levelHint, // Configure the text box. mle-> setAlignment (AlignLeft); #ifndef QT3 - mle-> setWordWrap (QMultiLineEdit::WidgetWidth); + mle-> setWordWrap (TQMultiLineEdit::WidgetWidth); mle-> setFixedVisibleLines (9); #endif @@ -557,8 +557,8 @@ KGrNHDialog::KGrNHDialog(const QString & levelName, const QString & levelHint, // OK-> setAccel (Key_Return); // No! We need it in "mle" box. CANCEL-> setAccel (Key_Escape); - connect (OK, SIGNAL (clicked ()), dad, SLOT (accept ())); - connect (CANCEL, SIGNAL (clicked ()), dad, SLOT (reject ())); + connect (OK, TQT_SIGNAL (clicked ()), dad, TQT_SLOT (accept ())); + connect (CANCEL, TQT_SIGNAL (clicked ()), dad, TQT_SLOT (reject ())); #endif } @@ -572,14 +572,14 @@ KGrNHDialog::~KGrNHDialog() #ifdef KGR_PORTABLE KGrECDialog::KGrECDialog (int action, int collnIndex, - QPtrList<KGrCollection> & gamesList, - QWidget * parent, const char * name) - : QDialog (parent, name, TRUE, + TQPtrList<KGrCollection> & gamesList, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrECDialog::KGrECDialog (int action, int collnIndex, - QPtrList<KGrCollection> & gamesList, - QWidget * parent, const char * name) + TQPtrList<KGrCollection> & gamesList, + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Edit Game Info"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name) @@ -591,56 +591,56 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, #ifdef KGR_PORTABLE int margin = 10; int spacing = 10; - QWidget * dad = this; + TQWidget * dad = this; #else int margin = marginHint(); int spacing = spacingHint(); - QWidget * dad = plainPage(); + TQWidget * dad = plainPage(); #endif - QVBoxLayout * mainLayout = new QVBoxLayout (dad, margin, spacing); + TQVBoxLayout * mainLayout = new TQVBoxLayout (dad, margin, spacing); - QHBox * nameBox = new QHBox (dad); + TQHBox * nameBox = new TQHBox (dad); mainLayout->addWidget (nameBox); nameBox->setSpacing (spacing); - nameL = new QLabel (i18n("Name of game:"), nameBox); - ecName = new QLineEdit (nameBox); + nameL = new TQLabel (i18n("Name of game:"), nameBox); + ecName = new TQLineEdit (nameBox); - QHBox * prefixBox = new QHBox (dad); + TQHBox * prefixBox = new TQHBox (dad); mainLayout->addWidget (prefixBox); prefixBox->setSpacing (spacing); - prefixL = new QLabel (i18n("File name prefix:"), prefixBox); - ecPrefix = new QLineEdit (prefixBox); + prefixL = new TQLabel (i18n("File name prefix:"), prefixBox); + ecPrefix = new TQLineEdit (prefixBox); - ecGrp = new QButtonGroup (1, QButtonGroup::Horizontal, 0, dad); + ecGrp = new TQButtonGroup (1, TQButtonGroup::Horizontal, 0, dad); mainLayout->addWidget (ecGrp); - ecTradB = new QRadioButton (i18n("Traditional rules"), ecGrp); - ecKGrB = new QRadioButton (i18n("KGoldrunner rules"), ecGrp); + ecTradB = new TQRadioButton (i18n("Traditional rules"), ecGrp); + ecKGrB = new TQRadioButton (i18n("KGoldrunner rules"), ecGrp); - nLevL = new QLabel (i18n( "0 levels" ), dad); + nLevL = new TQLabel (i18n( "0 levels" ), dad); mainLayout->addWidget (nLevL); - mleL = new QLabel (i18n("About this game:"), dad); + mleL = new TQLabel (i18n("About this game:"), dad); mainLayout->addWidget (mleL); // Set up a widget to hold the wrapped text, using \n for paragraph breaks. #ifdef QT3 - mle = new QTextEdit (dad); + mle = new TQTextEdit (dad); mle-> setTextFormat (PlainText); #else - mle = new QMultiLineEdit (dad); + mle = new TQMultiLineEdit (dad); #endif mainLayout->addWidget (mle); #ifdef KGR_PORTABLE - QHBox * buttons = new QHBox (dad); + TQHBox * buttons = new TQHBox (dad); mainLayout->addWidget (buttons); buttons->setSpacing (spacing); // Buttons are for Qt-only portability. NOT COMPILED in KDE environment. - OK = new QPushButton (i18n("&OK"), buttons); - CANCEL = new QPushButton (i18n("&Cancel"), buttons); + OK = new TQPushButton (i18n("&OK"), buttons); + CANCEL = new TQPushButton (i18n("&Cancel"), buttons); - QPoint p = parent->mapToGlobal (QPoint (0,0)); + TQPoint p = parent->mapToGlobal (TQPoint (0,0)); // Base the geometry of the dialog box on the playing area. int cell = parent->width() / (FIELDWIDTH + 4); @@ -655,7 +655,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, setCaption (i18n("Edit Game Info")); } - QString OKText = ""; + TQString OKText = ""; if (action == SL_UPD_GAME) { // Edit existing collection. ecName-> setText (collections.at(defaultGame)->name); ecPrefix-> setText (collections.at(defaultGame)->prefix); @@ -696,7 +696,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, // Configure the edit box. mle-> setAlignment (AlignLeft); #ifndef QT3 - mle-> setWordWrap (QMultiLineEdit::WidgetWidth); + mle-> setWordWrap (TQMultiLineEdit::WidgetWidth); mle-> setFixedVisibleLines (8); #endif @@ -709,8 +709,8 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, mle-> setText (""); } - connect (ecKGrB, SIGNAL (clicked ()), this, SLOT (ecSetKGr ())); - connect (ecTradB, SIGNAL (clicked ()), this, SLOT (ecSetTrad ())); + connect (ecKGrB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (ecSetKGr ())); + connect (ecTradB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (ecSetTrad ())); #ifdef KGR_PORTABLE OK-> setGeometry (10, 145 + mle->height(), 100, 25); @@ -721,8 +721,8 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, dad-> resize (300, 175 + mle->height()); - connect (OK, SIGNAL (clicked ()), this, SLOT (accept())); - connect (CANCEL, SIGNAL (clicked ()), this, SLOT (reject())); + connect (OK, TQT_SIGNAL (clicked ()), this, TQT_SLOT (accept())); + connect (CANCEL, TQT_SIGNAL (clicked ()), this, TQT_SLOT (reject())); #endif } @@ -748,15 +748,15 @@ void KGrECDialog::ecSetTrad () {ecSetRules ('T');} *******************************************************************************/ #ifdef KGR_PORTABLE -KGrLGDialog::KGrLGDialog (QFile * savedGames, - QPtrList<KGrCollection> & collections, - QWidget * parent, const char * name) - : QDialog (parent, name, TRUE, +KGrLGDialog::KGrLGDialog (TQFile * savedGames, + TQPtrList<KGrCollection> & collections, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else -KGrLGDialog::KGrLGDialog (QFile * savedGames, - QPtrList<KGrCollection> & collections, - QWidget * parent, const char * name) +KGrLGDialog::KGrLGDialog (TQFile * savedGames, + TQPtrList<KGrCollection> & collections, + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Select Saved Game"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name) @@ -765,20 +765,20 @@ KGrLGDialog::KGrLGDialog (QFile * savedGames, #ifdef KGR_PORTABLE int margin = 10; int spacing = 10; - QWidget * dad = this; + TQWidget * dad = this; #else int margin = marginHint(); int spacing = spacingHint(); - QWidget * dad = plainPage(); + TQWidget * dad = plainPage(); #endif - QVBoxLayout * mainLayout = new QVBoxLayout (dad, margin, spacing); + TQVBoxLayout * mainLayout = new TQVBoxLayout (dad, margin, spacing); - QLabel * lgHeader = new QLabel ( + TQLabel * lgHeader = new TQLabel ( i18n("Game Level/Lives/Score " "Day Date Time "), dad); - lgList = new QListBox (dad); + lgList = new TQListBox (dad); #ifdef KGR_PORTABLE QFont f ("courier", 12); #else @@ -793,17 +793,17 @@ KGrLGDialog::KGrLGDialog (QFile * savedGames, mainLayout-> addWidget (lgList); #ifdef KGR_PORTABLE - QHBox * buttons = new QHBox (dad); + TQHBox * buttons = new TQHBox (dad); buttons-> setSpacing (spacing); // Buttons are for Qt-only portability. NOT COMPILED in KDE environment. - QPushButton * OK = new QPushButton (i18n("&OK"), buttons); - QPushButton * CANCEL = new QPushButton (i18n("&Cancel"), buttons); + TQPushButton * OK = new TQPushButton (i18n("&OK"), buttons); + TQPushButton * CANCEL = new TQPushButton (i18n("&Cancel"), buttons); mainLayout-> addWidget (buttons); dad-> setCaption (i18n("Select Saved Game")); // Base the geometry of the list box on the playing area. - QPoint p = parent->mapToGlobal (QPoint (0,0)); + QPoint p = parent->mapToGlobal (TQPoint (0,0)); int c = parent->width() / (FIELDWIDTH + 4); dad-> move (p.x()+2*c, p.y()+2*c); lgList-> setMinimumHeight ((FIELDHEIGHT/2)*c); @@ -842,10 +842,10 @@ KGrLGDialog::KGrLGDialog (QFile * savedGames, lgList-> setSelected (0, TRUE); lgHighlight = 0; - connect (lgList, SIGNAL (highlighted (int)), this, SLOT (lgSelect (int))); + connect (lgList, TQT_SIGNAL (highlighted (int)), this, TQT_SLOT (lgSelect (int))); #ifdef KGR_PORTABLE - connect (OK, SIGNAL (clicked ()), this, SLOT (accept ())); - connect (CANCEL, SIGNAL (clicked ()), this, SLOT (reject ())); + connect (OK, TQT_SIGNAL (clicked ()), this, TQT_SLOT (accept ())); + connect (CANCEL, TQT_SIGNAL (clicked ()), this, TQT_SLOT (reject ())); #endif } @@ -858,11 +858,11 @@ void KGrLGDialog::lgSelect (int n) *********************** CENTRALISED MESSAGE FUNCTIONS ************************ *******************************************************************************/ -void KGrMessage::information (QWidget * parent, const QString &caption, const QString &text) +void KGrMessage::information (TQWidget * parent, const TQString &caption, const TQString &text) { #ifdef KGR_PORTABLE // Force Qt to do word-wrapping (but it ignores "\n" line-breaks). - QMessageBox::information (parent, caption, + TQMessageBox::information (parent, caption, "<qt>" + text + "</qt>"); #else // KDE does word-wrapping and will observe "\n" line-breaks. @@ -870,14 +870,14 @@ void KGrMessage::information (QWidget * parent, const QString &caption, const QS #endif } -int KGrMessage::warning (QWidget * parent, QString caption, QString text, - QString label0, QString label1, QString label2) +int KGrMessage::warning (TQWidget * parent, TQString caption, TQString text, + TQString label0, TQString label1, TQString label2) { int ans = 0; #ifdef KGR_PORTABLE // Display a box with 2 or 3 buttons, depending on if label2 is empty or not. // Force Qt to do word-wrapping (but it ignores "\n" line-breaks). - ans = QMessageBox::warning (parent, caption, + ans = TQMessageBox::warning (parent, caption, "<qt>" + text + "</qt>", label0, label1, label2, 0, (label2.isEmpty()) ? 1 : 2); @@ -906,56 +906,56 @@ int KGrMessage::warning (QWidget * parent, QString caption, QString text, /********************** WORD-WRAPPED MESSAGE BOX ************************/ /******************************************************************************/ -void KGrMessage::wrapped (QWidget * parent, QString title, QString contents) +void KGrMessage::wrapped (TQWidget * parent, TQString title, TQString contents) { #ifndef KGR_PORTABLE KMessageBox::information (parent, contents, title); #else - QDialog * mm = new QDialog (parent, "wrappedMessage", TRUE, + TQDialog * mm = new TQDialog (parent, "wrappedMessage", TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title); int margin = 10; int spacing = 10; - QVBoxLayout * mainLayout = new QVBoxLayout (mm, margin, spacing); + TQVBoxLayout * mainLayout = new TQVBoxLayout (mm, margin, spacing); // Make text background grey not white (i.e. same as widget background). QPalette pl = mm->palette(); #ifdef QT3 - pl.setColor (QColorGroup::Base, mm->paletteBackgroundColor()); + pl.setColor (TQColorGroup::Base, mm->paletteBackgroundColor()); #else - pl.setColor (QColorGroup::Base, mm->backgroundColor()); + pl.setColor (TQColorGroup::Base, mm->backgroundColor()); #endif mm-> setPalette (pl); // Set up a widget to hold the wrapped text, using \n for paragraph breaks. #ifdef QT3 - QTextEdit * mle = new QTextEdit (mm); + TQTextEdit * mle = new TQTextEdit (mm); mle-> setTextFormat (PlainText); #else - QMultiLineEdit * mle = new QMultiLineEdit (mm); + TQMultiLineEdit * mle = new TQMultiLineEdit (mm); #endif mainLayout->addWidget (mle); // Button is for Qt-only portability. NOT COMPILED in KDE environment. - QPushButton * OK = new QPushButton (i18n("&OK"), mm); + TQPushButton * OK = new TQPushButton (i18n("&OK"), mm); mainLayout->addWidget (OK, Qt::AlignHCenter); mm-> setCaption (title); // Base the geometry of the text box on the playing area. - QPoint p = parent->mapToGlobal (QPoint (0,0)); + QPoint p = parent->mapToGlobal (TQPoint (0,0)); int c = parent->width() / (FIELDWIDTH + 4); mm-> move (p.x()+4*c, p.y()+4*c); mle-> setMinimumSize ((FIELDWIDTH*c/2), (FIELDHEIGHT/2)*c); OK-> setMaximumWidth (3*c); - mle-> setFrameStyle (QFrame::NoFrame); + mle-> setFrameStyle (TQFrame::NoFrame); mle-> setAlignment (AlignLeft); mle-> setReadOnly (TRUE); mle-> setText (contents); #ifndef QT3 - mle-> setWordWrap (QMultiLineEdit::WidgetWidth); + mle-> setWordWrap (TQMultiLineEdit::WidgetWidth); mle-> setFixedVisibleLines (10); if (mle-> numLines() < 10) { mle-> setFixedVisibleLines (mle->numLines()); @@ -963,7 +963,7 @@ void KGrMessage::wrapped (QWidget * parent, QString title, QString contents) #endif OK-> setAccel (Key_Return); - connect (OK, SIGNAL (clicked ()), mm, SLOT (accept ())); + connect (OK, TQT_SIGNAL (clicked ()), mm, TQT_SLOT (accept ())); mm-> exec (); |