diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-05-25 15:37:31 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-05-25 15:37:31 +0900 |
commit | 6392f5a9dfce2bf83617d49bb7f332181ec6004e (patch) | |
tree | ab69e390f7962b7e7dda1a3a64f035c61c751cf4 /languages/cpp/app_templates/tde4app/tdeapp4.cpp | |
parent | aba2788b428dc53243407902e9ccbb20b97a69fd (diff) | |
download | tdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.tar.gz tdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.zip |
Revert "Finish renaming tdevelop components"
This reverts commit 722ce1efbac31c61b1d4b13f7e075c9f311e3e73.
Diffstat (limited to 'languages/cpp/app_templates/tde4app/tdeapp4.cpp')
-rw-r--r-- | languages/cpp/app_templates/tde4app/tdeapp4.cpp | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.cpp b/languages/cpp/app_templates/tde4app/tdeapp4.cpp deleted file mode 100644 index d224123c..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4.cpp +++ /dev/null @@ -1,90 +0,0 @@ -%{CPP_TEMPLATE} - -#include "%{APPNAMELC}.h" -#include "%{APPNAMELC}view.h" -#include "settings.h" - -#include <TQtGui/TQDropEvent> -#include <TQtGui/TQPainter> - -#include <tdeconfigdialog.h> -#include <kstatusbar.h> - -#include <tdeaction.h> -#include <tdeactioncollection.h> -#include <kstandardaction.h> - -#include <KDE/TDELocale> - -%{APPNAME}::%{APPNAME}() - : KXmlGuiWindow(), - m_view(new %{APPNAME}View(this)), - m_printer(0) -{ - // accept dnd - setAcceptDrops(true); - - // tell the KXmlGuiWindow that this is indeed the main widget - setCentralWidget(m_view); - - // then, setup our actions - setupActions(); - - // add a status bar - statusBar()->show(); - - // a call to KXmlGuiWindow::setupGUI() populates the GUI - // with actions, using KXMLGUI. - // It also applies the saved mainwindow settings, if any, and ask the - // mainwindow to automatically save settings if changed: window size, - // toolbar position, icon size, etc. - setupGUI(); -} - -%{APPNAME}::~%{APPNAME}() -{ -} - -void %{APPNAME}::setupActions() -{ - TDEStandardAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - TDEStandardAction::quit(tqApp, TQT_SLOT(quit()), actionCollection()); - - TDEStandardAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); - - // custom menu and menu item - the slot is in the class %{APPNAME}View - TDEAction *custom = new TDEAction(TDEIcon("colorize"), i18n("Swi&tch Colors"), this); - actionCollection()->addAction( TQLatin1String("switch_action"), custom ); - connect(custom, TQT_SIGNAL(triggered(bool)), m_view, TQT_SLOT(switchColors())); -} - -void %{APPNAME}::fileNew() -{ - // this slot is called whenever the File->New menu is selected, - // the New shortcut is pressed (usually CTRL+N) or the New toolbar - // button is clicked - - // create a new window - (new %{APPNAME})->show(); -} - -void %{APPNAME}::optionsPreferences() -{ - // The preference dialog is derived from prefs_base.ui - // - // compare the names of the widgets in the .ui file - // to the names of the variables in the .kcfg file - //avoid to have 2 dialogs shown - if ( TDEConfigDialog::showDialog( "settings" ) ) { - return; - } - TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self()); - TQWidget *generalSettingsDlg = new TQWidget; - ui_prefs_base.setupUi(generalSettingsDlg); - dialog->addPage(generalSettingsDlg, i18n("General"), "package_setting"); - connect(dialog, TQT_SIGNAL(settingsChanged(TQString)), m_view, TQT_SLOT(settingsChanged())); - dialog->setAttribute( TQt::WA_DeleteOnClose ); - dialog->show(); -} - -#include "%{APPNAMELC}.moc" |