From 2e2a3c5923526e5f0baa0b4b85d32afec6f19805 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Mon, 17 Aug 2020 20:04:20 +0200 Subject: third step, convert to tdelibs libraries. Signed-off-by: gregory guy --- kpacman/Makefile.am | 8 ++++---- kpacman/Makefile.in | 22 +++++++++++----------- kpacman/board.cpp | 2 +- kpacman/keys.cpp | 10 +++++----- kpacman/keys.h | 2 +- kpacman/kpacman.cpp | 20 ++++++++++---------- kpacman/kpacman.desktop | 2 +- kpacman/kpacman.h | 44 ++++++++++++++++++++++---------------------- kpacman/kpacmanview.cpp | 4 ++-- kpacman/main.cpp | 18 +++++++++--------- kpacman/painter.cpp | 4 ++-- kpacman/painter.h | 2 +- kpacman/referee.cpp | 14 +++++++------- kpacman/score.cpp | 20 ++++++++++---------- kpacman/score.h | 2 +- kpacman/status.cpp | 4 ++-- kpacman/status.h | 2 +- 17 files changed, 90 insertions(+), 90 deletions(-) (limited to 'kpacman') diff --git a/kpacman/Makefile.am b/kpacman/Makefile.am index a98f991..15f0ab3 100644 --- a/kpacman/Makefile.am +++ b/kpacman/Makefile.am @@ -1,10 +1,10 @@ -####### kdevelop will overwrite this part!!! (begin)########## +####### tdevelop will overwrite this part!!! (begin)########## bin_PROGRAMS = kpacman -## INCLUDES were found outside kdevelop specific part +## INCLUDES were found outside tdevelop specific part kpacman_SOURCES = kpacmanview.cpp referee.cpp status.cpp painter.cpp score.cpp pacman.cpp monster.cpp keys.cpp fruit.cpp energizer.cpp board.cpp bitfont.cpp kpacman.cpp main.cpp -kpacman_LDADD = -lkdegames $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET) +kpacman_LDADD = -ltdegames $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_QT) $(LIBSOCKET) EXTRA_DIST = main.cpp kpacman.cpp kpacman.h kpacman.desktop lo32-app-kpacman.png lo16-app-kpacman.png bitfont.cpp bitfont.h colors.h bitmaps.h board.cpp board.h energizer.cpp energizer.h fruit.cpp fruit.h keys.cpp keys.h monster.cpp monster.h pacman.cpp pacman.h score.cpp score.h painter.cpp painter.h status.cpp status.h referee.cpp referee.h kpacmanrc kpacmanview.h kpacmanview.cpp kpacmanui.rc hi16-app-kpacman.png hi32-app-kpacman.png @@ -31,7 +31,7 @@ uninstall-local: -rm -f $(kde_icondir)/hicolor/16x16/apps/kpacman.png -rm -f $(kde_icondir)/hicolor/32x32/apps/kpacman.png -####### kdevelop will overwrite this part!!! (end)############ +####### tdevelop will overwrite this part!!! (end)############ # this 10 paths are KDE specific. Use them: # kde_htmldir Where your docs should go to. (contains lang subdirs) # kde_appsdir Where your application file (.kdelnk) should go to. diff --git a/kpacman/Makefile.in b/kpacman/Makefile.in index 22a7c3e..2895d1a 100644 --- a/kpacman/Makefile.in +++ b/kpacman/Makefile.in @@ -109,16 +109,16 @@ LIBXINERAMA = @LIBXINERAMA@ LIBZ = @LIBZ@ LIB_KAB = @LIB_KAB@ LIB_KABC = @LIB_KABC@ -LIB_KDECORE = @LIB_KDECORE@ -LIB_KDEPRINT = @LIB_KDEPRINT@ -LIB_KDEUI = @LIB_KDEUI@ +LIB_TDECORE = @LIB_TDECORE@ +LIB_TDEPRINT = @LIB_TDEPRINT@ +LIB_TDEUI = @LIB_TDEUI@ LIB_KFILE = @LIB_KFILE@ LIB_KFM = @LIB_KFM@ -LIB_KHTML = @LIB_KHTML@ -LIB_KIO = @LIB_KIO@ -LIB_KPARTS = @LIB_KPARTS@ -LIB_KSPELL = @LIB_KSPELL@ -LIB_KSYCOCA = @LIB_KSYCOCA@ +LIB_TDEHTML = @LIB_TDEHTML@ +LIB_TDEIO = @LIB_TDEIO@ +LIB_TDEPARTS = @LIB_TDEPARTS@ +LIB_TDESPELL = @LIB_TDESPELL@ +LIB_TDESYCOCA = @LIB_TDESYCOCA@ LIB_POLL = @LIB_POLL@ LIB_QPE = @LIB_QPE@ LIB_QT = @LIB_QT@ @@ -235,15 +235,15 @@ target_vendor = @target_vendor@ x_includes = @x_includes@ x_libraries = @x_libraries@ -####### kdevelop will overwrite this part!!! (begin)########## +####### tdevelop will overwrite this part!!! (begin)########## bin_PROGRAMS = kpacman kpacman_SOURCES = kpacmanview.cpp referee.cpp status.cpp painter.cpp score.cpp pacman.cpp monster.cpp keys.cpp fruit.cpp energizer.cpp board.cpp bitfont.cpp kpacman.cpp main.cpp -kpacman_LDADD = -lkdegames $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET) +kpacman_LDADD = -ltdegames $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_QT) $(LIBSOCKET) EXTRA_DIST = main.cpp kpacman.cpp kpacman.h kpacman.desktop lo32-app-kpacman.png lo16-app-kpacman.png bitfont.cpp bitfont.h colors.h bitmaps.h board.cpp board.h energizer.cpp energizer.h fruit.cpp fruit.h keys.cpp keys.h monster.cpp monster.h pacman.cpp pacman.h score.cpp score.h painter.cpp painter.h status.cpp status.h referee.cpp referee.h kpacmanrc kpacmanview.h kpacmanview.cpp kpacmanui.rc hi16-app-kpacman.png hi32-app-kpacman.png -####### kdevelop will overwrite this part!!! (end)############ +####### tdevelop will overwrite this part!!! (end)############ # this 10 paths are KDE specific. Use them: # kde_htmldir Where your docs should go to. (contains lang subdirs) # kde_appsdir Where your application file (.kdelnk) should go to. diff --git a/kpacman/board.cpp b/kpacman/board.cpp index 1f98f7f..b08928e 100644 --- a/kpacman/board.cpp +++ b/kpacman/board.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/kpacman/keys.cpp b/kpacman/keys.cpp index 8dc5648..46b55d7 100644 --- a/kpacman/keys.cpp +++ b/kpacman/keys.cpp @@ -1,11 +1,11 @@ #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include @@ -16,7 +16,7 @@ Keys::Keys( TQWidget *parent, const char *name) : TQDialog( parent, name, TRUE ) { - KStandardDirs *dirs = KGlobal::dirs(); + TDEStandardDirs *dirs = TDEGlobal::dirs(); TQPushButton *okButton = new TQPushButton(this); okButton->setText(i18n("Ok")); @@ -91,7 +91,7 @@ Keys::Keys( TQWidget *parent, const char *name) void Keys::keyPressEvent( TQKeyEvent *e ) { uint kCode = e->key() & ~(SHIFT | CTRL | ALT); - TQString string = KAccel::keyToString(kCode); + TQString string = TDEAccel::keyToString(kCode); if (lab != 0) { if ( string.isNull() ) diff --git a/kpacman/keys.h b/kpacman/keys.h index ca27d99..e2fb5ea 100644 --- a/kpacman/keys.h +++ b/kpacman/keys.h @@ -11,7 +11,7 @@ #include #include -#include +#include class Keys : public TQDialog { diff --git a/kpacman/kpacman.cpp b/kpacman/kpacman.cpp index 7ee12c3..4b87122 100644 --- a/kpacman/kpacman.cpp +++ b/kpacman/kpacman.cpp @@ -32,7 +32,7 @@ #define ID_STATUS_MSG 1 -KpacmanApp::KpacmanApp(TQWidget *, const char *name) : KMainWindow(0, name) +KpacmanApp::KpacmanApp(TQWidget *, const char *name) : TDEMainWindow(0, name) { config=kapp->config(); @@ -75,16 +75,16 @@ void KpacmanApp::initActions() showMenuBar = KStdAction::showMenubar(this, SLOT(slotShowMenuBar()), actionCollection()); showToolBar = KStdAction::showToolbar(this, SLOT(slotShowToolBar()), actionCollection()); showStatusBar = KStdAction::showStatusbar(this, SLOT(slotShowStatusBar()), actionCollection()); - showMouseCursor = new KToggleAction(i18n("Show Mouse&cursor"), 0, + showMouseCursor = new TDEToggleAction(i18n("Show Mouse&cursor"), 0, this, SLOT(slotShowMouseCursor()), actionCollection(), "options_show_mousecursor"); - selectGraphicScheme = new KActionMenu(i18n("&Select graphic scheme"), actionCollection(), + selectGraphicScheme = new TDEActionMenu(i18n("&Select graphic scheme"), actionCollection(), "options_select_graphic_scheme"); KStdAction::keyBindings(this, SLOT(slotKeyBindings()), actionCollection()); - focusOutPause = new KToggleAction(i18n("Pause in &Background"), 0, + focusOutPause = new TDEToggleAction(i18n("Pause in &Background"), 0, this, SLOT(slotFocusOutPause()), actionCollection(), "options_focus_out_pause"); - focusInContinue = new KToggleAction(i18n("Continue in &Foreground"), 0, + focusInContinue = new TDEToggleAction(i18n("Continue in &Foreground"), 0, this, SLOT(slotFocusInContinue()), actionCollection(), "options_focus_in_continue"); @@ -109,7 +109,7 @@ void KpacmanApp::initStatusBar() void KpacmanApp::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. view = new KpacmanView(this); @@ -167,8 +167,8 @@ void KpacmanApp::readOptions() slotFocusInContinue(); // bar position settings - KToolBar::BarPosition toolBarPos; - toolBarPos = (KToolBar::BarPosition) config->readNumEntry("ToolBarPos", KToolBar::Top); + TDEToolBar::BarPosition toolBarPos; + toolBarPos = (TDEToolBar::BarPosition) config->readNumEntry("ToolBarPos", TDEToolBar::Top); toolBar("mainToolBar")->setBarPos(toolBarPos); TQSize size = config->readSizeEntry("Geometry"); @@ -196,7 +196,7 @@ void KpacmanApp::readSchemes() schemeID.resize(schemeCount); schemeMode.resize(schemeCount); - schemesPopup = new TQList; + schemesPopup = new TQList; schemesPopup->setAutoDelete(true); modesPopup = selectGraphicScheme->popupMenu(); @@ -216,7 +216,7 @@ void KpacmanApp::readSchemes() description = config->readEntry("Description", group); - KPopupMenu *p = new KPopupMenu; + TDEPopupMenu *p = new TDEPopupMenu; p->setCheckable(true); connect(p, SIGNAL(activated(int)), this, SLOT(slotSchemeActivated(int))); schemesPopup->append(p); diff --git a/kpacman/kpacman.desktop b/kpacman/kpacman.desktop index 399ab77..97c88c3 100644 --- a/kpacman/kpacman.desktop +++ b/kpacman/kpacman.desktop @@ -4,7 +4,7 @@ Type=Application Exec=kpacman -caption "%c" %i %m Icon=kpacman.png MiniIcon=kpacman.png -DocPath=kpacman/index.html +X-DocPath=kpacman/index.html Comment= Comment[de]= Terminal=0 diff --git a/kpacman/kpacman.h b/kpacman/kpacman.h index 04210af..c6ab495 100644 --- a/kpacman/kpacman.h +++ b/kpacman/kpacman.h @@ -30,11 +30,11 @@ //include files for KDE #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // application specific includes #include "kpacmanview.h" @@ -49,7 +49,7 @@ class KpacmanView; /** * The base class for Kpacman application. */ -class KpacmanApp : public KMainWindow +class KpacmanApp : public TDEMainWindow { Q_OBJECT @@ -72,7 +72,7 @@ class KpacmanApp : public KMainWindow /** read graphic schemes and build menu items for selection */ void readSchemes(); - /** initializes the KActions of the application */ + /** initializes the TDEActions of the application */ void initActions(); /** sets up the statusbar for the main window by initialzing a statuslabel. */ @@ -144,7 +144,7 @@ class KpacmanApp : public KMainWindow private: /** the configuration object of the application */ - KConfig *config; + TDEConfig *config; /** view is the main widget which represents your working area. The View * class should handle all events of the view widget. It is kept empty so * you can create your view according to your application's needs by @@ -152,25 +152,25 @@ class KpacmanApp : public KMainWindow */ KpacmanView *view; - // KAction pointers to enable/disable actions - KAction* gameNew; - KToggleAction* gamePause; - KAction* gameHighscores; - KAction* gameQuit; - KToggleAction* showMenuBar; - KToggleAction* showToolBar; - KToggleAction* showStatusBar; - KToggleAction* showMouseCursor; - KToggleAction* focusOutPause; - KToggleAction* focusInContinue; - KActionMenu* selectGraphicScheme; + // TDEAction pointers to enable/disable actions + TDEAction* gameNew; + TDEToggleAction* gamePause; + TDEAction* gameHighscores; + TDEAction* gameQuit; + TDEToggleAction* showMenuBar; + TDEToggleAction* showToolBar; + TDEToggleAction* showStatusBar; + TDEToggleAction* showMouseCursor; + TDEToggleAction* focusOutPause; + TDEToggleAction* focusInContinue; + TDEActionMenu* selectGraphicScheme; // active scheme/mode int scheme; int mode; - KPopupMenu *modesPopup; // KAction main scheme selection menu - TQList *schemesPopup; // submenus for selecting scheme + TDEPopupMenu *modesPopup; // TDEAction main scheme selection menu + TQList *schemesPopup; // submenus for selecting scheme // ID's of the menuitem(s) for finding/selecting scheme by id TQArray modeID; diff --git a/kpacman/kpacmanview.cpp b/kpacman/kpacmanview.cpp index b1931ec..1999c41 100644 --- a/kpacman/kpacmanview.cpp +++ b/kpacman/kpacmanview.cpp @@ -20,7 +20,7 @@ // include files for KDE #include -#include +#include #include // application specific includes @@ -51,7 +51,7 @@ KpacmanView::~KpacmanView() void KpacmanView::confMisc(bool defGroup) { - KStandardDirs *dirs = KGlobal::dirs(); + TDEStandardDirs *dirs = TDEGlobal::dirs(); TQString findPath; if (defGroup || kapp->config()->hasKey("Font")) { diff --git a/kpacman/main.cpp b/kpacman/main.cpp index 48ebf48..14ac8e0 100644 --- a/kpacman/main.cpp +++ b/kpacman/main.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include "kpacman.h" @@ -31,7 +31,7 @@ static const char *description = "the last 14 years of her friendship\n" "and Christine Nickel for the 'K' in my life."); -static KCmdLineOptions options[] = +static TDECmdLineOptions options[] = { { 0, 0, 0 } // INSERT YOUR COMMANDLINE OPTIONS HERE @@ -40,14 +40,14 @@ static KCmdLineOptions options[] = int main(int argc, char *argv[]) { - KAboutData aboutData( "kpacman", I18N_NOOP("Kpacman"), - VERSION, description, KAboutData::License_GPL, + TDEAboutData aboutData( "kpacman", I18N_NOOP("Kpacman"), + VERSION, description, TDEAboutData::License_GPL, "(c) 1998-2003, Jörg Thönnissen", 0, 0, "joe@dsite.de"); aboutData.addAuthor("Jörg Thönnissen",0, "joe@dsite.de"); - KCmdLineArgs::init( argc, argv, &aboutData ); - KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. + TDECmdLineArgs::init( argc, argv, &aboutData ); + TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options. - KApplication app; + TDEApplication app; KpacmanApp *kpacman = new KpacmanApp(); kpacman->show(); diff --git a/kpacman/painter.cpp b/kpacman/painter.cpp index 9060620..b585df3 100644 --- a/kpacman/painter.cpp +++ b/kpacman/painter.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -759,7 +759,7 @@ void Painter::fillPixmapName(TQStrList &pixmapName) pixmap = list.at(i); if (pixmap.left(1) != "/" && pixmap.left(1) != "~") - pixmap = KGlobal::dirs()->findResource("appdata", pixmapDirectory+pixmap); + pixmap = TDEGlobal::dirs()->findResource("appdata", pixmapDirectory+pixmap); fileInfo.setFile(pixmap); if (!fileInfo.isReadable() || !fileInfo.isFile()) diff --git a/kpacman/painter.h b/kpacman/painter.h index ebd5bba..d44705c 100644 --- a/kpacman/painter.h +++ b/kpacman/painter.h @@ -2,7 +2,7 @@ #define PAINTER_H #include -#include +#include #include #include diff --git a/kpacman/referee.cpp b/kpacman/referee.cpp index bc8660b..efe0d12 100644 --- a/kpacman/referee.cpp +++ b/kpacman/referee.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "board.h" #include "pacman.h" @@ -409,19 +409,19 @@ void Referee::initKeys() { TQString up("Up"); up = kapp->config()->readEntry("upKey", (const char*) up); - UpKey = KAccel::stringToKey(up); + UpKey = TDEAccel::stringToKey(up); TQString down("Down"); down = kapp->config()->readEntry("downKey", (const char*) down); - DownKey = KAccel::stringToKey(down); + DownKey = TDEAccel::stringToKey(down); TQString left("Left"); left = kapp->config()->readEntry("leftKey", (const char*) left); - LeftKey = KAccel::stringToKey(left); + LeftKey = TDEAccel::stringToKey(left); TQString right("Right"); right = kapp->config()->readEntry("rightKey", (const char*) right); - RightKey = KAccel::stringToKey(right); + RightKey = TDEAccel::stringToKey(right); } void Referee::fillArray(TQArray &array, TQString values, int max) @@ -490,7 +490,7 @@ void Referee::fillMapName() map = list.at(i); if (map.left(1) != "/" && map.left(1) != "~") - map = KGlobal::dirs()->findResource("appdata", mapDirectory+map); + map = TDEGlobal::dirs()->findResource("appdata", mapDirectory+map); fileInfo.setFile(map); if (!fileInfo.isReadable()) diff --git a/kpacman/score.cpp b/kpacman/score.cpp index aa2045a..ffa4ecc 100644 --- a/kpacman/score.cpp +++ b/kpacman/score.cpp @@ -3,12 +3,12 @@ #include #include -#include +#include #include -#include +#include #include -#include +#include #include #include #include @@ -252,19 +252,19 @@ void Score::initKeys() { TQString up("Up"); up = kapp->config()->readEntry("upKey", (const char*) up); - UpKey = KAccel::stringToKey(up); + UpKey = TDEAccel::stringToKey(up); TQString down("Down"); down = kapp->config()->readEntry("downKey", (const char*) down); - DownKey = KAccel::stringToKey(down); + DownKey = TDEAccel::stringToKey(down); TQString left("Left"); left = kapp->config()->readEntry("leftKey", (const char*) left); - LeftKey = KAccel::stringToKey(left); + LeftKey = TDEAccel::stringToKey(left); TQString right("Right"); right = kapp->config()->readEntry("rightKey", (const char*) right); - RightKey = KAccel::stringToKey(right); + RightKey = TDEAccel::stringToKey(right); } void Score::confTiming(bool defGroup) @@ -584,7 +584,7 @@ int Score::y(float row) /** * Ermittelt die zu benutzende "highscore"-Datei, in die auch geschrieben werden kann. - * Über den "highscoreFilePath"-KConfig-Eintrag, kann abweichend von der Standardlokation + * Über den "highscoreFilePath"-TDEConfig-Eintrag, kann abweichend von der Standardlokation * der Standort der "highscore"-Datei spezifiziert werden. * Wenn die systemweite "highscore"-Datei nicht beschrieben werden kann, wird mit einer * privaten Datei gearbeitet. @@ -595,14 +595,14 @@ TQFileInfo Score::locateHighscoreFilePath() TQStringList systemHighscoreDirs; // Schreibfähige "private" highscore-Datei ermitteln für den fallback. - privateHighscoreFileInfo.setFile(KGlobal::dirs()->saveLocation("appdata")+highscoreName); + privateHighscoreFileInfo.setFile(TDEGlobal::dirs()->saveLocation("appdata")+highscoreName); // FilePath aus der Konfigurationsdatei benutzen systemHighscoreFileInfo.setFile(kapp->config()->readEntry("HighscoreFilePath")); // Kein Wert aus der Konfiguration erhalten, dann die "system"-Datei suchen. if (systemHighscoreFileInfo.filePath().isEmpty()) - systemHighscoreDirs = KGlobal::dirs()->resourceDirs("appdata"); + systemHighscoreDirs = TDEGlobal::dirs()->resourceDirs("appdata"); else systemHighscoreDirs = TQStringList(systemHighscoreFileInfo.filePath()); diff --git a/kpacman/score.h b/kpacman/score.h index a6bc1de..d26af2e 100644 --- a/kpacman/score.h +++ b/kpacman/score.h @@ -70,7 +70,7 @@ private: /** * Ermittelt die zu benutzende "highscore"-Datei, in die auch geschrieben werden kann. - * Über den "highscoreFilePath"-KConfig-Eintrag, kann abweichend von der Standardlokation + * Über den "highscoreFilePath"-TDEConfig-Eintrag, kann abweichend von der Standardlokation * der Standort der "highscore"-Datei spezifiziert werden. * Wenn die systemweite "globale" Datei nicht beschrieben werden kann, wird mit einer * privaten Datei gearbeitet. diff --git a/kpacman/status.cpp b/kpacman/status.cpp index 8ccb7ab..6143b00 100644 --- a/kpacman/status.cpp +++ b/kpacman/status.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -199,7 +199,7 @@ void Status::fillPixmapName(TQStrList &pixmapName) pixmap = list.at(i); if (pixmap.left(1) != "/" && pixmap.left(1) != "~") - pixmap = KGlobal::dirs()->findResource("appdata", pixmapDirectory+pixmap); + pixmap = TDEGlobal::dirs()->findResource("appdata", pixmapDirectory+pixmap); fileInfo.setFile(pixmap); if (!fileInfo.isReadable() || !fileInfo.isFile()) diff --git a/kpacman/status.h b/kpacman/status.h index 6eeb4ac..6428043 100644 --- a/kpacman/status.h +++ b/kpacman/status.h @@ -6,7 +6,7 @@ #endif #include -#include +#include #include #include -- cgit v1.2.1