diff options
Diffstat (limited to 'kgoldrunner')
-rw-r--r-- | kgoldrunner/src/kgrcanvas.cpp | 4 | ||||
-rw-r--r-- | kgoldrunner/src/kgrcanvas.h | 2 | ||||
-rw-r--r-- | kgoldrunner/src/kgrdialog.cpp | 76 | ||||
-rw-r--r-- | kgoldrunner/src/kgrdialog.h | 14 | ||||
-rw-r--r-- | kgoldrunner/src/kgrgame.cpp | 10 | ||||
-rw-r--r-- | kgoldrunner/src/kgrgame.h | 4 |
6 files changed, 55 insertions, 55 deletions
diff --git a/kgoldrunner/src/kgrcanvas.cpp b/kgoldrunner/src/kgrcanvas.cpp index 907463e5..b56c2453 100644 --- a/kgoldrunner/src/kgrcanvas.cpp +++ b/kgoldrunner/src/kgrcanvas.cpp @@ -34,8 +34,8 @@ class KGoldrunner; -KGrCanvas::KGrCanvas (TQWidget * tqparent, const char *name) - : TQCanvasView (0, tqparent, name) +KGrCanvas::KGrCanvas (TQWidget * parent, const char *name) + : TQCanvasView (0, parent, name) { setBackgroundMode (NoBackground); m = new TQCursor (); // For handling the mouse. diff --git a/kgoldrunner/src/kgrcanvas.h b/kgoldrunner/src/kgrcanvas.h index cfabc408..410a8115 100644 --- a/kgoldrunner/src/kgrcanvas.h +++ b/kgoldrunner/src/kgrcanvas.h @@ -33,7 +33,7 @@ class KGrCanvas : public TQCanvasView Q_OBJECT TQ_OBJECT public: - KGrCanvas (TQWidget * tqparent = 0, const char *name = 0); + KGrCanvas (TQWidget * parent = 0, const char *name = 0); virtual ~KGrCanvas(); void changeLandscape (const TQString & name); diff --git a/kgoldrunner/src/kgrdialog.cpp b/kgoldrunner/src/kgrdialog.cpp index ac6c5ce4..9a5ecb44 100644 --- a/kgoldrunner/src/kgrdialog.cpp +++ b/kgoldrunner/src/kgrdialog.cpp @@ -29,16 +29,16 @@ #ifdef KGR_PORTABLE KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, TQPtrList<KGrCollection> & gamesList, KGrGame * theGame, - TQWidget * tqparent, const char * name) - : TQDialog (tqparent, name, TRUE, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, TQPtrList<KGrCollection> & gamesList, KGrGame * theGame, - TQWidget * tqparent, const char * name) + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Select Game"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help, - KDialogBase::Ok, tqparent, name) + KDialogBase::Ok, parent, name) #endif { slAction = action; @@ -47,7 +47,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, collections = gamesList; game = theGame; collection = collections.at(defaultGame); - slParent = tqparent; + slParent = parent; #ifdef KGR_PORTABLE int margin = 10; @@ -117,7 +117,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, grid->addMultiCellWidget (thumbNail, 1, 3, 2, 2); // Set thumbnail cell size to about 1/5 of game cell size. - int cellSize = tqparent->width() / (5 * (FIELDWIDTH + 4)); + int cellSize = parent->width() / (5 * (FIELDWIDTH + 4)); thumbNail-> setFixedWidth ((FIELDWIDTH * cellSize) + 2); thumbNail-> setFixedHeight ((FIELDHEIGHT * cellSize) + 2); @@ -130,10 +130,10 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex, OK = new TQPushButton (i18n("&OK"), buttons); CANCEL = new TQPushButton (i18n("&Cancel"), buttons); - TQPoint p = tqparent->mapToGlobal (TQPoint (0,0)); + TQPoint p = parent->mapToGlobal (TQPoint (0,0)); // Base the tqgeometry of the dialog box on the playing area. - int cell = tqparent->width() / (FIELDWIDTH + 4); + int cell = parent->width() / (FIELDWIDTH + 4); dad-> move (p.x()+2*cell, p.y()+2*cell); dad-> setMinimumSize ((FIELDWIDTH*cell/2), (FIELDHEIGHT-1)*cell); @@ -486,15 +486,15 @@ void KGrSLDialog::slotHelp () #ifdef KGR_PORTABLE KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, - TQWidget * tqparent, const char * name) - : TQDialog (tqparent, name, TRUE, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, - TQWidget * tqparent, const char * name) + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Edit Name & Hint"), KDialogBase::Ok | KDialogBase::Cancel, - KDialogBase::Ok, tqparent, name) + KDialogBase::Ok, parent, name) #endif { #ifdef KGR_PORTABLE @@ -538,8 +538,8 @@ KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint, #endif // Base the tqgeometry of the text box on the playing area. - TQPoint p = tqparent->mapToGlobal (TQPoint (0,0)); - int c = tqparent->width() / (FIELDWIDTH + 4); + TQPoint 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); @@ -573,16 +573,16 @@ KGrNHDialog::~KGrNHDialog() #ifdef KGR_PORTABLE KGrECDialog::KGrECDialog (int action, int collnIndex, TQPtrList<KGrCollection> & gamesList, - TQWidget * tqparent, const char * name) - : TQDialog (tqparent, name, TRUE, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrECDialog::KGrECDialog (int action, int collnIndex, TQPtrList<KGrCollection> & gamesList, - TQWidget * tqparent, const char * name) + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Edit Game Info"), KDialogBase::Ok | KDialogBase::Cancel, - KDialogBase::Ok, tqparent, name) + KDialogBase::Ok, parent, name) #endif { collections = gamesList; @@ -640,10 +640,10 @@ KGrECDialog::KGrECDialog (int action, int collnIndex, OK = new TQPushButton (i18n("&OK"), buttons); CANCEL = new TQPushButton (i18n("&Cancel"), buttons); - TQPoint p = tqparent->mapToGlobal (TQPoint (0,0)); + TQPoint p = parent->mapToGlobal (TQPoint (0,0)); // Base the tqgeometry of the dialog box on the playing area. - int cell = tqparent->width() / (FIELDWIDTH + 4); + int cell = parent->width() / (FIELDWIDTH + 4); dad-> move (p.x()+2*cell, p.y()+2*cell); dad-> setMinimumSize ((FIELDWIDTH*cell/2), (FIELDHEIGHT-1)*cell); #endif @@ -750,16 +750,16 @@ void KGrECDialog::ecSetTrad () {ecSetRules ('T');} #ifdef KGR_PORTABLE KGrLGDialog::KGrLGDialog (TQFile * savedGames, TQPtrList<KGrCollection> & collections, - TQWidget * tqparent, const char * name) - : TQDialog (tqparent, name, TRUE, + TQWidget * parent, const char * name) + : TQDialog (parent, name, TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title) #else KGrLGDialog::KGrLGDialog (TQFile * savedGames, TQPtrList<KGrCollection> & collections, - TQWidget * tqparent, const char * name) + TQWidget * parent, const char * name) : KDialogBase (KDialogBase::Plain, i18n("Select Saved Game"), KDialogBase::Ok | KDialogBase::Cancel, - KDialogBase::Ok, tqparent, name) + KDialogBase::Ok, parent, name) #endif { #ifdef KGR_PORTABLE @@ -803,8 +803,8 @@ KGrLGDialog::KGrLGDialog (TQFile * savedGames, dad-> setCaption (i18n("Select Saved Game")); // Base the tqgeometry of the list box on the playing area. - TQPoint p = tqparent->mapToGlobal (TQPoint (0,0)); - int c = tqparent->width() / (FIELDWIDTH + 4); + TQPoint 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); OK-> setMaximumWidth (4*c); @@ -858,26 +858,26 @@ void KGrLGDialog::lgSelect (int n) *********************** CENTRALISED MESSAGE FUNCTIONS ************************ *******************************************************************************/ -void KGrMessage::information (TQWidget * tqparent, const TQString &caption, const TQString &text) +void KGrMessage::information (TQWidget * parent, const TQString &caption, const TQString &text) { #ifdef KGR_PORTABLE // Force TQt to do word-wrapping (but it ignores "\n" line-breaks). - TQMessageBox::information (tqparent, caption, + TQMessageBox::information (parent, caption, "<qt>" + text + "</qt>"); #else // KDE does word-wrapping and will observe "\n" line-breaks. - KMessageBox::information (tqparent, text, caption); + KMessageBox::information (parent, text, caption); #endif } -int KGrMessage::warning (TQWidget * tqparent, TQString caption, TQString text, +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 TQt to do word-wrapping (but it ignores "\n" line-breaks). - ans = TQMessageBox::warning (tqparent, caption, + ans = TQMessageBox::warning (parent, caption, "<qt>" + text + "</qt>", label0, label1, label2, 0, (label2.isEmpty()) ? 1 : 2); @@ -885,13 +885,13 @@ int KGrMessage::warning (TQWidget * tqparent, TQString caption, TQString text, // KDE does word-wrapping and will observe "\n" line-breaks. if (label2.isEmpty()) { // Display a box with 2 buttons. - ans = KMessageBox::questionYesNo (tqparent, text, caption, + ans = KMessageBox::questionYesNo (parent, text, caption, label0, label1); ans = (ans == KMessageBox::Yes) ? 0 : 1; } else { // Display a box with 3 buttons. - ans = KMessageBox::questionYesNoCancel (tqparent, text, caption, + ans = KMessageBox::questionYesNoCancel (parent, text, caption, label0, label1); if (ans == KMessageBox::Cancel) ans = 2; @@ -906,12 +906,12 @@ int KGrMessage::warning (TQWidget * tqparent, TQString caption, TQString text, /********************** WORD-WRAPPED MESSAGE BOX ************************/ /******************************************************************************/ -void KGrMessage::wrapped (TQWidget * tqparent, TQString title, TQString contents) +void KGrMessage::wrapped (TQWidget * parent, TQString title, TQString contents) { #ifndef KGR_PORTABLE - KMessageBox::information (tqparent, contents, title); + KMessageBox::information (parent, contents, title); #else - TQDialog * mm = new TQDialog (tqparent, "wrappedMessage", TRUE, + TQDialog * mm = new TQDialog (parent, "wrappedMessage", TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title); int margin = 10; @@ -943,8 +943,8 @@ void KGrMessage::wrapped (TQWidget * tqparent, TQString title, TQString contents mm-> setCaption (title); // Base the tqgeometry of the text box on the playing area. - TQPoint p = tqparent->mapToGlobal (TQPoint (0,0)); - int c = tqparent->width() / (FIELDWIDTH + 4); + TQPoint 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); diff --git a/kgoldrunner/src/kgrdialog.h b/kgoldrunner/src/kgrdialog.h index cbf4735a..cfa65de6 100644 --- a/kgoldrunner/src/kgrdialog.h +++ b/kgoldrunner/src/kgrdialog.h @@ -62,7 +62,7 @@ Q_OBJECT public: KGrSLDialog (int action, int requestedLevel, int collnIndex, TQPtrList<KGrCollection> & gamesList, KGrGame * theGame, - TQWidget * tqparent = 0, const char *name = 0); + TQWidget * parent = 0, const char *name = 0); ~KGrSLDialog(); int selectedLevel() {return (number->value());} @@ -117,7 +117,7 @@ Q_OBJECT TQ_OBJECT public: KGrNHDialog (const TQString & levelName, const TQString & levelHint, - TQWidget * tqparent = 0, const char * name = 0); + TQWidget * parent = 0, const char * name = 0); ~KGrNHDialog(); TQString getName() {return (nhName->text());} @@ -143,7 +143,7 @@ Q_OBJECT public: KGrECDialog (int action, int collnIndex, TQPtrList<KGrCollection> & gamesList, - TQWidget *tqparent = 0, const char *name = 0); + TQWidget *parent = 0, const char *name = 0); ~KGrECDialog(); TQString getName() {return (ecName->text());} @@ -195,7 +195,7 @@ Q_OBJECT TQ_OBJECT public: KGrLGDialog (TQFile * savedGames, TQPtrList<KGrCollection> & collections, - TQWidget * tqparent, const char * name); + TQWidget * parent, const char * name); TQString getCurrentText() {return (lgList->currentText());} private slots: @@ -213,10 +213,10 @@ private: class KGrMessage : public TQDialog { public: - static void information (TQWidget * tqparent, const TQString &caption, const TQString &text); - static int warning (TQWidget * tqparent, TQString caption, TQString text, + static void information (TQWidget * parent, const TQString &caption, const TQString &text); + static int warning (TQWidget * parent, TQString caption, TQString text, TQString label0, TQString label1, TQString label2 = ""); - static void wrapped (TQWidget * tqparent, TQString caption, TQString text); + static void wrapped (TQWidget * parent, TQString caption, TQString text); }; #endif diff --git a/kgoldrunner/src/kgrgame.cpp b/kgoldrunner/src/kgrgame.cpp index 930bd83f..a52abe01 100644 --- a/kgoldrunner/src/kgrgame.cpp +++ b/kgoldrunner/src/kgrgame.cpp @@ -2226,10 +2226,10 @@ bool KGrGame::ownerOK (Owner o) /********************** CLASS TO DISPLAY THUMBNAIL ***********************/ /******************************************************************************/ -KGrThumbNail::KGrThumbNail (TQWidget * tqparent, const char * name) - : TQFrame (tqparent, name) +KGrThumbNail::KGrThumbNail (TQWidget * parent, const char * name) + : TQFrame (parent, name) { - // Let the tqparent do all the work. We need a class here so that + // Let the parent do all the work. We need a class here so that // TQFrame::drawContents (TQPainter *) can be re-implemented and // the thumbnail can be automatically re-painted when required. } @@ -2588,12 +2588,12 @@ bool KGrGame::saveCollections (Owner o) /********************** WORD-WRAPPED MESSAGE BOX ************************/ /******************************************************************************/ -void KGrGame::myMessage (TQWidget * tqparent, TQString title, TQString contents) +void KGrGame::myMessage (TQWidget * parent, TQString title, TQString contents) { // Halt the game while the message is displayed. setMessageFreeze (TRUE); - KGrMessage::wrapped (tqparent, title, contents); + KGrMessage::wrapped (parent, title, contents); // Unfreeze the game, but only if it was previously unfrozen. setMessageFreeze (FALSE); diff --git a/kgoldrunner/src/kgrgame.h b/kgoldrunner/src/kgrgame.h index 2f440b87..2b0f26c8 100644 --- a/kgoldrunner/src/kgrgame.h +++ b/kgoldrunner/src/kgrgame.h @@ -265,7 +265,7 @@ private: /********************** WORD-WRAPPED MESSAGE BOX ************************/ /******************************************************************************/ - void myMessage (TQWidget * tqparent, TQString title, TQString contents); + void myMessage (TQWidget * parent, TQString title, TQString contents); }; /******************************************************************************/ @@ -275,7 +275,7 @@ private: class KGrThumbNail : public TQFrame { public: - KGrThumbNail (TQWidget *tqparent = 0, const char *name = 0); + KGrThumbNail (TQWidget *parent = 0, const char *name = 0); void setFilePath (TQString &, TQLabel *); // Set filepath and name field. static TQColor backgroundColor; |