diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 20:52:31 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 20:52:31 +0200 |
commit | c5f75332bb8fa8d1a0a28037b4cc8f7f71e37f8f (patch) | |
tree | 1ec78a7a0c522677ca47ba31aed55edb1e9853d0 /src/main.cpp | |
parent | 91d2d7482c36e67cb36df9d1dcdbd989911e4ceb (diff) | |
download | qalculate-tde-c5f75332bb8fa8d1a0a28037b4cc8f7f71e37f8f.tar.gz qalculate-tde-c5f75332bb8fa8d1a0a28037b4cc8f7f71e37f8f.zip |
Initial TDE conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/main.cpp b/src/main.cpp index b7f36e7..c9c9ee6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -24,15 +24,15 @@ #include "kqalculate.h" #include "preferences.h" -#include <kwin.h> +#include <twin.h> #include <kuniqueapplication.h> -#include <kaboutdata.h> -#include <kcmdlineargs.h> -#include <klocale.h> +#include <tdeaboutdata.h> +#include <tdecmdlineargs.h> +#include <tdelocale.h> #include <unistd.h> #include <tqtextcodec.h> #include <tqobject.h> -#include <kmessagebox.h> +#include <tdemessagebox.h> #include <tqtimer.h> #include <klineedit.h> #include <tqtooltip.h> @@ -46,11 +46,11 @@ static const char description[] = I18N_NOOP("A powerful and easy to use desktop static const char version[] = VERSION; -static KCmdLineOptions options[] = { +static TDECmdLineOptions options[] = { {"c", 0, 0}, {"clipboard", I18N_NOOP("Calculate X11-clipboard content (selected text)"), 0}, {"+[Expression]", I18N_NOOP( "Initial expression to calculate" ), 0}, - KCmdLineLastOption + TDECmdLineLastOption }; extern KnownVariable *vans[5]; @@ -83,8 +83,8 @@ void create_qalculate_window(KUniqueApplication *parent) { b_busy = false; new Calculator(); - if(KGlobal::locale()->decimalSymbol() == ",") CALCULATOR->useDecimalComma(); - CALCULATOR->place_currency_code_before = KGlobal::locale()->positivePrefixCurrencySymbol(); + if(TDEGlobal::locale()->decimalSymbol() == ",") CALCULATOR->useDecimalComma(); + CALCULATOR->place_currency_code_before = TDEGlobal::locale()->positivePrefixCurrencySymbol(); //load application specific preferences load_preferences(); @@ -105,7 +105,7 @@ void create_qalculate_window(KUniqueApplication *parent) { } -TQString parse_expression_arguments(KCmdLineArgs *args) { +TQString parse_expression_arguments(TDECmdLineArgs *args) { TQString calc_arg; if(args->isSet("clipboard")) { calc_arg = tqApp->clipboard()->text(TQClipboard::Selection); @@ -125,7 +125,7 @@ TQString parse_expression_arguments(KCmdLineArgs *args) { void start_qalculate() { - KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); + TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); TQString calc_arg = parse_expression_arguments(args); args->clear(); if(!calc_arg.isEmpty()) { @@ -234,11 +234,11 @@ public: int newInstance() { if(mainWin && started) { - KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); + TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); TQString calc_arg = parse_expression_arguments(args); args->clear(); -#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2 +#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2 KWin::Info info = KWin::info(mainWin->winId()); KWin::setOnDesktop(mainWin->winId(), KWin::currentDesktop()); mainWin->move(info.geometry.topLeft()); @@ -250,7 +250,7 @@ public: mainWin->setShown(true); mainWin->show(); mainWin->raise(); -#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2 +#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2 KWin::setActiveWindow(mainWin->winId()); #else KWin::activateWindow(mainWin->winId()); @@ -263,7 +263,7 @@ public: return 0; } else { - if(isRestored() && KMainWindow::canBeRestored(1)) { + if(isRestored() && TDEMainWindow::canBeRestored(1)) { create_qalculate_window(this); setMainWidget(mainWin); mainWin->restore(1, false); @@ -287,10 +287,10 @@ int main(int argc, char **argv) { mainWin = NULL; - KAboutData about(PACKAGE, I18N_NOOP("Qalculate!"), version, description, KAboutData::License_GPL, "(C) 2005-2006 Niklas Knutsson", 0, "http://qalculate.sourceforge.net/", "nique769@users.sourceforge.net"); + TDEAboutData about(PACKAGE, I18N_NOOP("Qalculate!"), version, description, TDEAboutData::License_GPL, "(C) 2005-2006 Niklas Knutsson", 0, "http://qalculate.sourceforge.net/", "nique769@users.sourceforge.net"); about.addAuthor("Niklas Knutsson", 0, "nq@altern.org"); - KCmdLineArgs::init(argc, argv, &about); - KCmdLineArgs::addCmdLineOptions(options); + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions(options); KUniqueApplication::addCmdLineOptions(); if(!QalculateApp::start()) { |