diff options
Diffstat (limited to 'kgoldrunner/src/kgrdialog.cpp')
-rw-r--r-- | kgoldrunner/src/kgrdialog.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/kgoldrunner/src/kgrdialog.cpp b/kgoldrunner/src/kgrdialog.cpp index def7af7d..0cb8a947 100644 --- a/kgoldrunner/src/kgrdialog.cpp +++ b/kgoldrunner/src/kgrdialog.cpp @@ -30,7 +30,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, TQPtrList<KGrCollection> & gamesList, KGrGame * theGame, TQWidget * parent, const char * name) - : TQDialog (parent, name, TRUE, + : TQDialog (parent, name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, @@ -71,7 +71,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, gameInfo->setSpacing (spacing); collnN = new TQLabel ("", gameInfo); // Name of selected collection. TQFont f = collnN->font(); - f.setBold (TRUE); + f.setBold (true); collnN->setFont (f); collnA = new TQPushButton (i18n("More Info"), gameInfo); @@ -99,7 +99,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, // Initial range 1->150, small step 1, big step 10 and default value 1. number = new TQScrollBar (1, 150, 1, 10, 1, - Qt::Horizontal, dad); + TQt::Horizontal, dad); grid->addWidget (number, 1, 1); TQHBox * numberPair = new TQHBox (dad); @@ -143,7 +143,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, #endif // Set the default for the level-number in the scrollbar. - number-> setTracking (TRUE); + number-> setTracking (true); number->setValue (requestedLevel); slSetCollections (defaultGame); @@ -154,8 +154,8 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, case SL_START: // Must start at level 1, but can choose a collection. OKText = i18n("Start Game"); number->setValue (1); - number->setEnabled(FALSE); - display->setEnabled(FALSE); + number->setEnabled(false); + display->setEnabled(false); number->hide(); numberL->hide(); display->hide(); @@ -181,8 +181,8 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, case SL_UPD_GAME: // Can only edit USER collection details. OKText = i18n("Edit Game Info"); number->setValue (1); - number->setEnabled(FALSE); - display->setEnabled(FALSE); + number->setEnabled(false); + display->setEnabled(false); number->hide(); numberL->hide(); display->hide(); @@ -213,36 +213,36 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, slPaintLevel(); thumbNail->show(); - connect (colln, TQT_SIGNAL (highlighted (int)), this, TQT_SLOT (slColln (int))); - connect (collnA, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slAboutColln ())); + connect (colln, TQ_SIGNAL (highlighted (int)), this, TQ_SLOT (slColln (int))); + connect (collnA, TQ_SIGNAL (clicked ()), this, TQ_SLOT (slAboutColln ())); - connect (display, TQT_SIGNAL (textChanged (const TQString &)), - this, TQT_SLOT (slUpdate (const TQString &))); + connect (display, TQ_SIGNAL (textChanged (const TQString &)), + this, TQ_SLOT (slUpdate (const TQString &))); - connect (number, TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT(slShowLevel(int))); + connect (number, TQ_SIGNAL (valueChanged(int)), this, TQ_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, TQT_SIGNAL (clicked()), game, TQT_SLOT (editNameAndHint())); + connect (levelNH, TQ_SIGNAL (clicked()), game, TQ_SLOT (editNameAndHint())); } else { - levelNH->setEnabled (FALSE); + levelNH->setEnabled (false); levelNH->hide(); } - 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())); + connect (colln, TQ_SIGNAL (highlighted (int)), this, TQ_SLOT (slPaintLevel ())); + connect (number, TQ_SIGNAL (sliderReleased()), this, TQ_SLOT (slPaintLevel())); + connect (number, TQ_SIGNAL (nextLine()), this, TQ_SLOT (slPaintLevel())); + connect (number, TQ_SIGNAL (prevLine()), this, TQ_SLOT (slPaintLevel())); + connect (number, TQ_SIGNAL (nextPage()), this, TQ_SLOT (slPaintLevel())); + connect (number, TQ_SIGNAL (prevPage()), this, TQ_SLOT (slPaintLevel())); #ifdef KGR_PORTABLE // Set the exits from this dialog box. - 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 ())); + connect (OK, TQ_SIGNAL (clicked ()), this, TQ_SLOT (accept ())); + connect (CANCEL, TQ_SIGNAL (clicked ()), this, TQ_SLOT (reject ())); + connect (HELP, TQ_SIGNAL (clicked ()), this, TQ_SLOT (slotHelp ())); #endif } @@ -275,7 +275,7 @@ void KGrSLDialog::slSetCollections (int cIndex) } // Mark the currently selected collection (or default 0). colln->setCurrentItem (cIndex); - colln->setSelected (cIndex, TRUE); + colln->setSelected (cIndex, true); // Fetch and display information on the selected collection. slColln (cIndex); @@ -293,7 +293,7 @@ void KGrSLDialog::slColln (int i) } // User "highlighted" a new collection (with one click) ... - colln->setSelected (i, TRUE); // One click = selected. + colln->setSelected (i, true); // One click = selected. slCollnIndex = i; int n = slCollnIndex; // Collection selected. int N = defaultGame; // Current collection. @@ -383,7 +383,7 @@ void KGrSLDialog::slUpdate (const TQString & text) { // Move the slider when a valid level number is entered. TQString s = text; - bool ok = FALSE; + bool ok = false; int n = s.toInt (&ok); if (ok) { number->setValue (n); @@ -487,7 +487,7 @@ void KGrSLDialog::slotHelp () #ifdef KGR_PORTABLE KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, TQWidget * parent, const char * name) - : TQDialog (parent, name, TRUE, + : TQDialog (parent, name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, @@ -557,8 +557,8 @@ KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, // OK-> setAccel (Key_Return); // No! We need it in "mle" box. CANCEL-> setAccel (Key_Escape); - connect (OK, TQT_SIGNAL (clicked ()), dad, TQT_SLOT (accept ())); - connect (CANCEL, TQT_SIGNAL (clicked ()), dad, TQT_SLOT (reject ())); + connect (OK, TQ_SIGNAL (clicked ()), dad, TQ_SLOT (accept ())); + connect (CANCEL, TQ_SIGNAL (clicked ()), dad, TQ_SLOT (reject ())); #endif } @@ -574,7 +574,7 @@ KGrNHDialog::~KGrNHDialog() KGrECDialog::KGrECDialog (int action, int collnIndex, TQPtrList<KGrCollection> & gamesList, TQWidget * parent, const char * name) - : TQDialog (parent, name, TRUE, + : TQDialog (parent, name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrECDialog::KGrECDialog (int action, int collnIndex, @@ -612,7 +612,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, prefixL = new TQLabel (i18n("File name prefix:"), prefixBox); ecPrefix = new TQLineEdit (prefixBox); - ecGrp = new TQButtonGroup (1, Qt::Horizontal, 0, dad); + ecGrp = new TQButtonGroup (1, TQt::Horizontal, 0, dad); mainLayout->addWidget (ecGrp); ecTradB = new TQRadioButton (i18n("Traditional rules"), ecGrp); ecKGrB = new TQRadioButton (i18n("KGoldrunner rules"), ecGrp); @@ -661,7 +661,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, ecPrefix-> setText (collections.at(defaultGame)->prefix); if (collections.at(defaultGame)->nLevels > 0) { // Collection already has some levels, so cannot change the prefix. - ecPrefix-> setEnabled (FALSE); + ecPrefix-> setEnabled (false); } TQString s; #ifndef KGR_PORTABLE @@ -709,8 +709,8 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, mle-> setText (""); } - connect (ecKGrB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (ecSetKGr ())); - connect (ecTradB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (ecSetTrad ())); + connect (ecKGrB, TQ_SIGNAL (clicked ()), this, TQ_SLOT (ecSetKGr ())); + connect (ecTradB, TQ_SIGNAL (clicked ()), this, TQ_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, TQT_SIGNAL (clicked ()), this, TQT_SLOT (accept())); - connect (CANCEL, TQT_SIGNAL (clicked ()), this, TQT_SLOT (reject())); + connect (OK, TQ_SIGNAL (clicked ()), this, TQ_SLOT (accept())); + connect (CANCEL, TQ_SIGNAL (clicked ()), this, TQ_SLOT (reject())); #endif } @@ -732,12 +732,12 @@ KGrECDialog::~KGrECDialog() void KGrECDialog::ecSetRules (const char settings) { - ecKGrB-> setChecked (FALSE); - ecTradB-> setChecked (FALSE); + ecKGrB-> setChecked (false); + ecTradB-> setChecked (false); if (settings == 'K') - ecKGrB-> setChecked (TRUE); + ecKGrB-> setChecked (true); else - ecTradB-> setChecked (TRUE); + ecTradB-> setChecked (true); } void KGrECDialog::ecSetKGr () {ecSetRules ('K');} // Radio button slots. @@ -751,7 +751,7 @@ void KGrECDialog::ecSetTrad () {ecSetRules ('T');} KGrLGDialog::KGrLGDialog (TQFile * savedGames, TQPtrList<KGrCollection> & collections, TQWidget * parent, const char * name) - : TQDialog (parent, name, TRUE, + : TQDialog (parent, name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrLGDialog::KGrLGDialog (TQFile * savedGames, @@ -784,9 +784,9 @@ KGrLGDialog::KGrLGDialog (TQFile * savedGames, #else TQFont f = TDEGlobalSettings::fixedFont(); // KDE version. #endif - f.setFixedPitch (TRUE); + f.setFixedPitch (true); lgList-> setFont (f); - f.setBold (TRUE); + f.setBold (true); lgHeader-> setFont (f); mainLayout-> addWidget (lgHeader); @@ -825,11 +825,11 @@ KGrLGDialog::KGrLGDialog (TQFile * savedGames, // Read the saved games into the list box. while (! gameText.endData()) { s = gameText.readLine(); // Read in one saved game. - pr = s.left (s.find (" ", 0, FALSE)); // Get the collection prefix. + pr = s.left (s.find (" ", 0, false)); // Get the collection prefix. for (i = 0; i < imax; i++) { // Get the collection name. if (collections.at(i)->prefix == pr) { s = s.insert (0, - collections.at(i)->name.leftJustify (20, ' ', TRUE) + " "); + collections.at(i)->name.leftJustify (20, ' ', true) + " "); break; } } @@ -839,13 +839,13 @@ KGrLGDialog::KGrLGDialog (TQFile * savedGames, // Mark row 0 (the most recently saved game) as the default selection. lgList-> setCurrentItem (0); - lgList-> setSelected (0, TRUE); + lgList-> setSelected (0, true); lgHighlight = 0; - connect (lgList, TQT_SIGNAL (highlighted (int)), this, TQT_SLOT (lgSelect (int))); + connect (lgList, TQ_SIGNAL (highlighted (int)), this, TQ_SLOT (lgSelect (int))); #ifdef KGR_PORTABLE - connect (OK, TQT_SIGNAL (clicked ()), this, TQT_SLOT (accept ())); - connect (CANCEL, TQT_SIGNAL (clicked ()), this, TQT_SLOT (reject ())); + connect (OK, TQ_SIGNAL (clicked ()), this, TQ_SLOT (accept ())); + connect (CANCEL, TQ_SIGNAL (clicked ()), this, TQ_SLOT (reject ())); #endif } @@ -911,7 +911,7 @@ void KGrMessage::wrapped (TQWidget * parent, TQString title, TQString contents) #ifndef KGR_PORTABLE KMessageBox::information (parent, contents, title); #else - TQDialog * mm = new TQDialog (parent, "wrappedMessage", TRUE, + TQDialog * mm = new TQDialog (parent, "wrappedMessage", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title); int margin = 10; @@ -951,7 +951,7 @@ void KGrMessage::wrapped (TQWidget * parent, TQString title, TQString contents) mle-> setFrameStyle (TQFrame::NoFrame); mle-> setAlignment (AlignLeft); - mle-> setReadOnly (TRUE); + mle-> setReadOnly (true); mle-> setText (contents); #ifndef QT3 @@ -963,7 +963,7 @@ void KGrMessage::wrapped (TQWidget * parent, TQString title, TQString contents) #endif OK-> setAccel (Key_Return); - connect (OK, TQT_SIGNAL (clicked ()), mm, TQT_SLOT (accept ())); + connect (OK, TQ_SIGNAL (clicked ()), mm, TQ_SLOT (accept ())); mm-> exec (); |