diff options
Diffstat (limited to 'lskat')
-rw-r--r-- | lskat/lskat/lskat.cpp | 60 | ||||
-rw-r--r-- | lskat/lskat/lskat.h | 30 |
2 files changed, 45 insertions, 45 deletions
diff --git a/lskat/lskat/lskat.cpp b/lskat/lskat/lskat.cpp index 2bd00ade..73e372f9 100644 --- a/lskat/lskat/lskat.cpp +++ b/lskat/lskat/lskat.cpp @@ -45,7 +45,7 @@ #define ID_STATUS_MSG 1003 #define ID_STATUS_MOVER 1002 -LSkatApp::LSkatApp() : KMainWindow(0) +LSkatApp::LSkatApp() : TDEMainWindow(0) { config=kapp->config(); @@ -62,7 +62,7 @@ LSkatApp::LSkatApp() : KMainWindow(0) initGUI(); initStatusBar(); - setupGUI(KMainWindow::StatusBar | Save); + setupGUI(TDEMainWindow::StatusBar | Save); createGUI(TQString(), false); initDocument(); @@ -120,17 +120,17 @@ void LSkatApp::checkMenus(int menu) if (!menu || (menu&CheckOptionsMenu)) { - ((KSelectAction *)ACTION("startplayer"))->setCurrentItem(doc->GetStartPlayer()); + ((TDESelectAction *)ACTION("startplayer"))->setCurrentItem(doc->GetStartPlayer()); if (doc->IsRunning()) disableAction("startplayer"); else enableAction("startplayer"); if (doc->GetPlayedBy(0)==KG_INPUTTYPE_INTERACTIVE) - ((KSelectAction *)ACTION("player1"))->setCurrentItem(0); + ((TDESelectAction *)ACTION("player1"))->setCurrentItem(0); else if (doc->GetPlayedBy(0)==KG_INPUTTYPE_PROCESS) - ((KSelectAction *)ACTION("player1"))->setCurrentItem(1); + ((TDESelectAction *)ACTION("player1"))->setCurrentItem(1); else - ((KSelectAction *)ACTION("player1"))->setCurrentItem(2); + ((TDESelectAction *)ACTION("player1"))->setCurrentItem(2); /* if (doc->IsRunning()) disableAction("player1"); @@ -138,18 +138,18 @@ void LSkatApp::checkMenus(int menu) */ if (doc->GetPlayedBy(1)==KG_INPUTTYPE_INTERACTIVE) - ((KSelectAction *)ACTION("player2"))->setCurrentItem(0); + ((TDESelectAction *)ACTION("player2"))->setCurrentItem(0); else if (doc->GetPlayedBy(1)==KG_INPUTTYPE_PROCESS) - ((KSelectAction *)ACTION("player2"))->setCurrentItem(1); + ((TDESelectAction *)ACTION("player2"))->setCurrentItem(1); else - ((KSelectAction *)ACTION("player2"))->setCurrentItem(2); + ((TDESelectAction *)ACTION("player2"))->setCurrentItem(2); /* if (doc->IsRunning()) disableAction("player2"); else enableAction("player2"); */ - ((KSelectAction *)ACTION("choose_level"))->setCurrentItem(doc->GetComputerLevel()-1); + ((TDESelectAction *)ACTION("choose_level"))->setCurrentItem(doc->GetComputerLevel()-1); } } @@ -161,15 +161,15 @@ void LSkatApp::initGUI() (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection(), "new_game"); ACTION("new_game")->setStatusText(i18n("Starting a new game...")); ACTION("new_game")->setWhatsThis(i18n("Starting a new game...")); - (void)new KAction(i18n("&End Game"),"stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileEnd()), + (void)new TDEAction(i18n("&End Game"),"stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileEnd()), actionCollection(), "end_game"); ACTION("end_game")->setStatusText(i18n("Ending the current game...")); ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared.")); - (void)new KAction(i18n("&Clear Statistics"),"flag", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileStatistics()), + (void)new TDEAction(i18n("&Clear Statistics"),"flag", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileStatistics()), actionCollection(), "clear_statistics"); ACTION("clear_statistics")->setStatusText(i18n("Delete all time statistics...")); ACTION("clear_statistics")->setWhatsThis(i18n("Clears the all time statistics which is kept in all sessions.")); - (void)new KAction(i18n("Send &Message..."), CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotFileMessage()), + (void)new TDEAction(i18n("Send &Message..."), CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotFileMessage()), actionCollection(), "send_message"); ACTION("send_message")->setStatusText(i18n("Sending message to remote player...")); ACTION("send_message")->setWhatsThis(i18n("Allows you to talk with a remote player.")); @@ -177,16 +177,16 @@ void LSkatApp::initGUI() ACTION("game_exit")->setStatusText(i18n("Exiting...")); ACTION("game_exit")->setWhatsThis(i18n("Quits the program.")); - (void)new KSelectAction(i18n("Starting Player"),0,TQT_TQOBJECT(this),TQT_SLOT(slotStartplayer()), + (void)new TDESelectAction(i18n("Starting Player"),0,TQT_TQOBJECT(this),TQT_SLOT(slotStartplayer()), actionCollection(), "startplayer"); ACTION("startplayer")->setStatusText(i18n("Changing starting player...")); ACTION("startplayer")->setWhatsThis(i18n("Chooses which player begins the next game.")); list.clear(); list.append(i18n("Player &1")); list.append(i18n("Player &2")); - ((KSelectAction *)ACTION("startplayer"))->setItems(list); + ((TDESelectAction *)ACTION("startplayer"))->setItems(list); - (void)new KSelectAction(i18n("Player &1 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer1By()), + (void)new TDESelectAction(i18n("Player &1 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer1By()), actionCollection(), "player1"); ACTION("player1")->setStatusText(i18n("Changing who plays player 1...")); ACTION("player1")->setWhatsThis(i18n("Changing who plays player 1...")); @@ -194,14 +194,14 @@ void LSkatApp::initGUI() list.append(i18n("&Player")); list.append(i18n("&Computer")); list.append(i18n("&Remote")); - ((KSelectAction *)ACTION("player1"))->setItems(list); - (void)new KSelectAction(i18n("Player &2 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer2By()), + ((TDESelectAction *)ACTION("player1"))->setItems(list); + (void)new TDESelectAction(i18n("Player &2 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer2By()), actionCollection(), "player2"); ACTION("player1")->setStatusText(i18n("Changing who plays player 2...")); ACTION("player1")->setWhatsThis(i18n("Changing who plays player 2...")); - ((KSelectAction *)ACTION("player2"))->setItems(list); + ((TDESelectAction *)ACTION("player2"))->setItems(list); - (void)new KSelectAction(i18n("&Level"),0,TQT_TQOBJECT(this),TQT_SLOT(slotLevel()), + (void)new TDESelectAction(i18n("&Level"),0,TQT_TQOBJECT(this),TQT_SLOT(slotLevel()), actionCollection(), "choose_level"); ACTION("choose_level")->setStatusText(i18n("Change level...")); ACTION("choose_level")->setWhatsThis(i18n("Change the strength of the computer player.")); @@ -209,14 +209,14 @@ void LSkatApp::initGUI() list.append(i18n("&Normal")); list.append(i18n("&Advanced")); list.append(i18n("&Hard")); - ((KSelectAction *)ACTION("choose_level"))->setItems(list); + ((TDESelectAction *)ACTION("choose_level"))->setItems(list); - (void)new KAction(i18n("Select &Card Deck..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsCardDeck()), + (void)new TDEAction(i18n("Select &Card Deck..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsCardDeck()), actionCollection(), "select_carddeck"); ACTION("select_carddeck")->setStatusText(i18n("Configure card decks...")); ACTION("select_carddeck")->setWhatsThis(i18n("Choose how the cards should look.")); - (void)new KAction(i18n("Change &Names..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsNames()), + (void)new TDEAction(i18n("Change &Names..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsNames()), actionCollection(), "change_names"); ACTION("change_names")->setStatusText(i18n("Configure player names...")); ACTION("change_names")->setWhatsThis(i18n("Configure player names...")); @@ -256,7 +256,7 @@ void LSkatApp::initDocument() void LSkatApp::initView() { //////////////////////////////////////////////////////////////////// - // create the main widget here that is managed by KMainWindow's view-region and + // create the main widget here that is managed by TDEMainWindow's view-region and // connect the widget to your document to display document contents. view = new LSkatView(this); doc->addView(view); @@ -268,7 +268,7 @@ void LSkatApp::enableAction(const char *s) { if (s) { - KAction *act=actionCollection()->action(s); + TDEAction *act=actionCollection()->action(s); if (act) act->setEnabled(true); } @@ -277,7 +277,7 @@ void LSkatApp::disableAction(const char *s) { if (s) { - KAction *act=actionCollection()->action(s); + TDEAction *act=actionCollection()->action(s); if (act) act->setEnabled(false); } } @@ -430,14 +430,14 @@ void LSkatApp::slotFileQuit() void LSkatApp::slotStartplayer() { - int i=((KSelectAction *)ACTION("startplayer"))->currentItem(); + int i=((TDESelectAction *)ACTION("startplayer"))->currentItem(); doc->SetStartPlayer(i); doc->UpdateViews(UPDATE_STATUS); } void LSkatApp::slotPlayer1By() { - switch(((KSelectAction *)ACTION("player1"))->currentItem()) + switch(((TDESelectAction *)ACTION("player1"))->currentItem()) { case 0: slotPlayer1(KG_INPUTTYPE_INTERACTIVE); @@ -453,7 +453,7 @@ void LSkatApp::slotPlayer1By() void LSkatApp::slotPlayer2By() { - switch(((KSelectAction *)ACTION("player2"))->currentItem()) + switch(((TDESelectAction *)ACTION("player2"))->currentItem()) { case 0: slotPlayer2(KG_INPUTTYPE_INTERACTIVE); @@ -533,7 +533,7 @@ void LSkatApp::slotOptionsCardDeck() void LSkatApp::slotLevel() { - int i=((KSelectAction *)ACTION("choose_level"))->currentItem(); + int i=((TDESelectAction *)ACTION("choose_level"))->currentItem(); i++; // we start at 1 doc->SetComputerLevel(i); doc->UpdateViews(UPDATE_STATUS); diff --git a/lskat/lskat/lskat.h b/lskat/lskat/lskat.h index 1c29845c..83882358 100644 --- a/lskat/lskat/lskat.h +++ b/lskat/lskat/lskat.h @@ -56,17 +56,17 @@ class LSkatView; * window and reads the config file as well as providing a menubar, toolbar * and statusbar. An instance of LSkatView creates your center view, which is connected * to the window's Doc object. - * LSkatApp reimplements the methods that KMainWindow provides for main window handling and supports - * full session management as well as keyboard accelerator configuration by using KAccel. - * @see KMainWindow + * LSkatApp reimplements the methods that TDEMainWindow provides for main window handling and supports + * full session management as well as keyboard accelerator configuration by using TDEAccel. + * @see TDEMainWindow * @see TDEApplication * @see TDEConfig - * @see KAccel + * @see TDEAccel * * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @version KDevelop version 0.4 code generation */ -class LSkatApp : public KMainWindow +class LSkatApp : public TDEMainWindow { Q_OBJECT @@ -86,7 +86,7 @@ class LSkatApp : public KMainWindow void disableAction(const char *); /** add a opened file to the recent file list and update recent_file_menu */ - /** returns a pointer to the current document connected to the KMainWindow instance and is used by + /** returns a pointer to the current document connected to the TDEMainWindow instance and is used by * the View class to access the document object's methods */ LSkatDoc *getDocument() const; @@ -118,31 +118,31 @@ class LSkatApp : public KMainWindow * @see initView(); */ void initDocument(); - /** creates the centerwidget of the KMainWindow instance and sets it as the view + /** creates the centerwidget of the TDEMainWindow instance and sets it as the view */ void initView(); - /** queryClose is called by KMainWindow on each closeEvent of a window. Against the + /** queryClose is called by TDEMainWindow on each closeEvent of a window. Against the * default implementation (only returns true), this calles saveModified() on the document object to ask if the document shall * be saved if Modified; on cancel the closeEvent is rejected. - * @see KMainWindow#queryClose - * @see KMainWindow#closeEvent + * @see TDEMainWindow#queryClose + * @see TDEMainWindow#closeEvent */ virtual bool queryClose(); - /** queryExit is called by KMainWindow when the last window of the application is going to be closed during the closeEvent(). + /** queryExit is called by TDEMainWindow when the last window of the application is going to be closed during the closeEvent(). * Against the default implementation that just returns true, this calls saveOptions() to save the settings of the last window's * properties. - * @see KMainWindow#queryExit - * @see KMainWindow#closeEvent + * @see TDEMainWindow#queryExit + * @see TDEMainWindow#closeEvent */ virtual bool queryExit(); /** saves the window properties for each open window during session end to the session config file, including saving the currently * opened file by a temporary filename provided by TDEApplication. - * @see KMainWindow#saveProperties + * @see TDEMainWindow#saveProperties */ virtual void saveProperties(TDEConfig *_cfg); /** reads the session config file and restores the application's state including the last opened files and documents by reading the * temporary files saved by saveProperties() - * @see KMainWindow#readProperties + * @see TDEMainWindow#readProperties */ virtual void readProperties(TDEConfig *_cfg); |