From c20f4d8f2cf03c69fcecc80d63fe3cbb80f51610 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 13 Jan 2024 12:28:49 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro --- kmines/dialogs.cpp | 10 ++++---- kmines/field.cpp | 2 +- kmines/kzoommainwindow.cpp | 8 +++--- kmines/main.cpp | 62 +++++++++++++++++++++++----------------------- kmines/solver/solver.cpp | 8 +++--- kmines/status.cpp | 22 ++++++++-------- 6 files changed, 56 insertions(+), 56 deletions(-) (limited to 'kmines') diff --git a/kmines/dialogs.cpp b/kmines/dialogs.cpp index 21120478..88656b1a 100644 --- a/kmines/dialogs.cpp +++ b/kmines/dialogs.cpp @@ -127,19 +127,19 @@ CustomConfig::CustomConfig() _width = new KIntNumInput(this, "kcfg_CustomWidth"); _width->setLabel(i18n("Width:")); _width->setRange(minWidth, maxWidth); - connect(_width, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateNbMines())); + connect(_width, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(updateNbMines())); top->addWidget(_width); _height = new KIntNumInput(this, "kcfg_CustomHeight"); _height->setLabel(i18n("Height:")); _height->setRange(minWidth, maxWidth); - connect(_height, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateNbMines())); + connect(_height, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(updateNbMines())); top->addWidget(_height); _mines = new KIntNumInput(this, "kcfg_CustomMines"); _mines->setLabel(i18n("No. of mines:")); _mines->setRange(1, Level::maxNbMines(maxWidth, maxHeight)); - connect(_mines, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateNbMines())); + connect(_mines, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(updateNbMines())); top->addWidget(_mines); top->addSpacing(2 * KDialog::spacingHint()); @@ -149,7 +149,7 @@ CustomConfig::CustomConfig() TQLabel *label = new TQLabel(i18n("Choose level:"), this); hbox->addWidget(label); _gameType = new KComboBox(false, this); - connect(_gameType, TQT_SIGNAL(activated(int)), TQT_SLOT(typeChosen(int))); + connect(_gameType, TQ_SIGNAL(activated(int)), TQ_SLOT(typeChosen(int))); for (uint i=0; i<=Level::NB_TYPES; i++) _gameType->insertItem(i18n(Level::LABELS[i])); hbox->addWidget(_gameType); @@ -224,7 +224,7 @@ GameConfig::GameConfig() cb = new TQCheckBox(i18n("\"Magic\" reveal"), this, "kcfg_MagicReveal"); TQWhatsThis::add(cb, i18n("Set flags and reveal squares where they are trivial.")); - connect(cb, TQT_SIGNAL(toggled(bool)), TQT_SLOT(magicModified(bool))); + connect(cb, TQ_SIGNAL(toggled(bool)), TQ_SLOT(magicModified(bool))); top->addWidget(cb); top->addSpacing(2 * KDialog::spacingHint()); diff --git a/kmines/field.cpp b/kmines/field.cpp index 95d43f9a..d7a9e1c4 100644 --- a/kmines/field.cpp +++ b/kmines/field.cpp @@ -233,7 +233,7 @@ void Field::keyboardAutoReveal() { _cursor_back = _cursor; pressClearFunction(_cursor_back, true); - TQTimer::singleShot(50, this, TQT_SLOT(keyboardAutoRevealSlot())); + TQTimer::singleShot(50, this, TQ_SLOT(keyboardAutoRevealSlot())); } void Field::keyboardAutoRevealSlot() diff --git a/kmines/kzoommainwindow.cpp b/kmines/kzoommainwindow.cpp index c0c7fc92..a9bb2004 100644 --- a/kmines/kzoommainwindow.cpp +++ b/kmines/kzoommainwindow.cpp @@ -30,11 +30,11 @@ KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name { installEventFilter(this); - _zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(zoomIn()), actionCollection()); + _zoomInAction = KStdAction::zoomIn(this, TQ_SLOT(zoomIn()), actionCollection()); _zoomOutAction = - KStdAction::zoomOut(this, TQT_SLOT(zoomOut()), actionCollection()); + KStdAction::zoomOut(this, TQ_SLOT(zoomOut()), actionCollection()); _menu = - KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection()); + KStdAction::showMenubar(this, TQ_SLOT(toggleMenubar()), actionCollection()); } void KZoomMainWindow::init(const char *popupName) @@ -63,7 +63,7 @@ void KZoomMainWindow::addWidget(TQWidget *widget) static_cast(tlw->tqt_cast("KZoomMainWindow")); Q_ASSERT(zm); zm->_widgets.append(widget); - connect(widget, TQT_SIGNAL(destroyed()), zm, TQT_SLOT(widgetDestroyed())); + connect(widget, TQ_SIGNAL(destroyed()), zm, TQ_SLOT(widgetDestroyed())); } void KZoomMainWindow::widgetDestroyed() diff --git a/kmines/main.cpp b/kmines/main.cpp index f4dd0210..7c1a43e4 100644 --- a/kmines/main.cpp +++ b/kmines/main.cpp @@ -43,17 +43,17 @@ #include "dialogs.h" const MainWidget::KeyData MainWidget::KEY_DATA[NB_KEYS] = { -{I18N_NOOP("Move Up"), "keyboard_moveup", Key_Up, TQT_SLOT(moveUp())}, -{I18N_NOOP("Move Down"), "keyboard_movedown", Key_Down, TQT_SLOT(moveDown())}, -{I18N_NOOP("Move Right"), "keyboard_moveright", Key_Right, TQT_SLOT(moveRight())}, -{I18N_NOOP("Move Left"), "keyboard_moveleft", Key_Left, TQT_SLOT(moveLeft())}, -{I18N_NOOP("Move at Left Edge"), "keyboard_leftedge", Key_Home, TQT_SLOT(moveLeftEdge())}, -{I18N_NOOP("Move at Right Edge"), "keyboard_rightedge", Key_End, TQT_SLOT(moveRightEdge())}, -{I18N_NOOP("Move at Top Edge"), "keyboard_topedge", Key_PageUp, TQT_SLOT(moveTop())}, -{I18N_NOOP("Move at Bottom Edge"), "keyboard_bottomedge", Key_PageDown, TQT_SLOT(moveBottom())}, -{I18N_NOOP("Reveal Mine"), "keyboard_revealmine", Key_Space, TQT_SLOT(reveal())}, -{I18N_NOOP("Mark Mine"), "keyboard_markmine", Key_W, TQT_SLOT(mark())}, -{I18N_NOOP("Automatic Reveal"), "keyboard_autoreveal", Key_Return, TQT_SLOT(autoReveal())} +{I18N_NOOP("Move Up"), "keyboard_moveup", Key_Up, TQ_SLOT(moveUp())}, +{I18N_NOOP("Move Down"), "keyboard_movedown", Key_Down, TQ_SLOT(moveDown())}, +{I18N_NOOP("Move Right"), "keyboard_moveright", Key_Right, TQ_SLOT(moveRight())}, +{I18N_NOOP("Move Left"), "keyboard_moveleft", Key_Left, TQ_SLOT(moveLeft())}, +{I18N_NOOP("Move at Left Edge"), "keyboard_leftedge", Key_Home, TQ_SLOT(moveLeftEdge())}, +{I18N_NOOP("Move at Right Edge"), "keyboard_rightedge", Key_End, TQ_SLOT(moveRightEdge())}, +{I18N_NOOP("Move at Top Edge"), "keyboard_topedge", Key_PageUp, TQ_SLOT(moveTop())}, +{I18N_NOOP("Move at Bottom Edge"), "keyboard_bottomedge", Key_PageDown, TQ_SLOT(moveBottom())}, +{I18N_NOOP("Reveal Mine"), "keyboard_revealmine", Key_Space, TQ_SLOT(reveal())}, +{I18N_NOOP("Mark Mine"), "keyboard_markmine", Key_W, TQ_SLOT(mark())}, +{I18N_NOOP("Automatic Reveal"), "keyboard_autoreveal", Key_Return, TQ_SLOT(autoReveal())} }; @@ -63,17 +63,17 @@ MainWidget::MainWidget() KNotifyClient::startDaemon(); _status = new Status(this); - connect(_status, TQT_SIGNAL(gameStateChangedSignal(KMines::GameState)), - TQT_SLOT(gameStateChanged(KMines::GameState))); - connect(_status, TQT_SIGNAL(pause()), TQT_SLOT(pause())); + connect(_status, TQ_SIGNAL(gameStateChangedSignal(KMines::GameState)), + TQ_SLOT(gameStateChanged(KMines::GameState))); + connect(_status, TQ_SIGNAL(pause()), TQ_SLOT(pause())); // Game & Popup - KStdGameAction::gameNew(_status, TQT_SLOT(restartGame()), actionCollection()); - _pause = KStdGameAction::pause(_status, TQT_SLOT(pauseGame()), + KStdGameAction::gameNew(_status, TQ_SLOT(restartGame()), actionCollection()); + _pause = KStdGameAction::pause(_status, TQ_SLOT(pauseGame()), actionCollection()); - KStdGameAction::highscores(this, TQT_SLOT(showHighscores()), + KStdGameAction::highscores(this, TQ_SLOT(showHighscores()), actionCollection()); - KStdGameAction::quit(tqApp, TQT_SLOT(quit()), actionCollection()); + KStdGameAction::quit(tqApp, TQ_SLOT(quit()), actionCollection()); // keyboard _keybCollection = new TDEActionCollection(this); @@ -84,12 +84,12 @@ MainWidget::MainWidget() } // Settings - KStdAction::preferences(this, TQT_SLOT(configureSettings()), + KStdAction::preferences(this, TQ_SLOT(configureSettings()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), actionCollection()); - KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()), + KStdAction::keyBindings(this, TQ_SLOT(configureKeys()), actionCollection()); + KStdAction::configureNotifications(this, TQ_SLOT(configureNotifications()), actionCollection()); - KStdGameAction::configureHighscores(this, TQT_SLOT(configureHighscores()), + KStdGameAction::configureHighscores(this, TQ_SLOT(configureHighscores()), actionCollection()); // Levels _levels = KStdGameAction::chooseGameType(0, 0, actionCollection()); @@ -97,27 +97,27 @@ MainWidget::MainWidget() for (uint i=0; i<=Level::NB_TYPES; i++) list += i18n(Level::LABELS[i]); _levels->setItems(list); - connect(_levels, TQT_SIGNAL(activated(int)), _status, TQT_SLOT(newGame(int))); + connect(_levels, TQ_SIGNAL(activated(int)), _status, TQ_SLOT(newGame(int))); // Adviser _advise = - KStdGameAction::hint(_status, TQT_SLOT(advise()), actionCollection()); - _solve = KStdGameAction::solve(_status, TQT_SLOT(solve()), actionCollection()); - (void)new TDEAction(i18n("Solving Rate..."), 0, _status, TQT_SLOT(solveRate()), + KStdGameAction::hint(_status, TQ_SLOT(advise()), actionCollection()); + _solve = KStdGameAction::solve(_status, TQ_SLOT(solve()), actionCollection()); + (void)new TDEAction(i18n("Solving Rate..."), 0, _status, TQ_SLOT(solveRate()), actionCollection(), "solve_rate"); // Log (void)new TDEAction(KGuiItem(i18n("View Log"), "viewmag"), 0, - _status, TQT_SLOT(viewLog()), + _status, TQ_SLOT(viewLog()), actionCollection(), "log_view"); (void)new TDEAction(KGuiItem(i18n("Replay Log"), "media-playback-start"), - 0, _status, TQT_SLOT(replayLog()), + 0, _status, TQ_SLOT(replayLog()), actionCollection(), "log_replay"); (void)new TDEAction(KGuiItem(i18n("Save Log..."), "document-save"), 0, - _status, TQT_SLOT(saveLog()), + _status, TQ_SLOT(saveLog()), actionCollection(), "log_save"); (void)new TDEAction(KGuiItem(i18n("Load Log..."), "document-open"), 0, - _status, TQT_SLOT(loadLog()), + _status, TQ_SLOT(loadLog()), actionCollection(), "log_load"); setupGUI( TDEMainWindow::Save | Create ); @@ -163,7 +163,7 @@ void MainWidget::configureSettings() dialog->addPage(new AppearanceConfig, i18n("Appearance"), "style"); CustomConfig *cc = new CustomConfig; dialog->addPage(cc, i18n("Custom Game"), "package_settings"); - connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_SLOT(settingsChanged())); + connect(dialog, TQ_SIGNAL(settingsChanged()), TQ_SLOT(settingsChanged())); dialog->show(); cc->init(); gc->init(); diff --git a/kmines/solver/solver.cpp b/kmines/solver/solver.cpp index 99070cad..9a416d28 100644 --- a/kmines/solver/solver.cpp +++ b/kmines/solver/solver.cpp @@ -174,7 +174,7 @@ bool Solver::solveStep() } if (_inOneStep) return solveStep(); - else TQTimer::singleShot(0, this, TQT_SLOT(solveStep())); + else TQTimer::singleShot(0, this, TQ_SLOT(solveStep())); return false; } @@ -191,7 +191,7 @@ SolvingRateDialog::SolvingRateDialog(const BaseField &field, TQWidget *parent) Close, parent, "compute_solving_rate", true, true), _refField(field) { - connect(&_solver, TQT_SIGNAL(solvingDone(bool)), TQT_SLOT(solvingDone(bool))); + connect(&_solver, TQ_SIGNAL(solvingDone(bool)), TQ_SLOT(solvingDone(bool))); KGuiItem item = KStdGuiItem::ok(); item.setText(i18n("Start")); @@ -225,7 +225,7 @@ void SolvingRateDialog::slotOk() _i = 0; _success = 0; _progress->setValue(0); - TQTimer::singleShot(0, this, TQT_SLOT(step())); + TQTimer::singleShot(0, this, TQ_SLOT(step())); } void SolvingRateDialog::step() @@ -245,5 +245,5 @@ void SolvingRateDialog::solvingDone(bool success) _label->setText(i18n("Success rate: %1%") .arg(_success * 100.0 / _i, 0, 'f', 3)); _progress->advance(1); - TQTimer::singleShot(0, this, TQT_SLOT(step())); + TQTimer::singleShot(0, this, TQ_SLOT(step())); } diff --git a/kmines/status.cpp b/kmines/status.cpp index 5272e68b..1e0d005b 100644 --- a/kmines/status.cpp +++ b/kmines/status.cpp @@ -49,10 +49,10 @@ Status::Status(TQWidget *parent) : TQWidget(parent, "status"), _oldLevel(Level::Easy) { _timer = new TQTimer(this); - connect(_timer, TQT_SIGNAL(timeout()), TQT_SLOT(replayStep())); + connect(_timer, TQ_SIGNAL(timeout()), TQ_SLOT(replayStep())); _solver = new Solver(this); - connect(_solver, TQT_SIGNAL(solvingDone(bool)), TQT_SLOT(solvingDone(bool))); + connect(_solver, TQ_SIGNAL(solvingDone(bool)), TQ_SLOT(solvingDone(bool))); // top layout TQGridLayout *top = new TQGridLayout(this, 2, 5, 10, 10); @@ -73,7 +73,7 @@ Status::Status(TQWidget *parent) // smiley smiley = new Smiley(this); - connect(smiley, TQT_SIGNAL(clicked()), TQT_SLOT(smileyClicked())); + connect(smiley, TQ_SIGNAL(clicked()), TQ_SLOT(smileyClicked())); smiley->setFocusPolicy(TQWidget::NoFocus); TQWhatsThis::add(smiley, i18n("Press to start a new game")); top->addWidget(smiley, 0, 2); @@ -93,13 +93,13 @@ Status::Status(TQWidget *parent) _field = new Field(_fieldContainer); _field->readSettings(); g->addWidget(_field, 0, 0, AlignCenter); - connect( _field, TQT_SIGNAL(updateStatus(bool)), TQT_SLOT(updateStatus(bool)) ); - connect(_field, TQT_SIGNAL(gameStateChanged(GameState)), - TQT_SLOT(gameStateChangedSlot(GameState)) ); - connect(_field, TQT_SIGNAL(setMood(Mood)), smiley, TQT_SLOT(setMood(Mood))); - connect(_field, TQT_SIGNAL(setCheating()), dg, TQT_SLOT(setCheating())); - connect(_field,TQT_SIGNAL(addAction(const KGrid2D::Coord &, Field::ActionType)), - TQT_SLOT(addAction(const KGrid2D::Coord &, Field::ActionType))); + connect( _field, TQ_SIGNAL(updateStatus(bool)), TQ_SLOT(updateStatus(bool)) ); + connect(_field, TQ_SIGNAL(gameStateChanged(GameState)), + TQ_SLOT(gameStateChangedSlot(GameState)) ); + connect(_field, TQ_SIGNAL(setMood(Mood)), smiley, TQ_SLOT(setMood(Mood))); + connect(_field, TQ_SIGNAL(setCheating()), dg, TQ_SLOT(setCheating())); + connect(_field,TQ_SIGNAL(addAction(const KGrid2D::Coord &, Field::ActionType)), + TQ_SLOT(addAction(const KGrid2D::Coord &, Field::ActionType))); TQWhatsThis::add(_field, i18n("Mines field.")); // resume button @@ -110,7 +110,7 @@ Status::Status(TQWidget *parent) TQPushButton *pb = new TQPushButton(i18n("Press to Resume"), _resumeContainer); pb->setFont(f); - connect(pb, TQT_SIGNAL(clicked()), TQT_SIGNAL(pause())); + connect(pb, TQ_SIGNAL(clicked()), TQ_SIGNAL(pause())); g->addWidget(pb, 0, 0, AlignCenter); _stack = new TQWidgetStack(this); -- cgit v1.2.1