From fa7fe7ccd44ce87add98472ccc9c241152d235aa Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Fri, 15 Dec 2017 16:49:29 +0100 Subject: [PATCH 01/15] Improved readability in main() --- main.cpp | 424 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 237 insertions(+), 187 deletions(-) diff --git a/main.cpp b/main.cpp index 33b9c3f..a40b1f7 100755 --- a/main.cpp +++ b/main.cpp @@ -46,6 +46,227 @@ bool loadAndInstallTranslator(QTranslator &translator, return true; } +bool loadTranslations(QSplashScreen &splashScreen, ZeiterfassungSettings &settings) +{ + splashScreen.showMessage(QCoreApplication::translate("main", "Loading translations...")); + + if(settings.language() == QLocale::AnyLanguage) + { + LanguageSelectionDialog dialog(&splashScreen); + + again: + if(dialog.exec() != QDialog::Accepted) + return false; + + if(dialog.language() == QLocale::AnyLanguage) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Invalid language selection!"), + QCoreApplication::translate("main", "Invalid language selection!") % "\n\n" % + QCoreApplication::translate("main", "You did not select a valid language!")); + goto again; + } + + settings.setLanguage(dialog.language()); + } + + QLocale locale(settings.language(), QLocale::Austria); + QLocale::setDefault(locale); + + QTranslator qtTranslator(qApp); + QTranslator zeiterfassungTranslator(qApp); + + auto translationsDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("translations")); + loadAndInstallTranslator(qtTranslator, locale, QStringLiteral("qt"), QStringLiteral("_"), translationsDir); + loadAndInstallTranslator(zeiterfassungTranslator, locale, QStringLiteral("zeiterfassung"), QStringLiteral("_"), translationsDir); + + return true; +} + +bool loadTheme(QSplashScreen &splashScreen, ZeiterfassungSettings &settings) +{ + splashScreen.showMessage(QCoreApplication::translate("main", "Loading theme...")); + + if(settings.theme().isEmpty()) + return true; + + auto themePath = QDir(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("themes"))).absoluteFilePath(settings.theme()); + + QFile file(themePath % ".qss"); + + if(!file.exists()) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load theme!"), + QCoreApplication::translate("main", "Could not load theme!") % "\n\n" % + QCoreApplication::translate("main", "Theme file does not exist!")); + return false; + } + + if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load theme!"), + QCoreApplication::translate("main", "Could not load theme!") % "\n\n" % + file.errorString()); + return false; + } + + QTextStream textStream(&file); + qApp->setStyleSheet(textStream.readAll().replace(QStringLiteral("@THEME_RESOURCES@"), themePath)); + + return true; +} + +bool loadStripLayouts(QSplashScreen &splashScreen, StripFactory &stripFactory) +{ + splashScreen.showMessage(QCoreApplication::translate("main", "Loading strip layouts...")); + + if(!stripFactory.load(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("strips")))) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), + QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); + return false; + } + + { + auto widget = stripFactory.createBookingStartStrip(); + if(!widget) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), + QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); + return false; + } + } + + { + auto widget = stripFactory.createBookingEndStrip(); + if(!widget) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), + QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); + return false; + } + } + + { + auto widget = stripFactory.createTimeAssignmentStrip(); + if(!widget) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), + QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); + return false; + } + } + + return true; +} + +bool loadLoginPage(QSplashScreen &splashScreen, ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung) +{ + splashScreen.showMessage(QCoreApplication::translate("main", "Loading login page...")); + + again: + auto reply = erfassung.doLoginPage(); + + { + QEventLoop eventLoop; + QObject::connect(reply.get(), &ZeiterfassungReply::finished, &eventLoop, &QEventLoop::quit); + eventLoop.exec(); + } + + if(!reply->success()) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not access Zeiterfassung!"), + QCoreApplication::translate("main", "Could not access Zeiterfassung!") % "\n\n" % reply->message()); + + bool ok; + auto url = QInputDialog::getText(&splashScreen, QCoreApplication::translate("main", "Base url"), + QCoreApplication::translate("main", "Please enter the base url to the Zeiterfassung:"), + QLineEdit::Normal, settings.url(), &ok); + + if(!ok) + return false; + + settings.setUrl(url); + erfassung.setUrl(url); + + goto again; + } + + return true; +} + +bool doAuthentication(QSplashScreen &splashScreen, ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung) +{ + splashScreen.showMessage(QCoreApplication::translate("main", "Authenticating...")); + + if(settings.username().isNull() || settings.password().isNull()) + { + AuthenticationDialog dialog(&splashScreen); + + if(dialog.exec() != QDialog::Accepted) + return false; + + settings.setUsername(dialog.username()); + settings.setPassword(dialog.password()); + } + + { + again: + auto reply = erfassung.doLogin(settings.username(), settings.password()); + + { + QEventLoop eventLoop; + QObject::connect(reply.get(), &ZeiterfassungReply::finished, &eventLoop, &QEventLoop::quit); + eventLoop.exec(); + } + + if(!reply->success()) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not authenticate with Zeiterfassung!"), + QCoreApplication::translate("main", "Could not authenticate with Zeiterfassung!") % "\n\n" % reply->message()); + + AuthenticationDialog dialog(&splashScreen); + dialog.setUsername(settings.username()); + dialog.setPassword(settings.password()); + + if(dialog.exec() != QDialog::Accepted) + return false; + + settings.setUsername(dialog.username()); + settings.setPassword(dialog.password()); + + goto again; + } + } + + return true; +} + +bool loadUserInfo(QSplashScreen &splashScreen, ZeiterfassungApi &erfassung, ZeiterfassungApi::UserInfo &userInfo) +{ + splashScreen.showMessage(QCoreApplication::translate("main", "Getting user information...")); + + { + auto reply = erfassung.doUserInfo(); + + { + QEventLoop eventLoop; + QObject::connect(reply.get(), &ZeiterfassungReply::finished, &eventLoop, &QEventLoop::quit); + eventLoop.exec(); + } + + if(!reply->success()) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not get user information!"), + QCoreApplication::translate("main", "Could not get user information!") % "\n\n" % reply->message()); + return false; + } + + userInfo = reply->userInfo(); + } + + return true; +} + int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); @@ -73,206 +294,35 @@ int main(int argc, char *argv[]) ZeiterfassungSettings settings(&app); - splashScreen.showMessage(QCoreApplication::translate("main", "Loading translations...")); + if(!loadTranslations(splashScreen, settings)) + return -1; - if(settings.language() == QLocale::AnyLanguage) - { - LanguageSelectionDialog dialog(&splashScreen); + // not critical if it fails + //if(!loadTheme(splashScreen, settings)) + // return -2; + loadTheme(splashScreen, settings); - again0: - if(dialog.exec() != QDialog::Accepted) - return -1; + StripFactory stripFactory(&app); - if(dialog.language() == QLocale::AnyLanguage) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Invalid language selection!"), - QCoreApplication::translate("main", "Invalid language selection!") % "\n\n" % - QCoreApplication::translate("main", "You did not select a valid language!")); - goto again0; - } - - settings.setLanguage(dialog.language()); - } - - QLocale locale(settings.language(), QLocale::Austria); - QLocale::setDefault(locale); - - QTranslator qtTranslator(&app); - QTranslator zeiterfassungTranslator(&app); - - { - auto translationsDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("translations")); - loadAndInstallTranslator(qtTranslator, locale, QStringLiteral("qt"), QStringLiteral("_"), translationsDir); - loadAndInstallTranslator(zeiterfassungTranslator, locale, QStringLiteral("zeiterfassung"), QStringLiteral("_"), translationsDir); - } - - if(!settings.theme().isEmpty()) - { - splashScreen.showMessage(QCoreApplication::translate("main", "Loading theme...")); - - auto themePath = QDir(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("themes"))).absoluteFilePath(settings.theme()); - - QFile file(themePath % ".qss"); - - if(!file.exists()) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load theme!"), - QCoreApplication::translate("main", "Could not load theme!") % "\n\n" % - QCoreApplication::translate("main", "Theme file does not exist!")); - goto after; - } - - if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load theme!"), - QCoreApplication::translate("main", "Could not load theme!") % "\n\n" % - file.errorString()); - goto after; - } - - QTextStream textStream(&file); - app.setStyleSheet(textStream.readAll().replace(QStringLiteral("@THEME_RESOURCES@"), themePath)); - } - - after: - - splashScreen.showMessage(QCoreApplication::translate("main", "Loading login page...")); + if(!loadStripLayouts(splashScreen, stripFactory)) + return -3; ZeiterfassungApi erfassung(settings.url(), &app); - { - again1: - auto reply = erfassung.doLoginPage(); + if(!loadLoginPage(splashScreen, settings, erfassung)) + return -4; - { - QEventLoop eventLoop; - QObject::connect(reply.get(), &ZeiterfassungReply::finished, &eventLoop, &QEventLoop::quit); - eventLoop.exec(); - } - - if(!reply->success()) - { - bool ok; - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not access Zeiterfassung!"), - QCoreApplication::translate("main", "Could not access Zeiterfassung!") % "\n\n" % reply->message()); - - auto url = QInputDialog::getText(&splashScreen, QCoreApplication::translate("main", "Base url"), - QCoreApplication::translate("main", "Please enter the base url to the Zeiterfassung:"), - QLineEdit::Normal, settings.url(), &ok); - if(!ok) - return -1; - settings.setUrl(url); - erfassung.setUrl(url); - - goto again1; - } - } - - splashScreen.showMessage(QCoreApplication::translate("main", "Authenticating...")); - - if(settings.username().isNull() || settings.password().isNull()) - { - AuthenticationDialog dialog(&splashScreen); - if(dialog.exec() != QDialog::Accepted) - return -1; - settings.setUsername(dialog.username()); - settings.setPassword(dialog.password()); - } - - { - again2: - auto reply = erfassung.doLogin(settings.username(), settings.password()); - - { - QEventLoop eventLoop; - QObject::connect(reply.get(), &ZeiterfassungReply::finished, &eventLoop, &QEventLoop::quit); - eventLoop.exec(); - } - - if(!reply->success()) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not authenticate with Zeiterfassung!"), - QCoreApplication::translate("main", "Could not authenticate with Zeiterfassung!") % "\n\n" % reply->message()); - - AuthenticationDialog dialog(&splashScreen); - dialog.setUsername(settings.username()); - dialog.setPassword(settings.password()); - if(dialog.exec() != QDialog::Accepted) - return -1; - settings.setUsername(dialog.username()); - settings.setPassword(dialog.password()); - - goto again2; - } - } - - splashScreen.showMessage(QCoreApplication::translate("main", "Getting user information...")); + if(!doAuthentication(splashScreen, settings, erfassung)) + return -5; ZeiterfassungApi::UserInfo userInfo; - { - auto reply = erfassung.doUserInfo(); - - { - QEventLoop eventLoop; - QObject::connect(reply.get(), &ZeiterfassungReply::finished, &eventLoop, &QEventLoop::quit); - eventLoop.exec(); - } - - if(!reply->success()) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not get user information!"), - QCoreApplication::translate("main", "Could not get user information!") % "\n\n" % reply->message()); - return -1; - } - - userInfo = reply->userInfo(); - } - - splashScreen.showMessage(QCoreApplication::translate("main", "Loading strip layouts...")); - - StripFactory stripFactory(&app); - if(!stripFactory.load(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("strips")))) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), - QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); - return -1; - } - - { - auto widget = stripFactory.createBookingStartStrip(); - if(!widget) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), - QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); - return -1; - } - } - - { - auto widget = stripFactory.createBookingEndStrip(); - if(!widget) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), - QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); - return -1; - } - } - - { - auto widget = stripFactory.createTimeAssignmentStrip(); - if(!widget) - { - QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load strips!"), - QCoreApplication::translate("main", "Could not load strips!") % "\n\n" % stripFactory.errorString()); - return -1; - } - } + if(!loadUserInfo(splashScreen, erfassung, userInfo)) + return -6; MainWindow mainWindow(settings, erfassung, userInfo, stripFactory); - mainWindow.show(); - splashScreen.finish(&mainWindow); + mainWindow.show(); return app.exec(); } -- 2.50.1 From 801260b7a1f8fa5a0c3306bc4175873c400d5aac Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Fri, 15 Dec 2017 17:15:57 +0100 Subject: [PATCH 02/15] Moved application into own subfolder --- zeiterfassung.conf | 8 - zeiterfassung.pro | 187 +----------------- .../cpp14polyfills.h | 0 .../dialogs}/aboutmedialog.cpp | 0 .../dialogs}/aboutmedialog.h | 0 .../dialogs}/aboutmedialog.ui | 0 .../dialogs}/authenticationdialog.cpp | 0 .../dialogs}/authenticationdialog.h | 0 .../dialogs}/authenticationdialog.ui | 0 .../dialogs}/bookingdialog.cpp | 0 .../dialogs}/bookingdialog.h | 0 .../dialogs}/bookingdialog.ui | 0 .../dialogs}/languageselectiondialog.cpp | 0 .../dialogs}/languageselectiondialog.h | 0 .../dialogs}/languageselectiondialog.ui | 0 .../dialogs}/settingsdialog.cpp | 0 .../dialogs}/settingsdialog.h | 0 .../dialogs}/settingsdialog.ui | 0 .../dialogs}/timeassignmentdialog.cpp | 0 .../dialogs}/timeassignmentdialog.h | 0 .../dialogs}/timeassignmentdialog.ui | 0 .../dialogs}/updatedialog.cpp | 0 .../dialogs}/updatedialog.h | 0 .../dialogs}/updatedialog.ui | 0 icon.ico => zeiterfassung/icon.ico | Bin {images => zeiterfassung/images}/about.png | Bin .../images}/auswertung.png | Bin .../images}/authentication.png | Bin {images => zeiterfassung/images}/help.png | Bin {images => zeiterfassung/images}/icon.png | Bin {images => zeiterfassung/images}/next.png | Bin {images => zeiterfassung/images}/now.png | Bin {images => zeiterfassung/images}/previous.png | Bin {images => zeiterfassung/images}/quit.png | Bin {images => zeiterfassung/images}/refresh.png | Bin {images => zeiterfassung/images}/settings.png | Bin {images => zeiterfassung/images}/splash.png | Bin {images => zeiterfassung/images}/today.png | Bin {images => zeiterfassung/images}/user.png | Bin main.cpp => zeiterfassung/main.cpp | 0 .../mainwindow.cpp | 0 mainwindow.h => zeiterfassung/mainwindow.h | 0 mainwindow.ui => zeiterfassung/mainwindow.ui | 0 .../models}/bookingsmodel.cpp | 0 .../models}/bookingsmodel.h | 0 .../models}/timeassignmentsmodel.cpp | 0 .../models}/timeassignmentsmodel.h | 0 .../replies}/createbookingreply.cpp | 0 .../replies}/createbookingreply.h | 0 .../replies}/createtimeassignmentreply.cpp | 0 .../replies}/createtimeassignmentreply.h | 0 .../replies}/deletebookingreply.cpp | 0 .../replies}/deletebookingreply.h | 0 .../replies}/deletetimeassignmentreply.cpp | 0 .../replies}/deletetimeassignmentreply.h | 0 .../replies}/getauswertungreply.cpp | 0 .../replies}/getauswertungreply.h | 0 .../replies}/getbookingsreply.cpp | 0 .../replies}/getbookingsreply.h | 0 .../replies}/getpresencestatusreply.cpp | 0 .../replies}/getpresencestatusreply.h | 0 .../replies}/getprojectsreply.cpp | 0 .../replies}/getprojectsreply.h | 0 .../replies}/gettimeassignmentsreply.cpp | 0 .../replies}/gettimeassignmentsreply.h | 0 .../replies}/loginpagereply.cpp | 0 .../replies}/loginpagereply.h | 0 .../replies}/loginreply.cpp | 0 .../replies}/loginreply.h | 0 .../replies}/updatebookingreply.cpp | 0 .../replies}/updatebookingreply.h | 0 .../replies}/updatetimeassignmentreply.cpp | 0 .../replies}/updatetimeassignmentreply.h | 0 .../replies}/userinforeply.cpp | 0 .../replies}/userinforeply.h | 0 .../replies}/zeiterfassungreply.cpp | 0 .../replies}/zeiterfassungreply.h | 0 resources.qrc => zeiterfassung/resources.qrc | 0 .../stripfactory.cpp | 0 .../stripfactory.h | 0 .../strips}/bookingendstrip.ui | 0 .../strips}/bookingstartstrip.ui | 0 .../strips}/timeassignmentstrip.ui | 0 .../stripswidget.cpp | 0 .../stripswidget.h | 0 .../themes}/dark_theme.qss | 0 .../themes}/dark_theme/Hmovetoolbar.png | Bin .../themes}/dark_theme/Hsepartoolbar.png | Bin .../themes}/dark_theme/Vmovetoolbar.png | Bin .../themes}/dark_theme/Vsepartoolbar.png | Bin .../themes}/dark_theme/branch_closed-on.png | Bin .../themes}/dark_theme/branch_closed.png | Bin .../themes}/dark_theme/branch_open-on.png | Bin .../themes}/dark_theme/branch_open.png | Bin .../themes}/dark_theme/checkbox_checked.png | Bin .../dark_theme/checkbox_checked_disabled.png | Bin .../dark_theme/checkbox_checked_focus.png | Bin .../dark_theme/checkbox_indeterminate.png | Bin .../checkbox_indeterminate_disabled.png | Bin .../checkbox_indeterminate_focus.png | Bin .../themes}/dark_theme/checkbox_unchecked.png | Bin .../checkbox_unchecked_disabled.png | Bin .../dark_theme/checkbox_unchecked_focus.png | Bin .../themes}/dark_theme/close-hover.png | Bin .../themes}/dark_theme/close-pressed.png | Bin .../themes}/dark_theme/close.png | Bin .../themes}/dark_theme/down_arrow.png | Bin .../dark_theme/down_arrow_disabled.png | Bin .../themes}/dark_theme/left_arrow.png | Bin .../dark_theme/left_arrow_disabled.png | Bin .../themes}/dark_theme/radio_checked.png | Bin .../dark_theme/radio_checked_disabled.png | Bin .../dark_theme/radio_checked_focus.png | Bin .../themes}/dark_theme/radio_unchecked.png | Bin .../dark_theme/radio_unchecked_disabled.png | Bin .../dark_theme/radio_unchecked_focus.png | Bin .../themes}/dark_theme/right_arrow.png | Bin .../dark_theme/right_arrow_disabled.png | Bin .../themes}/dark_theme/sizegrip.png | Bin .../dark_theme/stylesheet-branch-end.png | Bin .../dark_theme/stylesheet-branch-more.png | Bin .../themes}/dark_theme/stylesheet-vline.png | Bin .../themes}/dark_theme/transparent.png | Bin .../themes}/dark_theme/undock.png | Bin .../themes}/dark_theme/up_arrow.png | Bin .../themes}/dark_theme/up_arrow_disabled.png | Bin timeutils.cpp => zeiterfassung/timeutils.cpp | 0 timeutils.h => zeiterfassung/timeutils.h | 0 .../translations}/zeiterfassung_de.qm | Bin .../translations}/zeiterfassung_de.ts | 0 .../translations}/zeiterfassung_en.qm | Bin .../translations}/zeiterfassung_en.ts | 0 zeiterfassung/zeiterfassung.pro | 186 +++++++++++++++++ .../zeiterfassungapi.cpp | 0 .../zeiterfassungapi.h | 0 .../zeiterfassungsettings.cpp | 0 .../zeiterfassungsettings.h | 0 137 files changed, 188 insertions(+), 193 deletions(-) delete mode 100644 zeiterfassung.conf mode change 100755 => 100644 zeiterfassung.pro rename cpp14polyfills.h => zeiterfassung/cpp14polyfills.h (100%) rename {dialogs => zeiterfassung/dialogs}/aboutmedialog.cpp (100%) rename {dialogs => zeiterfassung/dialogs}/aboutmedialog.h (100%) rename {dialogs => zeiterfassung/dialogs}/aboutmedialog.ui (100%) rename {dialogs => zeiterfassung/dialogs}/authenticationdialog.cpp (100%) rename {dialogs => zeiterfassung/dialogs}/authenticationdialog.h (100%) rename {dialogs => zeiterfassung/dialogs}/authenticationdialog.ui (100%) rename {dialogs => zeiterfassung/dialogs}/bookingdialog.cpp (100%) rename {dialogs => zeiterfassung/dialogs}/bookingdialog.h (100%) rename {dialogs => zeiterfassung/dialogs}/bookingdialog.ui (100%) rename {dialogs => zeiterfassung/dialogs}/languageselectiondialog.cpp (100%) rename {dialogs => zeiterfassung/dialogs}/languageselectiondialog.h (100%) rename {dialogs => zeiterfassung/dialogs}/languageselectiondialog.ui (100%) rename {dialogs => zeiterfassung/dialogs}/settingsdialog.cpp (100%) rename {dialogs => zeiterfassung/dialogs}/settingsdialog.h (100%) rename {dialogs => zeiterfassung/dialogs}/settingsdialog.ui (100%) rename {dialogs => zeiterfassung/dialogs}/timeassignmentdialog.cpp (100%) rename {dialogs => zeiterfassung/dialogs}/timeassignmentdialog.h (100%) rename {dialogs => zeiterfassung/dialogs}/timeassignmentdialog.ui (100%) rename {dialogs => zeiterfassung/dialogs}/updatedialog.cpp (100%) rename {dialogs => zeiterfassung/dialogs}/updatedialog.h (100%) rename {dialogs => zeiterfassung/dialogs}/updatedialog.ui (100%) rename icon.ico => zeiterfassung/icon.ico (100%) rename {images => zeiterfassung/images}/about.png (100%) rename {images => zeiterfassung/images}/auswertung.png (100%) rename {images => zeiterfassung/images}/authentication.png (100%) rename {images => zeiterfassung/images}/help.png (100%) rename {images => zeiterfassung/images}/icon.png (100%) rename {images => zeiterfassung/images}/next.png (100%) rename {images => zeiterfassung/images}/now.png (100%) rename {images => zeiterfassung/images}/previous.png (100%) rename {images => zeiterfassung/images}/quit.png (100%) rename {images => zeiterfassung/images}/refresh.png (100%) rename {images => zeiterfassung/images}/settings.png (100%) rename {images => zeiterfassung/images}/splash.png (100%) rename {images => zeiterfassung/images}/today.png (100%) rename {images => zeiterfassung/images}/user.png (100%) rename main.cpp => zeiterfassung/main.cpp (100%) rename mainwindow.cpp => zeiterfassung/mainwindow.cpp (100%) rename mainwindow.h => zeiterfassung/mainwindow.h (100%) rename mainwindow.ui => zeiterfassung/mainwindow.ui (100%) rename {models => zeiterfassung/models}/bookingsmodel.cpp (100%) rename {models => zeiterfassung/models}/bookingsmodel.h (100%) rename {models => zeiterfassung/models}/timeassignmentsmodel.cpp (100%) rename {models => zeiterfassung/models}/timeassignmentsmodel.h (100%) rename {replies => zeiterfassung/replies}/createbookingreply.cpp (100%) rename {replies => zeiterfassung/replies}/createbookingreply.h (100%) rename {replies => zeiterfassung/replies}/createtimeassignmentreply.cpp (100%) rename {replies => zeiterfassung/replies}/createtimeassignmentreply.h (100%) rename {replies => zeiterfassung/replies}/deletebookingreply.cpp (100%) rename {replies => zeiterfassung/replies}/deletebookingreply.h (100%) rename {replies => zeiterfassung/replies}/deletetimeassignmentreply.cpp (100%) rename {replies => zeiterfassung/replies}/deletetimeassignmentreply.h (100%) rename {replies => zeiterfassung/replies}/getauswertungreply.cpp (100%) rename {replies => zeiterfassung/replies}/getauswertungreply.h (100%) rename {replies => zeiterfassung/replies}/getbookingsreply.cpp (100%) rename {replies => zeiterfassung/replies}/getbookingsreply.h (100%) rename {replies => zeiterfassung/replies}/getpresencestatusreply.cpp (100%) rename {replies => zeiterfassung/replies}/getpresencestatusreply.h (100%) rename {replies => zeiterfassung/replies}/getprojectsreply.cpp (100%) rename {replies => zeiterfassung/replies}/getprojectsreply.h (100%) rename {replies => zeiterfassung/replies}/gettimeassignmentsreply.cpp (100%) rename {replies => zeiterfassung/replies}/gettimeassignmentsreply.h (100%) rename {replies => zeiterfassung/replies}/loginpagereply.cpp (100%) rename {replies => zeiterfassung/replies}/loginpagereply.h (100%) rename {replies => zeiterfassung/replies}/loginreply.cpp (100%) rename {replies => zeiterfassung/replies}/loginreply.h (100%) rename {replies => zeiterfassung/replies}/updatebookingreply.cpp (100%) rename {replies => zeiterfassung/replies}/updatebookingreply.h (100%) rename {replies => zeiterfassung/replies}/updatetimeassignmentreply.cpp (100%) rename {replies => zeiterfassung/replies}/updatetimeassignmentreply.h (100%) rename {replies => zeiterfassung/replies}/userinforeply.cpp (100%) rename {replies => zeiterfassung/replies}/userinforeply.h (100%) rename {replies => zeiterfassung/replies}/zeiterfassungreply.cpp (100%) rename {replies => zeiterfassung/replies}/zeiterfassungreply.h (100%) rename resources.qrc => zeiterfassung/resources.qrc (100%) rename stripfactory.cpp => zeiterfassung/stripfactory.cpp (100%) rename stripfactory.h => zeiterfassung/stripfactory.h (100%) rename {strips => zeiterfassung/strips}/bookingendstrip.ui (100%) rename {strips => zeiterfassung/strips}/bookingstartstrip.ui (100%) rename {strips => zeiterfassung/strips}/timeassignmentstrip.ui (100%) rename stripswidget.cpp => zeiterfassung/stripswidget.cpp (100%) rename stripswidget.h => zeiterfassung/stripswidget.h (100%) rename {themes => zeiterfassung/themes}/dark_theme.qss (100%) rename {themes => zeiterfassung/themes}/dark_theme/Hmovetoolbar.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/Hsepartoolbar.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/Vmovetoolbar.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/Vsepartoolbar.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/branch_closed-on.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/branch_closed.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/branch_open-on.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/branch_open.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_checked.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_checked_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_checked_focus.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_indeterminate.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_indeterminate_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_indeterminate_focus.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_unchecked.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_unchecked_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/checkbox_unchecked_focus.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/close-hover.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/close-pressed.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/close.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/down_arrow.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/down_arrow_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/left_arrow.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/left_arrow_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/radio_checked.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/radio_checked_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/radio_checked_focus.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/radio_unchecked.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/radio_unchecked_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/radio_unchecked_focus.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/right_arrow.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/right_arrow_disabled.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/sizegrip.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/stylesheet-branch-end.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/stylesheet-branch-more.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/stylesheet-vline.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/transparent.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/undock.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/up_arrow.png (100%) rename {themes => zeiterfassung/themes}/dark_theme/up_arrow_disabled.png (100%) rename timeutils.cpp => zeiterfassung/timeutils.cpp (100%) rename timeutils.h => zeiterfassung/timeutils.h (100%) rename {translations => zeiterfassung/translations}/zeiterfassung_de.qm (100%) rename {translations => zeiterfassung/translations}/zeiterfassung_de.ts (100%) rename {translations => zeiterfassung/translations}/zeiterfassung_en.qm (100%) rename {translations => zeiterfassung/translations}/zeiterfassung_en.ts (100%) create mode 100755 zeiterfassung/zeiterfassung.pro rename zeiterfassungapi.cpp => zeiterfassung/zeiterfassungapi.cpp (100%) rename zeiterfassungapi.h => zeiterfassung/zeiterfassungapi.h (100%) rename zeiterfassungsettings.cpp => zeiterfassung/zeiterfassungsettings.cpp (100%) rename zeiterfassungsettings.h => zeiterfassung/zeiterfassungsettings.h (100%) diff --git a/zeiterfassung.conf b/zeiterfassung.conf deleted file mode 100644 index 36a5d44..0000000 --- a/zeiterfassung.conf +++ /dev/null @@ -1,8 +0,0 @@ -[General] -password=HAHA -projekte=0000001142, 0000010001, SONSTIGES -subprojekte= -texte= -url=http://localhost:8080/evoApps/ -username=danielb -workpackages=[D.1315], [M.0200] diff --git a/zeiterfassung.pro b/zeiterfassung.pro old mode 100755 new mode 100644 index 4fdd91e..56af3c4 --- a/zeiterfassung.pro +++ b/zeiterfassung.pro @@ -1,186 +1,3 @@ -QT += network gui widgets uitools +TEMPLATE=subdirs -CONFIG += c++14 -CONFIG -= app_bundle - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which as been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -RC_ICONS = icon.ico - -SOURCES += main.cpp \ - mainwindow.cpp \ - dialogs/aboutmedialog.cpp \ - dialogs/authenticationdialog.cpp \ - zeiterfassungsettings.cpp \ - dialogs/settingsdialog.cpp \ - dialogs/languageselectiondialog.cpp \ - dialogs/timeassignmentdialog.cpp \ - models/timeassignmentsmodel.cpp \ - dialogs/bookingdialog.cpp \ - models/bookingsmodel.cpp \ - dialogs/updatedialog.cpp \ - stripswidget.cpp \ - timeutils.cpp \ - stripfactory.cpp \ - zeiterfassungapi.cpp \ - replies/loginpagereply.cpp \ - replies/loginreply.cpp \ - replies/userinforeply.cpp \ - replies/getbookingsreply.cpp \ - replies/createbookingreply.cpp \ - replies/updatebookingreply.cpp \ - replies/deletebookingreply.cpp \ - replies/gettimeassignmentsreply.cpp \ - replies/createtimeassignmentreply.cpp \ - replies/updatetimeassignmentreply.cpp \ - replies/getprojectsreply.cpp \ - replies/getauswertungreply.cpp \ - replies/zeiterfassungreply.cpp \ - replies/deletetimeassignmentreply.cpp \ - replies/getpresencestatusreply.cpp - -HEADERS += \ - mainwindow.h \ - dialogs/aboutmedialog.h \ - dialogs/authenticationdialog.h \ - zeiterfassungsettings.h \ - dialogs/settingsdialog.h \ - dialogs/languageselectiondialog.h \ - dialogs/timeassignmentdialog.h \ - models/timeassignmentsmodel.h \ - dialogs/bookingdialog.h \ - models/bookingsmodel.h \ - dialogs/updatedialog.h \ - stripswidget.h \ - timeutils.h \ - stripfactory.h \ - zeiterfassungapi.h \ - replies/loginpagereply.h \ - replies/loginreply.h \ - replies/userinforeply.h \ - replies/getbookingsreply.h \ - replies/createbookingreply.h \ - replies/updatebookingreply.h \ - replies/deletebookingreply.h \ - replies/gettimeassignmentsreply.h \ - replies/createtimeassignmentreply.h \ - replies/updatetimeassignmentreply.h \ - replies/getprojectsreply.h \ - replies/getauswertungreply.h \ - replies/zeiterfassungreply.h \ - replies/deletetimeassignmentreply.h \ - cpp14polyfills.h \ - replies/getpresencestatusreply.h - -FORMS += \ - mainwindow.ui \ - dialogs/aboutmedialog.ui \ - dialogs/authenticationdialog.ui \ - dialogs/settingsdialog.ui \ - dialogs/languageselectiondialog.ui \ - dialogs/timeassignmentdialog.ui \ - dialogs/bookingdialog.ui \ - dialogs/updatedialog.ui - -RESOURCES += \ - resources.qrc - -TRANSLATIONS += \ - translations/zeiterfassung_en.ts \ - translations/zeiterfassung_de.ts - -win32 { - CONFIG(debug, release|debug) { - translationsinstall.path = $${OUT_PWD}/debug/translations - themesinstall.path = $${OUT_PWD}/debug/themes - darkthemeinstall.path = $${OUT_PWD}/debug/themes/dark_theme - stripsinstall.path = $${OUT_PWD}/debug/strips - } else { - translationsinstall.path = $${OUT_PWD}/release/translations - themesinstall.path = $${OUT_PWD}/release/themes - darkthemeinstall.path = $${OUT_PWD}/release/themes/dark_theme - stripsinstall.path = $${OUT_PWD}/release/strips - } -} -unix { - translationsinstall.path = $${OUT_PWD}/translations - themesinstall.path = $${OUT_PWD}/themes - darkthemeinstall.path = $${OUT_PWD}/themes/dark_theme - stripsinstall.path = $${OUT_PWD}/strips -} - -translationsinstall.files = $$[QT_INSTALL_TRANSLATIONS]/qt_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtbase_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtquick1_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtscript_nen.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qt_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtbase_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtquick1_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtscript_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_de.qm \ - translations/zeiterfassung_en.qm \ - translations/zeiterfassung_de.qm - -themesinstall.files = themes/dark_theme.qss - -darkthemeinstall.files = themes/dark_theme/checkbox_indeterminate_disabled.png \ - themes/dark_theme/radio_unchecked.png \ - themes/dark_theme/up_arrow.png \ - themes/dark_theme/branch_closed-on.png \ - themes/dark_theme/checkbox_checked_disabled.png \ - themes/dark_theme/checkbox_unchecked.png \ - themes/dark_theme/checkbox_indeterminate.png \ - themes/dark_theme/stylesheet-branch-more.png \ - themes/dark_theme/checkbox_checked.png \ - themes/dark_theme/checkbox_unchecked_disabled.png \ - themes/dark_theme/radio_checked.png \ - themes/dark_theme/checkbox_indeterminate_focus.png \ - themes/dark_theme/checkbox_checked_focus.png \ - themes/dark_theme/branch_closed.png \ - themes/dark_theme/Vsepartoolbar.png \ - themes/dark_theme/radio_checked_disabled.png \ - themes/dark_theme/left_arrow.png \ - themes/dark_theme/Vmovetoolbar.png \ - themes/dark_theme/branch_open-on.png \ - themes/dark_theme/close.png \ - themes/dark_theme/stylesheet-branch-end.png \ - themes/dark_theme/stylesheet-vline.png \ - themes/dark_theme/down_arrow_disabled.png \ - themes/dark_theme/radio_unchecked_disabled.png \ - themes/dark_theme/left_arrow_disabled.png \ - themes/dark_theme/Hmovetoolbar.png \ - themes/dark_theme/close-pressed.png \ - themes/dark_theme/up_arrow_disabled.png \ - themes/dark_theme/branch_open.png \ - themes/dark_theme/radio_checked_focus.png \ - themes/dark_theme/sizegrip.png \ - themes/dark_theme/checkbox_unchecked_focus.png \ - themes/dark_theme/right_arrow_disabled.png \ - themes/dark_theme/Hsepartoolbar.png \ - themes/dark_theme/undock.png \ - themes/dark_theme/transparent.png \ - themes/dark_theme/close-hover.png \ - themes/dark_theme/radio_unchecked_focus.png \ - themes/dark_theme/down_arrow.png \ - themes/dark_theme/right_arrow.png - -stripsinstall.files = strips/bookingstartstrip.ui \ - strips/bookingendstrip.ui \ - strips/timeassignmentstrip.ui - -INSTALLS += translationsinstall -INSTALLS += themesinstall -INSTALLS += darkthemeinstall -INSTALLS += stripsinstall +SUBDIRS+=zeiterfassung diff --git a/cpp14polyfills.h b/zeiterfassung/cpp14polyfills.h similarity index 100% rename from cpp14polyfills.h rename to zeiterfassung/cpp14polyfills.h diff --git a/dialogs/aboutmedialog.cpp b/zeiterfassung/dialogs/aboutmedialog.cpp similarity index 100% rename from dialogs/aboutmedialog.cpp rename to zeiterfassung/dialogs/aboutmedialog.cpp diff --git a/dialogs/aboutmedialog.h b/zeiterfassung/dialogs/aboutmedialog.h similarity index 100% rename from dialogs/aboutmedialog.h rename to zeiterfassung/dialogs/aboutmedialog.h diff --git a/dialogs/aboutmedialog.ui b/zeiterfassung/dialogs/aboutmedialog.ui similarity index 100% rename from dialogs/aboutmedialog.ui rename to zeiterfassung/dialogs/aboutmedialog.ui diff --git a/dialogs/authenticationdialog.cpp b/zeiterfassung/dialogs/authenticationdialog.cpp similarity index 100% rename from dialogs/authenticationdialog.cpp rename to zeiterfassung/dialogs/authenticationdialog.cpp diff --git a/dialogs/authenticationdialog.h b/zeiterfassung/dialogs/authenticationdialog.h similarity index 100% rename from dialogs/authenticationdialog.h rename to zeiterfassung/dialogs/authenticationdialog.h diff --git a/dialogs/authenticationdialog.ui b/zeiterfassung/dialogs/authenticationdialog.ui similarity index 100% rename from dialogs/authenticationdialog.ui rename to zeiterfassung/dialogs/authenticationdialog.ui diff --git a/dialogs/bookingdialog.cpp b/zeiterfassung/dialogs/bookingdialog.cpp similarity index 100% rename from dialogs/bookingdialog.cpp rename to zeiterfassung/dialogs/bookingdialog.cpp diff --git a/dialogs/bookingdialog.h b/zeiterfassung/dialogs/bookingdialog.h similarity index 100% rename from dialogs/bookingdialog.h rename to zeiterfassung/dialogs/bookingdialog.h diff --git a/dialogs/bookingdialog.ui b/zeiterfassung/dialogs/bookingdialog.ui similarity index 100% rename from dialogs/bookingdialog.ui rename to zeiterfassung/dialogs/bookingdialog.ui diff --git a/dialogs/languageselectiondialog.cpp b/zeiterfassung/dialogs/languageselectiondialog.cpp similarity index 100% rename from dialogs/languageselectiondialog.cpp rename to zeiterfassung/dialogs/languageselectiondialog.cpp diff --git a/dialogs/languageselectiondialog.h b/zeiterfassung/dialogs/languageselectiondialog.h similarity index 100% rename from dialogs/languageselectiondialog.h rename to zeiterfassung/dialogs/languageselectiondialog.h diff --git a/dialogs/languageselectiondialog.ui b/zeiterfassung/dialogs/languageselectiondialog.ui similarity index 100% rename from dialogs/languageselectiondialog.ui rename to zeiterfassung/dialogs/languageselectiondialog.ui diff --git a/dialogs/settingsdialog.cpp b/zeiterfassung/dialogs/settingsdialog.cpp similarity index 100% rename from dialogs/settingsdialog.cpp rename to zeiterfassung/dialogs/settingsdialog.cpp diff --git a/dialogs/settingsdialog.h b/zeiterfassung/dialogs/settingsdialog.h similarity index 100% rename from dialogs/settingsdialog.h rename to zeiterfassung/dialogs/settingsdialog.h diff --git a/dialogs/settingsdialog.ui b/zeiterfassung/dialogs/settingsdialog.ui similarity index 100% rename from dialogs/settingsdialog.ui rename to zeiterfassung/dialogs/settingsdialog.ui diff --git a/dialogs/timeassignmentdialog.cpp b/zeiterfassung/dialogs/timeassignmentdialog.cpp similarity index 100% rename from dialogs/timeassignmentdialog.cpp rename to zeiterfassung/dialogs/timeassignmentdialog.cpp diff --git a/dialogs/timeassignmentdialog.h b/zeiterfassung/dialogs/timeassignmentdialog.h similarity index 100% rename from dialogs/timeassignmentdialog.h rename to zeiterfassung/dialogs/timeassignmentdialog.h diff --git a/dialogs/timeassignmentdialog.ui b/zeiterfassung/dialogs/timeassignmentdialog.ui similarity index 100% rename from dialogs/timeassignmentdialog.ui rename to zeiterfassung/dialogs/timeassignmentdialog.ui diff --git a/dialogs/updatedialog.cpp b/zeiterfassung/dialogs/updatedialog.cpp similarity index 100% rename from dialogs/updatedialog.cpp rename to zeiterfassung/dialogs/updatedialog.cpp diff --git a/dialogs/updatedialog.h b/zeiterfassung/dialogs/updatedialog.h similarity index 100% rename from dialogs/updatedialog.h rename to zeiterfassung/dialogs/updatedialog.h diff --git a/dialogs/updatedialog.ui b/zeiterfassung/dialogs/updatedialog.ui similarity index 100% rename from dialogs/updatedialog.ui rename to zeiterfassung/dialogs/updatedialog.ui diff --git a/icon.ico b/zeiterfassung/icon.ico similarity index 100% rename from icon.ico rename to zeiterfassung/icon.ico diff --git a/images/about.png b/zeiterfassung/images/about.png similarity index 100% rename from images/about.png rename to zeiterfassung/images/about.png diff --git a/images/auswertung.png b/zeiterfassung/images/auswertung.png similarity index 100% rename from images/auswertung.png rename to zeiterfassung/images/auswertung.png diff --git a/images/authentication.png b/zeiterfassung/images/authentication.png similarity index 100% rename from images/authentication.png rename to zeiterfassung/images/authentication.png diff --git a/images/help.png b/zeiterfassung/images/help.png similarity index 100% rename from images/help.png rename to zeiterfassung/images/help.png diff --git a/images/icon.png b/zeiterfassung/images/icon.png similarity index 100% rename from images/icon.png rename to zeiterfassung/images/icon.png diff --git a/images/next.png b/zeiterfassung/images/next.png similarity index 100% rename from images/next.png rename to zeiterfassung/images/next.png diff --git a/images/now.png b/zeiterfassung/images/now.png similarity index 100% rename from images/now.png rename to zeiterfassung/images/now.png diff --git a/images/previous.png b/zeiterfassung/images/previous.png similarity index 100% rename from images/previous.png rename to zeiterfassung/images/previous.png diff --git a/images/quit.png b/zeiterfassung/images/quit.png similarity index 100% rename from images/quit.png rename to zeiterfassung/images/quit.png diff --git a/images/refresh.png b/zeiterfassung/images/refresh.png similarity index 100% rename from images/refresh.png rename to zeiterfassung/images/refresh.png diff --git a/images/settings.png b/zeiterfassung/images/settings.png similarity index 100% rename from images/settings.png rename to zeiterfassung/images/settings.png diff --git a/images/splash.png b/zeiterfassung/images/splash.png similarity index 100% rename from images/splash.png rename to zeiterfassung/images/splash.png diff --git a/images/today.png b/zeiterfassung/images/today.png similarity index 100% rename from images/today.png rename to zeiterfassung/images/today.png diff --git a/images/user.png b/zeiterfassung/images/user.png similarity index 100% rename from images/user.png rename to zeiterfassung/images/user.png diff --git a/main.cpp b/zeiterfassung/main.cpp similarity index 100% rename from main.cpp rename to zeiterfassung/main.cpp diff --git a/mainwindow.cpp b/zeiterfassung/mainwindow.cpp similarity index 100% rename from mainwindow.cpp rename to zeiterfassung/mainwindow.cpp diff --git a/mainwindow.h b/zeiterfassung/mainwindow.h similarity index 100% rename from mainwindow.h rename to zeiterfassung/mainwindow.h diff --git a/mainwindow.ui b/zeiterfassung/mainwindow.ui similarity index 100% rename from mainwindow.ui rename to zeiterfassung/mainwindow.ui diff --git a/models/bookingsmodel.cpp b/zeiterfassung/models/bookingsmodel.cpp similarity index 100% rename from models/bookingsmodel.cpp rename to zeiterfassung/models/bookingsmodel.cpp diff --git a/models/bookingsmodel.h b/zeiterfassung/models/bookingsmodel.h similarity index 100% rename from models/bookingsmodel.h rename to zeiterfassung/models/bookingsmodel.h diff --git a/models/timeassignmentsmodel.cpp b/zeiterfassung/models/timeassignmentsmodel.cpp similarity index 100% rename from models/timeassignmentsmodel.cpp rename to zeiterfassung/models/timeassignmentsmodel.cpp diff --git a/models/timeassignmentsmodel.h b/zeiterfassung/models/timeassignmentsmodel.h similarity index 100% rename from models/timeassignmentsmodel.h rename to zeiterfassung/models/timeassignmentsmodel.h diff --git a/replies/createbookingreply.cpp b/zeiterfassung/replies/createbookingreply.cpp similarity index 100% rename from replies/createbookingreply.cpp rename to zeiterfassung/replies/createbookingreply.cpp diff --git a/replies/createbookingreply.h b/zeiterfassung/replies/createbookingreply.h similarity index 100% rename from replies/createbookingreply.h rename to zeiterfassung/replies/createbookingreply.h diff --git a/replies/createtimeassignmentreply.cpp b/zeiterfassung/replies/createtimeassignmentreply.cpp similarity index 100% rename from replies/createtimeassignmentreply.cpp rename to zeiterfassung/replies/createtimeassignmentreply.cpp diff --git a/replies/createtimeassignmentreply.h b/zeiterfassung/replies/createtimeassignmentreply.h similarity index 100% rename from replies/createtimeassignmentreply.h rename to zeiterfassung/replies/createtimeassignmentreply.h diff --git a/replies/deletebookingreply.cpp b/zeiterfassung/replies/deletebookingreply.cpp similarity index 100% rename from replies/deletebookingreply.cpp rename to zeiterfassung/replies/deletebookingreply.cpp diff --git a/replies/deletebookingreply.h b/zeiterfassung/replies/deletebookingreply.h similarity index 100% rename from replies/deletebookingreply.h rename to zeiterfassung/replies/deletebookingreply.h diff --git a/replies/deletetimeassignmentreply.cpp b/zeiterfassung/replies/deletetimeassignmentreply.cpp similarity index 100% rename from replies/deletetimeassignmentreply.cpp rename to zeiterfassung/replies/deletetimeassignmentreply.cpp diff --git a/replies/deletetimeassignmentreply.h b/zeiterfassung/replies/deletetimeassignmentreply.h similarity index 100% rename from replies/deletetimeassignmentreply.h rename to zeiterfassung/replies/deletetimeassignmentreply.h diff --git a/replies/getauswertungreply.cpp b/zeiterfassung/replies/getauswertungreply.cpp similarity index 100% rename from replies/getauswertungreply.cpp rename to zeiterfassung/replies/getauswertungreply.cpp diff --git a/replies/getauswertungreply.h b/zeiterfassung/replies/getauswertungreply.h similarity index 100% rename from replies/getauswertungreply.h rename to zeiterfassung/replies/getauswertungreply.h diff --git a/replies/getbookingsreply.cpp b/zeiterfassung/replies/getbookingsreply.cpp similarity index 100% rename from replies/getbookingsreply.cpp rename to zeiterfassung/replies/getbookingsreply.cpp diff --git a/replies/getbookingsreply.h b/zeiterfassung/replies/getbookingsreply.h similarity index 100% rename from replies/getbookingsreply.h rename to zeiterfassung/replies/getbookingsreply.h diff --git a/replies/getpresencestatusreply.cpp b/zeiterfassung/replies/getpresencestatusreply.cpp similarity index 100% rename from replies/getpresencestatusreply.cpp rename to zeiterfassung/replies/getpresencestatusreply.cpp diff --git a/replies/getpresencestatusreply.h b/zeiterfassung/replies/getpresencestatusreply.h similarity index 100% rename from replies/getpresencestatusreply.h rename to zeiterfassung/replies/getpresencestatusreply.h diff --git a/replies/getprojectsreply.cpp b/zeiterfassung/replies/getprojectsreply.cpp similarity index 100% rename from replies/getprojectsreply.cpp rename to zeiterfassung/replies/getprojectsreply.cpp diff --git a/replies/getprojectsreply.h b/zeiterfassung/replies/getprojectsreply.h similarity index 100% rename from replies/getprojectsreply.h rename to zeiterfassung/replies/getprojectsreply.h diff --git a/replies/gettimeassignmentsreply.cpp b/zeiterfassung/replies/gettimeassignmentsreply.cpp similarity index 100% rename from replies/gettimeassignmentsreply.cpp rename to zeiterfassung/replies/gettimeassignmentsreply.cpp diff --git a/replies/gettimeassignmentsreply.h b/zeiterfassung/replies/gettimeassignmentsreply.h similarity index 100% rename from replies/gettimeassignmentsreply.h rename to zeiterfassung/replies/gettimeassignmentsreply.h diff --git a/replies/loginpagereply.cpp b/zeiterfassung/replies/loginpagereply.cpp similarity index 100% rename from replies/loginpagereply.cpp rename to zeiterfassung/replies/loginpagereply.cpp diff --git a/replies/loginpagereply.h b/zeiterfassung/replies/loginpagereply.h similarity index 100% rename from replies/loginpagereply.h rename to zeiterfassung/replies/loginpagereply.h diff --git a/replies/loginreply.cpp b/zeiterfassung/replies/loginreply.cpp similarity index 100% rename from replies/loginreply.cpp rename to zeiterfassung/replies/loginreply.cpp diff --git a/replies/loginreply.h b/zeiterfassung/replies/loginreply.h similarity index 100% rename from replies/loginreply.h rename to zeiterfassung/replies/loginreply.h diff --git a/replies/updatebookingreply.cpp b/zeiterfassung/replies/updatebookingreply.cpp similarity index 100% rename from replies/updatebookingreply.cpp rename to zeiterfassung/replies/updatebookingreply.cpp diff --git a/replies/updatebookingreply.h b/zeiterfassung/replies/updatebookingreply.h similarity index 100% rename from replies/updatebookingreply.h rename to zeiterfassung/replies/updatebookingreply.h diff --git a/replies/updatetimeassignmentreply.cpp b/zeiterfassung/replies/updatetimeassignmentreply.cpp similarity index 100% rename from replies/updatetimeassignmentreply.cpp rename to zeiterfassung/replies/updatetimeassignmentreply.cpp diff --git a/replies/updatetimeassignmentreply.h b/zeiterfassung/replies/updatetimeassignmentreply.h similarity index 100% rename from replies/updatetimeassignmentreply.h rename to zeiterfassung/replies/updatetimeassignmentreply.h diff --git a/replies/userinforeply.cpp b/zeiterfassung/replies/userinforeply.cpp similarity index 100% rename from replies/userinforeply.cpp rename to zeiterfassung/replies/userinforeply.cpp diff --git a/replies/userinforeply.h b/zeiterfassung/replies/userinforeply.h similarity index 100% rename from replies/userinforeply.h rename to zeiterfassung/replies/userinforeply.h diff --git a/replies/zeiterfassungreply.cpp b/zeiterfassung/replies/zeiterfassungreply.cpp similarity index 100% rename from replies/zeiterfassungreply.cpp rename to zeiterfassung/replies/zeiterfassungreply.cpp diff --git a/replies/zeiterfassungreply.h b/zeiterfassung/replies/zeiterfassungreply.h similarity index 100% rename from replies/zeiterfassungreply.h rename to zeiterfassung/replies/zeiterfassungreply.h diff --git a/resources.qrc b/zeiterfassung/resources.qrc similarity index 100% rename from resources.qrc rename to zeiterfassung/resources.qrc diff --git a/stripfactory.cpp b/zeiterfassung/stripfactory.cpp similarity index 100% rename from stripfactory.cpp rename to zeiterfassung/stripfactory.cpp diff --git a/stripfactory.h b/zeiterfassung/stripfactory.h similarity index 100% rename from stripfactory.h rename to zeiterfassung/stripfactory.h diff --git a/strips/bookingendstrip.ui b/zeiterfassung/strips/bookingendstrip.ui similarity index 100% rename from strips/bookingendstrip.ui rename to zeiterfassung/strips/bookingendstrip.ui diff --git a/strips/bookingstartstrip.ui b/zeiterfassung/strips/bookingstartstrip.ui similarity index 100% rename from strips/bookingstartstrip.ui rename to zeiterfassung/strips/bookingstartstrip.ui diff --git a/strips/timeassignmentstrip.ui b/zeiterfassung/strips/timeassignmentstrip.ui similarity index 100% rename from strips/timeassignmentstrip.ui rename to zeiterfassung/strips/timeassignmentstrip.ui diff --git a/stripswidget.cpp b/zeiterfassung/stripswidget.cpp similarity index 100% rename from stripswidget.cpp rename to zeiterfassung/stripswidget.cpp diff --git a/stripswidget.h b/zeiterfassung/stripswidget.h similarity index 100% rename from stripswidget.h rename to zeiterfassung/stripswidget.h diff --git a/themes/dark_theme.qss b/zeiterfassung/themes/dark_theme.qss similarity index 100% rename from themes/dark_theme.qss rename to zeiterfassung/themes/dark_theme.qss diff --git a/themes/dark_theme/Hmovetoolbar.png b/zeiterfassung/themes/dark_theme/Hmovetoolbar.png similarity index 100% rename from themes/dark_theme/Hmovetoolbar.png rename to zeiterfassung/themes/dark_theme/Hmovetoolbar.png diff --git a/themes/dark_theme/Hsepartoolbar.png b/zeiterfassung/themes/dark_theme/Hsepartoolbar.png similarity index 100% rename from themes/dark_theme/Hsepartoolbar.png rename to zeiterfassung/themes/dark_theme/Hsepartoolbar.png diff --git a/themes/dark_theme/Vmovetoolbar.png b/zeiterfassung/themes/dark_theme/Vmovetoolbar.png similarity index 100% rename from themes/dark_theme/Vmovetoolbar.png rename to zeiterfassung/themes/dark_theme/Vmovetoolbar.png diff --git a/themes/dark_theme/Vsepartoolbar.png b/zeiterfassung/themes/dark_theme/Vsepartoolbar.png similarity index 100% rename from themes/dark_theme/Vsepartoolbar.png rename to zeiterfassung/themes/dark_theme/Vsepartoolbar.png diff --git a/themes/dark_theme/branch_closed-on.png b/zeiterfassung/themes/dark_theme/branch_closed-on.png similarity index 100% rename from themes/dark_theme/branch_closed-on.png rename to zeiterfassung/themes/dark_theme/branch_closed-on.png diff --git a/themes/dark_theme/branch_closed.png b/zeiterfassung/themes/dark_theme/branch_closed.png similarity index 100% rename from themes/dark_theme/branch_closed.png rename to zeiterfassung/themes/dark_theme/branch_closed.png diff --git a/themes/dark_theme/branch_open-on.png b/zeiterfassung/themes/dark_theme/branch_open-on.png similarity index 100% rename from themes/dark_theme/branch_open-on.png rename to zeiterfassung/themes/dark_theme/branch_open-on.png diff --git a/themes/dark_theme/branch_open.png b/zeiterfassung/themes/dark_theme/branch_open.png similarity index 100% rename from themes/dark_theme/branch_open.png rename to zeiterfassung/themes/dark_theme/branch_open.png diff --git a/themes/dark_theme/checkbox_checked.png b/zeiterfassung/themes/dark_theme/checkbox_checked.png similarity index 100% rename from themes/dark_theme/checkbox_checked.png rename to zeiterfassung/themes/dark_theme/checkbox_checked.png diff --git a/themes/dark_theme/checkbox_checked_disabled.png b/zeiterfassung/themes/dark_theme/checkbox_checked_disabled.png similarity index 100% rename from themes/dark_theme/checkbox_checked_disabled.png rename to zeiterfassung/themes/dark_theme/checkbox_checked_disabled.png diff --git a/themes/dark_theme/checkbox_checked_focus.png b/zeiterfassung/themes/dark_theme/checkbox_checked_focus.png similarity index 100% rename from themes/dark_theme/checkbox_checked_focus.png rename to zeiterfassung/themes/dark_theme/checkbox_checked_focus.png diff --git a/themes/dark_theme/checkbox_indeterminate.png b/zeiterfassung/themes/dark_theme/checkbox_indeterminate.png similarity index 100% rename from themes/dark_theme/checkbox_indeterminate.png rename to zeiterfassung/themes/dark_theme/checkbox_indeterminate.png diff --git a/themes/dark_theme/checkbox_indeterminate_disabled.png b/zeiterfassung/themes/dark_theme/checkbox_indeterminate_disabled.png similarity index 100% rename from themes/dark_theme/checkbox_indeterminate_disabled.png rename to zeiterfassung/themes/dark_theme/checkbox_indeterminate_disabled.png diff --git a/themes/dark_theme/checkbox_indeterminate_focus.png b/zeiterfassung/themes/dark_theme/checkbox_indeterminate_focus.png similarity index 100% rename from themes/dark_theme/checkbox_indeterminate_focus.png rename to zeiterfassung/themes/dark_theme/checkbox_indeterminate_focus.png diff --git a/themes/dark_theme/checkbox_unchecked.png b/zeiterfassung/themes/dark_theme/checkbox_unchecked.png similarity index 100% rename from themes/dark_theme/checkbox_unchecked.png rename to zeiterfassung/themes/dark_theme/checkbox_unchecked.png diff --git a/themes/dark_theme/checkbox_unchecked_disabled.png b/zeiterfassung/themes/dark_theme/checkbox_unchecked_disabled.png similarity index 100% rename from themes/dark_theme/checkbox_unchecked_disabled.png rename to zeiterfassung/themes/dark_theme/checkbox_unchecked_disabled.png diff --git a/themes/dark_theme/checkbox_unchecked_focus.png b/zeiterfassung/themes/dark_theme/checkbox_unchecked_focus.png similarity index 100% rename from themes/dark_theme/checkbox_unchecked_focus.png rename to zeiterfassung/themes/dark_theme/checkbox_unchecked_focus.png diff --git a/themes/dark_theme/close-hover.png b/zeiterfassung/themes/dark_theme/close-hover.png similarity index 100% rename from themes/dark_theme/close-hover.png rename to zeiterfassung/themes/dark_theme/close-hover.png diff --git a/themes/dark_theme/close-pressed.png b/zeiterfassung/themes/dark_theme/close-pressed.png similarity index 100% rename from themes/dark_theme/close-pressed.png rename to zeiterfassung/themes/dark_theme/close-pressed.png diff --git a/themes/dark_theme/close.png b/zeiterfassung/themes/dark_theme/close.png similarity index 100% rename from themes/dark_theme/close.png rename to zeiterfassung/themes/dark_theme/close.png diff --git a/themes/dark_theme/down_arrow.png b/zeiterfassung/themes/dark_theme/down_arrow.png similarity index 100% rename from themes/dark_theme/down_arrow.png rename to zeiterfassung/themes/dark_theme/down_arrow.png diff --git a/themes/dark_theme/down_arrow_disabled.png b/zeiterfassung/themes/dark_theme/down_arrow_disabled.png similarity index 100% rename from themes/dark_theme/down_arrow_disabled.png rename to zeiterfassung/themes/dark_theme/down_arrow_disabled.png diff --git a/themes/dark_theme/left_arrow.png b/zeiterfassung/themes/dark_theme/left_arrow.png similarity index 100% rename from themes/dark_theme/left_arrow.png rename to zeiterfassung/themes/dark_theme/left_arrow.png diff --git a/themes/dark_theme/left_arrow_disabled.png b/zeiterfassung/themes/dark_theme/left_arrow_disabled.png similarity index 100% rename from themes/dark_theme/left_arrow_disabled.png rename to zeiterfassung/themes/dark_theme/left_arrow_disabled.png diff --git a/themes/dark_theme/radio_checked.png b/zeiterfassung/themes/dark_theme/radio_checked.png similarity index 100% rename from themes/dark_theme/radio_checked.png rename to zeiterfassung/themes/dark_theme/radio_checked.png diff --git a/themes/dark_theme/radio_checked_disabled.png b/zeiterfassung/themes/dark_theme/radio_checked_disabled.png similarity index 100% rename from themes/dark_theme/radio_checked_disabled.png rename to zeiterfassung/themes/dark_theme/radio_checked_disabled.png diff --git a/themes/dark_theme/radio_checked_focus.png b/zeiterfassung/themes/dark_theme/radio_checked_focus.png similarity index 100% rename from themes/dark_theme/radio_checked_focus.png rename to zeiterfassung/themes/dark_theme/radio_checked_focus.png diff --git a/themes/dark_theme/radio_unchecked.png b/zeiterfassung/themes/dark_theme/radio_unchecked.png similarity index 100% rename from themes/dark_theme/radio_unchecked.png rename to zeiterfassung/themes/dark_theme/radio_unchecked.png diff --git a/themes/dark_theme/radio_unchecked_disabled.png b/zeiterfassung/themes/dark_theme/radio_unchecked_disabled.png similarity index 100% rename from themes/dark_theme/radio_unchecked_disabled.png rename to zeiterfassung/themes/dark_theme/radio_unchecked_disabled.png diff --git a/themes/dark_theme/radio_unchecked_focus.png b/zeiterfassung/themes/dark_theme/radio_unchecked_focus.png similarity index 100% rename from themes/dark_theme/radio_unchecked_focus.png rename to zeiterfassung/themes/dark_theme/radio_unchecked_focus.png diff --git a/themes/dark_theme/right_arrow.png b/zeiterfassung/themes/dark_theme/right_arrow.png similarity index 100% rename from themes/dark_theme/right_arrow.png rename to zeiterfassung/themes/dark_theme/right_arrow.png diff --git a/themes/dark_theme/right_arrow_disabled.png b/zeiterfassung/themes/dark_theme/right_arrow_disabled.png similarity index 100% rename from themes/dark_theme/right_arrow_disabled.png rename to zeiterfassung/themes/dark_theme/right_arrow_disabled.png diff --git a/themes/dark_theme/sizegrip.png b/zeiterfassung/themes/dark_theme/sizegrip.png similarity index 100% rename from themes/dark_theme/sizegrip.png rename to zeiterfassung/themes/dark_theme/sizegrip.png diff --git a/themes/dark_theme/stylesheet-branch-end.png b/zeiterfassung/themes/dark_theme/stylesheet-branch-end.png similarity index 100% rename from themes/dark_theme/stylesheet-branch-end.png rename to zeiterfassung/themes/dark_theme/stylesheet-branch-end.png diff --git a/themes/dark_theme/stylesheet-branch-more.png b/zeiterfassung/themes/dark_theme/stylesheet-branch-more.png similarity index 100% rename from themes/dark_theme/stylesheet-branch-more.png rename to zeiterfassung/themes/dark_theme/stylesheet-branch-more.png diff --git a/themes/dark_theme/stylesheet-vline.png b/zeiterfassung/themes/dark_theme/stylesheet-vline.png similarity index 100% rename from themes/dark_theme/stylesheet-vline.png rename to zeiterfassung/themes/dark_theme/stylesheet-vline.png diff --git a/themes/dark_theme/transparent.png b/zeiterfassung/themes/dark_theme/transparent.png similarity index 100% rename from themes/dark_theme/transparent.png rename to zeiterfassung/themes/dark_theme/transparent.png diff --git a/themes/dark_theme/undock.png b/zeiterfassung/themes/dark_theme/undock.png similarity index 100% rename from themes/dark_theme/undock.png rename to zeiterfassung/themes/dark_theme/undock.png diff --git a/themes/dark_theme/up_arrow.png b/zeiterfassung/themes/dark_theme/up_arrow.png similarity index 100% rename from themes/dark_theme/up_arrow.png rename to zeiterfassung/themes/dark_theme/up_arrow.png diff --git a/themes/dark_theme/up_arrow_disabled.png b/zeiterfassung/themes/dark_theme/up_arrow_disabled.png similarity index 100% rename from themes/dark_theme/up_arrow_disabled.png rename to zeiterfassung/themes/dark_theme/up_arrow_disabled.png diff --git a/timeutils.cpp b/zeiterfassung/timeutils.cpp similarity index 100% rename from timeutils.cpp rename to zeiterfassung/timeutils.cpp diff --git a/timeutils.h b/zeiterfassung/timeutils.h similarity index 100% rename from timeutils.h rename to zeiterfassung/timeutils.h diff --git a/translations/zeiterfassung_de.qm b/zeiterfassung/translations/zeiterfassung_de.qm similarity index 100% rename from translations/zeiterfassung_de.qm rename to zeiterfassung/translations/zeiterfassung_de.qm diff --git a/translations/zeiterfassung_de.ts b/zeiterfassung/translations/zeiterfassung_de.ts similarity index 100% rename from translations/zeiterfassung_de.ts rename to zeiterfassung/translations/zeiterfassung_de.ts diff --git a/translations/zeiterfassung_en.qm b/zeiterfassung/translations/zeiterfassung_en.qm similarity index 100% rename from translations/zeiterfassung_en.qm rename to zeiterfassung/translations/zeiterfassung_en.qm diff --git a/translations/zeiterfassung_en.ts b/zeiterfassung/translations/zeiterfassung_en.ts similarity index 100% rename from translations/zeiterfassung_en.ts rename to zeiterfassung/translations/zeiterfassung_en.ts diff --git a/zeiterfassung/zeiterfassung.pro b/zeiterfassung/zeiterfassung.pro new file mode 100755 index 0000000..4fdd91e --- /dev/null +++ b/zeiterfassung/zeiterfassung.pro @@ -0,0 +1,186 @@ +QT += network gui widgets uitools + +CONFIG += c++14 +CONFIG -= app_bundle + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which as been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +RC_ICONS = icon.ico + +SOURCES += main.cpp \ + mainwindow.cpp \ + dialogs/aboutmedialog.cpp \ + dialogs/authenticationdialog.cpp \ + zeiterfassungsettings.cpp \ + dialogs/settingsdialog.cpp \ + dialogs/languageselectiondialog.cpp \ + dialogs/timeassignmentdialog.cpp \ + models/timeassignmentsmodel.cpp \ + dialogs/bookingdialog.cpp \ + models/bookingsmodel.cpp \ + dialogs/updatedialog.cpp \ + stripswidget.cpp \ + timeutils.cpp \ + stripfactory.cpp \ + zeiterfassungapi.cpp \ + replies/loginpagereply.cpp \ + replies/loginreply.cpp \ + replies/userinforeply.cpp \ + replies/getbookingsreply.cpp \ + replies/createbookingreply.cpp \ + replies/updatebookingreply.cpp \ + replies/deletebookingreply.cpp \ + replies/gettimeassignmentsreply.cpp \ + replies/createtimeassignmentreply.cpp \ + replies/updatetimeassignmentreply.cpp \ + replies/getprojectsreply.cpp \ + replies/getauswertungreply.cpp \ + replies/zeiterfassungreply.cpp \ + replies/deletetimeassignmentreply.cpp \ + replies/getpresencestatusreply.cpp + +HEADERS += \ + mainwindow.h \ + dialogs/aboutmedialog.h \ + dialogs/authenticationdialog.h \ + zeiterfassungsettings.h \ + dialogs/settingsdialog.h \ + dialogs/languageselectiondialog.h \ + dialogs/timeassignmentdialog.h \ + models/timeassignmentsmodel.h \ + dialogs/bookingdialog.h \ + models/bookingsmodel.h \ + dialogs/updatedialog.h \ + stripswidget.h \ + timeutils.h \ + stripfactory.h \ + zeiterfassungapi.h \ + replies/loginpagereply.h \ + replies/loginreply.h \ + replies/userinforeply.h \ + replies/getbookingsreply.h \ + replies/createbookingreply.h \ + replies/updatebookingreply.h \ + replies/deletebookingreply.h \ + replies/gettimeassignmentsreply.h \ + replies/createtimeassignmentreply.h \ + replies/updatetimeassignmentreply.h \ + replies/getprojectsreply.h \ + replies/getauswertungreply.h \ + replies/zeiterfassungreply.h \ + replies/deletetimeassignmentreply.h \ + cpp14polyfills.h \ + replies/getpresencestatusreply.h + +FORMS += \ + mainwindow.ui \ + dialogs/aboutmedialog.ui \ + dialogs/authenticationdialog.ui \ + dialogs/settingsdialog.ui \ + dialogs/languageselectiondialog.ui \ + dialogs/timeassignmentdialog.ui \ + dialogs/bookingdialog.ui \ + dialogs/updatedialog.ui + +RESOURCES += \ + resources.qrc + +TRANSLATIONS += \ + translations/zeiterfassung_en.ts \ + translations/zeiterfassung_de.ts + +win32 { + CONFIG(debug, release|debug) { + translationsinstall.path = $${OUT_PWD}/debug/translations + themesinstall.path = $${OUT_PWD}/debug/themes + darkthemeinstall.path = $${OUT_PWD}/debug/themes/dark_theme + stripsinstall.path = $${OUT_PWD}/debug/strips + } else { + translationsinstall.path = $${OUT_PWD}/release/translations + themesinstall.path = $${OUT_PWD}/release/themes + darkthemeinstall.path = $${OUT_PWD}/release/themes/dark_theme + stripsinstall.path = $${OUT_PWD}/release/strips + } +} +unix { + translationsinstall.path = $${OUT_PWD}/translations + themesinstall.path = $${OUT_PWD}/themes + darkthemeinstall.path = $${OUT_PWD}/themes/dark_theme + stripsinstall.path = $${OUT_PWD}/strips +} + +translationsinstall.files = $$[QT_INSTALL_TRANSLATIONS]/qt_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtbase_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtquick1_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtscript_nen.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qt_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtbase_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtquick1_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtscript_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_de.qm \ + translations/zeiterfassung_en.qm \ + translations/zeiterfassung_de.qm + +themesinstall.files = themes/dark_theme.qss + +darkthemeinstall.files = themes/dark_theme/checkbox_indeterminate_disabled.png \ + themes/dark_theme/radio_unchecked.png \ + themes/dark_theme/up_arrow.png \ + themes/dark_theme/branch_closed-on.png \ + themes/dark_theme/checkbox_checked_disabled.png \ + themes/dark_theme/checkbox_unchecked.png \ + themes/dark_theme/checkbox_indeterminate.png \ + themes/dark_theme/stylesheet-branch-more.png \ + themes/dark_theme/checkbox_checked.png \ + themes/dark_theme/checkbox_unchecked_disabled.png \ + themes/dark_theme/radio_checked.png \ + themes/dark_theme/checkbox_indeterminate_focus.png \ + themes/dark_theme/checkbox_checked_focus.png \ + themes/dark_theme/branch_closed.png \ + themes/dark_theme/Vsepartoolbar.png \ + themes/dark_theme/radio_checked_disabled.png \ + themes/dark_theme/left_arrow.png \ + themes/dark_theme/Vmovetoolbar.png \ + themes/dark_theme/branch_open-on.png \ + themes/dark_theme/close.png \ + themes/dark_theme/stylesheet-branch-end.png \ + themes/dark_theme/stylesheet-vline.png \ + themes/dark_theme/down_arrow_disabled.png \ + themes/dark_theme/radio_unchecked_disabled.png \ + themes/dark_theme/left_arrow_disabled.png \ + themes/dark_theme/Hmovetoolbar.png \ + themes/dark_theme/close-pressed.png \ + themes/dark_theme/up_arrow_disabled.png \ + themes/dark_theme/branch_open.png \ + themes/dark_theme/radio_checked_focus.png \ + themes/dark_theme/sizegrip.png \ + themes/dark_theme/checkbox_unchecked_focus.png \ + themes/dark_theme/right_arrow_disabled.png \ + themes/dark_theme/Hsepartoolbar.png \ + themes/dark_theme/undock.png \ + themes/dark_theme/transparent.png \ + themes/dark_theme/close-hover.png \ + themes/dark_theme/radio_unchecked_focus.png \ + themes/dark_theme/down_arrow.png \ + themes/dark_theme/right_arrow.png + +stripsinstall.files = strips/bookingstartstrip.ui \ + strips/bookingendstrip.ui \ + strips/timeassignmentstrip.ui + +INSTALLS += translationsinstall +INSTALLS += themesinstall +INSTALLS += darkthemeinstall +INSTALLS += stripsinstall diff --git a/zeiterfassungapi.cpp b/zeiterfassung/zeiterfassungapi.cpp similarity index 100% rename from zeiterfassungapi.cpp rename to zeiterfassung/zeiterfassungapi.cpp diff --git a/zeiterfassungapi.h b/zeiterfassung/zeiterfassungapi.h similarity index 100% rename from zeiterfassungapi.h rename to zeiterfassung/zeiterfassungapi.h diff --git a/zeiterfassungsettings.cpp b/zeiterfassung/zeiterfassungsettings.cpp similarity index 100% rename from zeiterfassungsettings.cpp rename to zeiterfassung/zeiterfassungsettings.cpp diff --git a/zeiterfassungsettings.h b/zeiterfassung/zeiterfassungsettings.h similarity index 100% rename from zeiterfassungsettings.h rename to zeiterfassung/zeiterfassungsettings.h -- 2.50.1 From daa7cc9405cce6e99eb56cf0125accc134572826 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Fri, 15 Dec 2017 19:38:45 +0100 Subject: [PATCH 03/15] Added zeiterfassunglib --- zeiterfassung.pro | 7 +- zeiterfassung/installs.pri | 71 +++ zeiterfassung/installs_unix.pri | 3 + zeiterfassung/installs_win32.pri | 31 ++ zeiterfassung/main.cpp | 14 +- .../translations/zeiterfassung_de.ts | 411 ++++-------------- .../translations/zeiterfassung_en.ts | 411 ++++-------------- zeiterfassung/unix/start.sh | 1 + zeiterfassung/win32/Qt.conf | 0 zeiterfassung/zeiterfassung.pro | 145 +----- .../cpp14polyfills.h | 0 .../replies/createbookingreply.cpp | 0 .../replies/createbookingreply.h | 3 +- .../replies/createtimeassignmentreply.cpp | 0 .../replies/createtimeassignmentreply.h | 3 +- .../replies/deletebookingreply.cpp | 0 .../replies/deletebookingreply.h | 3 +- .../replies/deletetimeassignmentreply.cpp | 0 .../replies/deletetimeassignmentreply.h | 3 +- .../replies/getauswertungreply.cpp | 0 .../replies/getauswertungreply.h | 3 +- .../replies/getbookingsreply.cpp | 0 .../replies/getbookingsreply.h | 3 +- .../replies/getpresencestatusreply.cpp | 0 .../replies/getpresencestatusreply.h | 3 +- .../replies/getprojectsreply.cpp | 0 .../replies/getprojectsreply.h | 3 +- .../replies/gettimeassignmentsreply.cpp | 0 .../replies/gettimeassignmentsreply.h | 3 +- .../replies/loginpagereply.cpp | 0 .../replies/loginpagereply.h | 3 +- .../replies/loginreply.cpp | 0 .../replies/loginreply.h | 3 +- .../replies/updatebookingreply.cpp | 0 .../replies/updatebookingreply.h | 3 +- .../replies/updatetimeassignmentreply.cpp | 0 .../replies/updatetimeassignmentreply.h | 3 +- .../replies/userinforeply.cpp | 0 .../replies/userinforeply.h | 3 +- .../replies/zeiterfassungreply.cpp | 0 .../replies/zeiterfassungreply.h | 4 +- .../translations/zeiterfassunglib_de.qm | Bin 0 -> 23 bytes .../translations/zeiterfassunglib_de.ts | 267 ++++++++++++ .../translations/zeiterfassunglib_en.qm | Bin 0 -> 23 bytes .../translations/zeiterfassunglib_en.ts | 267 ++++++++++++ .../zeiterfassungapi.cpp | 0 .../zeiterfassungapi.h | 4 +- zeiterfassunglib/zeiterfassunglib.pro | 56 +++ zeiterfassunglib/zeiterfassunglib_global.h | 12 + 49 files changed, 939 insertions(+), 807 deletions(-) create mode 100644 zeiterfassung/installs.pri create mode 100644 zeiterfassung/installs_unix.pri create mode 100644 zeiterfassung/installs_win32.pri create mode 100755 zeiterfassung/unix/start.sh create mode 100644 zeiterfassung/win32/Qt.conf rename {zeiterfassung => zeiterfassunglib}/cpp14polyfills.h (100%) rename {zeiterfassung => zeiterfassunglib}/replies/createbookingreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/createbookingreply.h (78%) rename {zeiterfassung => zeiterfassunglib}/replies/createtimeassignmentreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/createtimeassignmentreply.h (79%) rename {zeiterfassung => zeiterfassunglib}/replies/deletebookingreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/deletebookingreply.h (76%) rename {zeiterfassung => zeiterfassunglib}/replies/deletetimeassignmentreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/deletetimeassignmentreply.h (76%) rename {zeiterfassung => zeiterfassunglib}/replies/getauswertungreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/getauswertungreply.h (81%) rename {zeiterfassung => zeiterfassunglib}/replies/getbookingsreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/getbookingsreply.h (82%) rename {zeiterfassung => zeiterfassunglib}/replies/getpresencestatusreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/getpresencestatusreply.h (82%) rename {zeiterfassung => zeiterfassunglib}/replies/getprojectsreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/getprojectsreply.h (82%) rename {zeiterfassung => zeiterfassunglib}/replies/gettimeassignmentsreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/gettimeassignmentsreply.h (82%) rename {zeiterfassung => zeiterfassunglib}/replies/loginpagereply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/loginpagereply.h (76%) rename {zeiterfassung => zeiterfassunglib}/replies/loginreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/loginreply.h (76%) rename {zeiterfassung => zeiterfassunglib}/replies/updatebookingreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/updatebookingreply.h (77%) rename {zeiterfassung => zeiterfassunglib}/replies/updatetimeassignmentreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/updatetimeassignmentreply.h (79%) rename {zeiterfassung => zeiterfassunglib}/replies/userinforeply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/userinforeply.h (81%) rename {zeiterfassung => zeiterfassunglib}/replies/zeiterfassungreply.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/replies/zeiterfassungreply.h (83%) create mode 100644 zeiterfassunglib/translations/zeiterfassunglib_de.qm create mode 100644 zeiterfassunglib/translations/zeiterfassunglib_de.ts create mode 100644 zeiterfassunglib/translations/zeiterfassunglib_en.qm create mode 100644 zeiterfassunglib/translations/zeiterfassunglib_en.ts rename {zeiterfassung => zeiterfassunglib}/zeiterfassungapi.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/zeiterfassungapi.h (97%) create mode 100644 zeiterfassunglib/zeiterfassunglib.pro create mode 100644 zeiterfassunglib/zeiterfassunglib_global.h diff --git a/zeiterfassung.pro b/zeiterfassung.pro index 56af3c4..9c52032 100644 --- a/zeiterfassung.pro +++ b/zeiterfassung.pro @@ -1,3 +1,6 @@ -TEMPLATE=subdirs +TEMPLATE = subdirs -SUBDIRS+=zeiterfassung +SUBDIRS += zeiterfassung \ + zeiterfassunglib + +zeiterfassung.depends += zeiterfassunglib diff --git a/zeiterfassung/installs.pri b/zeiterfassung/installs.pri new file mode 100644 index 0000000..78833de --- /dev/null +++ b/zeiterfassung/installs.pri @@ -0,0 +1,71 @@ +translationsinstall.path = $${DESTDIR}/translations +translationsinstall.files = $$[QT_INSTALL_TRANSLATIONS]/qt_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtbase_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtquick1_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtscript_nen.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qt_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtbase_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtquick1_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtscript_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_de.qm \ + translations/zeiterfassung_en.qm \ + translations/zeiterfassung_de.qm \ + ../zeiterfassunglib/translations/zeiterfassunglib_en.qm \ + ../zeiterfassunglib/translations/zeiterfassunglib_de.qm +INSTALLS += translationsinstall + +themesinstall.path = $${DESTDIR}/themes +themesinstall.files = themes/dark_theme.qss +INSTALLS += themesinstall + +darkthemeinstall.path = $${DESTDIR}/themes/dark_theme +darkthemeinstall.files = themes/dark_theme/checkbox_indeterminate_disabled.png \ + themes/dark_theme/radio_unchecked.png \ + themes/dark_theme/up_arrow.png \ + themes/dark_theme/branch_closed-on.png \ + themes/dark_theme/checkbox_checked_disabled.png \ + themes/dark_theme/checkbox_unchecked.png \ + themes/dark_theme/checkbox_indeterminate.png \ + themes/dark_theme/stylesheet-branch-more.png \ + themes/dark_theme/checkbox_checked.png \ + themes/dark_theme/checkbox_unchecked_disabled.png \ + themes/dark_theme/radio_checked.png \ + themes/dark_theme/checkbox_indeterminate_focus.png \ + themes/dark_theme/checkbox_checked_focus.png \ + themes/dark_theme/branch_closed.png \ + themes/dark_theme/Vsepartoolbar.png \ + themes/dark_theme/radio_checked_disabled.png \ + themes/dark_theme/left_arrow.png \ + themes/dark_theme/Vmovetoolbar.png \ + themes/dark_theme/branch_open-on.png \ + themes/dark_theme/close.png \ + themes/dark_theme/stylesheet-branch-end.png \ + themes/dark_theme/stylesheet-vline.png \ + themes/dark_theme/down_arrow_disabled.png \ + themes/dark_theme/radio_unchecked_disabled.png \ + themes/dark_theme/left_arrow_disabled.png \ + themes/dark_theme/Hmovetoolbar.png \ + themes/dark_theme/close-pressed.png \ + themes/dark_theme/up_arrow_disabled.png \ + themes/dark_theme/branch_open.png \ + themes/dark_theme/radio_checked_focus.png \ + themes/dark_theme/sizegrip.png \ + themes/dark_theme/checkbox_unchecked_focus.png \ + themes/dark_theme/right_arrow_disabled.png \ + themes/dark_theme/Hsepartoolbar.png \ + themes/dark_theme/undock.png \ + themes/dark_theme/transparent.png \ + themes/dark_theme/close-hover.png \ + themes/dark_theme/radio_unchecked_focus.png \ + themes/dark_theme/down_arrow.png \ + themes/dark_theme/right_arrow.png +INSTALLS += darkthemeinstall + +stripsinstall.path = $${DESTDIR}/strips +stripsinstall.files = strips/bookingstartstrip.ui \ + strips/bookingendstrip.ui \ + strips/timeassignmentstrip.ui +INSTALLS += stripsinstall diff --git a/zeiterfassung/installs_unix.pri b/zeiterfassung/installs_unix.pri new file mode 100644 index 0000000..0e21c25 --- /dev/null +++ b/zeiterfassung/installs_unix.pri @@ -0,0 +1,3 @@ +scriptsinstall.path = $${DESTDIR} +scriptsinstall.files = unix/start.sh +INSTALLS += scriptsinstall diff --git a/zeiterfassung/installs_win32.pri b/zeiterfassung/installs_win32.pri new file mode 100644 index 0000000..f824ae9 --- /dev/null +++ b/zeiterfassung/installs_win32.pri @@ -0,0 +1,31 @@ +CONFIG(debug, release|debug): DEBUG_SIGN = d + +libinstall.path = $${DESTDIR} +libinstall.files = win32/Qt.conf \ + $$OUT_PWD/../lib/zeiterfassunglib.dll \ + $$[QT_INSTALL_BINS]/Qt5Core$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/Qt5Gui$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/Qt5Network$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/Qt5Widgets$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/libgcc_s_dw2-1.dll \ + $$[QT_INSTALL_BINS]/libstd~1.dll \ + $$[QT_INSTALL_BINS]/libwinpthread-1.dll +INSTALLS += libinstall + +iconenginesinstall.path = $$DESTDIR/plugins/iconengines +iconenginesinstall.files = $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon$${DEBUG_SIGN}.dll + +imageformatsinstall.path = $$DESTDIR/plugins/imageformats +imageformatsinstall.files = $$[QT_INSTALL_PLUGINS]/imageformats/qdds$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qicns$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qico$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qtga$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qwbmp$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${DEBUG_SIGN}.dll + +platformsinstall.path = $$DESTDIR/plugins/platforms +win32: platformsinstall.files = $$[QT_INSTALL_PLUGINS]/platforms/qwindows$${DEBUG_SIGN}.dll diff --git a/zeiterfassung/main.cpp b/zeiterfassung/main.cpp index a40b1f7..b823c50 100755 --- a/zeiterfassung/main.cpp +++ b/zeiterfassung/main.cpp @@ -24,6 +24,12 @@ #include "replies/userinforeply.h" #include "stripfactory.h" +struct { + QTranslator qtTranslator; + QTranslator zeiterfassungTranslator; + QTranslator zeiterfassunglibTranslator; +} translators; + bool loadAndInstallTranslator(QTranslator &translator, const QLocale &locale, const QString &filename, @@ -72,12 +78,10 @@ bool loadTranslations(QSplashScreen &splashScreen, ZeiterfassungSettings &settin QLocale locale(settings.language(), QLocale::Austria); QLocale::setDefault(locale); - QTranslator qtTranslator(qApp); - QTranslator zeiterfassungTranslator(qApp); - auto translationsDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("translations")); - loadAndInstallTranslator(qtTranslator, locale, QStringLiteral("qt"), QStringLiteral("_"), translationsDir); - loadAndInstallTranslator(zeiterfassungTranslator, locale, QStringLiteral("zeiterfassung"), QStringLiteral("_"), translationsDir); + loadAndInstallTranslator(translators.qtTranslator, locale, QStringLiteral("qt"), QStringLiteral("_"), translationsDir); + loadAndInstallTranslator(translators.zeiterfassungTranslator, locale, QStringLiteral("zeiterfassung"), QStringLiteral("_"), translationsDir); + loadAndInstallTranslator(translators.zeiterfassunglibTranslator, locale, QStringLiteral("zeiterfassunglib"), QStringLiteral("_"), translationsDir); return true; } diff --git a/zeiterfassung/translations/zeiterfassung_de.ts b/zeiterfassung/translations/zeiterfassung_de.ts index 370f0de..84ab4c3 100644 --- a/zeiterfassung/translations/zeiterfassung_de.ts +++ b/zeiterfassung/translations/zeiterfassung_de.ts @@ -111,141 +111,6 @@ Text - - CreateBookingReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an object! - JSON Dokument ist kein Objekt! - - - - JSON does not contain bookingNr! - JSON beinhaltet keine bookingNr! - - - - CreateTimeAssignmentReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an object! - JSON Dokument ist kein Objekt! - - - - JSON does not contain bookingNr! - JSON beinhaltet keine bookingNr! - - - - DeleteBookingReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - DeleteTimeAssignmentReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - GetAuswertungReply - - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - GetBookingsReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an array! - JSON Dokument ist keine Liste! - - - - GetProjectsReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an object! - JSON Dokument ist kein Objekt! - - - - JSON does not contain elements! - JSON beinhaltet kein elements! - - - - elements is not an array! - elements ist keine Liste! - - - - GetTimeAssignmentsReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an array! - JSON Dokument ist keine Liste! - - LanguageSelectionDialog @@ -275,42 +140,6 @@ Deutsch - - LoginPageReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Could not find necessary keywords in login page! - Konnte notwendiges Schlüsselwort in der Login-Seite finden! - - - - LoginReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Response did not contain a Location header. - Antwort enthielt keinen Location-Header. - - - - Authentication failure. Please check username and password. - Authentifizierungsfehler. Bitte überprüfen Sie Benutzername und Passwort. - - - - An unknown authentication failure occured. Redirected to: %0 - Bei der Authentifizierung ist ein unbekannter Fehler aufgetreten. Weiterleitung nach %0 - - MainWindow @@ -330,8 +159,8 @@ - - + + Start Kommen @@ -426,178 +255,180 @@ Hilfe - + Zeiterfassung - %0 (%1) Zeiterfassung - %0 (%1) - - + + Could not open auswertung! - + Could not open default PDF viewer! Konnte den PDF-Anzeiger nicht öffnen! - + Subproject Subprojekt - + Workpackage Arbeitspaket - + Text Text - - - - + + + + %0: %1 %0: %1 - - + + + + ??? ??? - - + + Balance Saldo - - + + Holidays Urlaubstage - - + + Could not load bookings! Konnte Buchungen nicht laden! - + Could not load Auswertung! - + %0h %0h - + Could not delete booking! Konnte Buchung nicht löschen! - + Edit booking Buchung bearbeiten - + Delete booking Buchung löschen - + Could not edit booking! Konnte Buchung nicht bearbeiten! - + Create booking Buchung erstellen - - + + n/a n/v - + Refresh bookings Buchungen aktualisieren - - - + + + Could not create booking! Konnte Buchung nicht erstellen! - + Do you really want to delete the booking? Möchten Sie die Buchung wirklich löschen? - + Refresh time assignments Kontierungen aktualisieren - + Edit time assignment Kontierung bearbeiten - + Delete time assignment Kontierung löschen - - - + + + Could not edit time assignment! Konnte Kontierung nicht bearbeiten! - + Do you really want to delete the time assignment? Möchten Sie die Kontierung wirklich löschen? - + Could not delete time assignment! Konnte Kontierung nicht löschen! - - + + %0 (%1) %0 (%1) - + Create time assignment Kontierung erstellen - - + + Could not create time assignment! Konnte Kontierung nicht erstellen! - - + + Switch Wechseln @@ -941,29 +772,6 @@ Your bookings and time assignments for this day are in an illegal state!Text - - UpdateBookingReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an object! - JSON Dokument ist kein Objekt! - - - - JSON does not contain bookingNr! - JSON beinhaltet keine bookingNr! - - UpdateDialog @@ -983,62 +791,11 @@ Your bookings and time assignments for this day are in an illegal state!Heute nicht mehr anzeigen - + Could not open default webbrowser! Konnte den Standard-Browser nicht öffnen! - - UpdateTimeAssignmentReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an object! - JSON Dokument ist kein Objekt! - - - - JSON does not contain bookingNr! - JSON beinhaltet keine bookingNr! - - - - UserInfoReply - - - Request error occured: %0 - Fehler bei Anfrage aufgetreten: %0 - - - - Parsing JSON failed: %0 - JSON konnte nicht geparst werden: %0 - - - - JSON document is not an object! - JSON Dokument ist kein Objekt! - - - - JSON does not contain evoAppsUser! - JSON beinhaltet kein evoAppsUser! - - - - evoAppsUser is not an object! - evoAppsUser ist kein Objekt! - - bookingEndStrip @@ -1058,101 +815,101 @@ Your bookings and time assignments for this day are in an illegal state! main - + Loading settings... Lade Einstellungen... - + Loading translations... Lade Übersetzungen... - - + + Invalid language selection! Ungültige Sprachauswahl! - + You did not select a valid language! Sie haben keine gültige Sprachauswahl getroffen! - + Loading theme... Lade Aussehen... - - - - + + + + Could not load theme! Konnte Aussehen nicht laden! - + Theme file does not exist! Aussehen-Datei existiert nicht! - + Loading login page... Lade Login-Seite... - - + + Could not access Zeiterfassung! Konnte Zeiterfassung nicht erreichen! - + Base url Basis URL - + Please enter the base url to the Zeiterfassung: Bitte geben Sie die Basis URL zur Zeiterfassung ein: - + Authenticating... Authentifiziere... - - + + Could not authenticate with Zeiterfassung! Konnte nicht mit Zeiterfassung authentifizieren! - + Getting user information... Hole Benutzer Information... - - + + Could not get user information! Konnte Benutzer Information nicht holen! - + Loading strip layouts... Lade Streifenlayouts... - - - - - - - - + + + + + + + + Could not load strips! Konnte Streifenlayouts nicht laden! diff --git a/zeiterfassung/translations/zeiterfassung_en.ts b/zeiterfassung/translations/zeiterfassung_en.ts index 281e6e6..25b2183 100644 --- a/zeiterfassung/translations/zeiterfassung_en.ts +++ b/zeiterfassung/translations/zeiterfassung_en.ts @@ -111,141 +111,6 @@ - - CreateBookingReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain bookingNr! - - - - - CreateTimeAssignmentReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain bookingNr! - - - - - DeleteBookingReply - - - Request error occured: %0 - - - - - DeleteTimeAssignmentReply - - - Request error occured: %0 - - - - - GetAuswertungReply - - - - Request error occured: %0 - - - - - GetBookingsReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an array! - - - - - GetProjectsReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain elements! - - - - - elements is not an array! - - - - - GetTimeAssignmentsReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an array! - - - LanguageSelectionDialog @@ -275,42 +140,6 @@ - - LoginPageReply - - - Request error occured: %0 - - - - - Could not find necessary keywords in login page! - - - - - LoginReply - - - Request error occured: %0 - - - - - Response did not contain a Location header. - - - - - Authentication failure. Please check username and password. - - - - - An unknown authentication failure occured. Redirected to: %0 - - - MainWindow @@ -330,8 +159,8 @@ - - + + Start @@ -426,178 +255,180 @@ - + Zeiterfassung - %0 (%1) - - + + Could not open auswertung! - + Could not open default PDF viewer! - + Subproject - + Workpackage - + Text - - - - + + + + %0: %1 - - + + + + ??? - - + + Balance - - + + Holidays - - + + Could not load bookings! - + Could not load Auswertung! - + %0h - + Could not delete booking! - + Edit booking - + Delete booking - + Could not edit booking! - + Create booking - - + + n/a - + Refresh bookings - - - + + + Could not create booking! - + Do you really want to delete the booking? - + Refresh time assignments - + Edit time assignment - + Delete time assignment - - - + + + Could not edit time assignment! - + Do you really want to delete the time assignment? - + Could not delete time assignment! - - + + %0 (%1) - + Create time assignment - - + + Could not create time assignment! - - + + Switch @@ -941,29 +772,6 @@ Your bookings and time assignments for this day are in an illegal state! - - UpdateBookingReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain bookingNr! - - - UpdateDialog @@ -983,62 +791,11 @@ Your bookings and time assignments for this day are in an illegal state! - + Could not open default webbrowser! - - UpdateTimeAssignmentReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain bookingNr! - - - - - UserInfoReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain evoAppsUser! - - - - - evoAppsUser is not an object! - - - bookingEndStrip @@ -1058,101 +815,101 @@ Your bookings and time assignments for this day are in an illegal state! main - + Loading settings... - + Loading translations... - - + + Invalid language selection! - + You did not select a valid language! - + Loading theme... - - - - + + + + Could not load theme! - + Theme file does not exist! - + Loading login page... - - + + Could not access Zeiterfassung! - + Base url - + Please enter the base url to the Zeiterfassung: - + Authenticating... - - + + Could not authenticate with Zeiterfassung! - + Getting user information... - - + + Could not get user information! - + Loading strip layouts... - - - - - - - - + + + + + + + + Could not load strips! diff --git a/zeiterfassung/unix/start.sh b/zeiterfassung/unix/start.sh new file mode 100755 index 0000000..59aa5f8 --- /dev/null +++ b/zeiterfassung/unix/start.sh @@ -0,0 +1 @@ +LD_LIBRARY_PATH=../lib ./zeiterfassung diff --git a/zeiterfassung/win32/Qt.conf b/zeiterfassung/win32/Qt.conf new file mode 100644 index 0000000..e69de29 diff --git a/zeiterfassung/zeiterfassung.pro b/zeiterfassung/zeiterfassung.pro index 4fdd91e..671ba01 100755 --- a/zeiterfassung/zeiterfassung.pro +++ b/zeiterfassung/zeiterfassung.pro @@ -1,18 +1,19 @@ QT += network gui widgets uitools +TARGET = zeiterfassung +TEMPLATE = app + CONFIG += c++14 CONFIG -= app_bundle -# The following define makes your compiler emit warnings if you use -# any feature of Qt which as been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS +DESTDIR = $${OUT_PWD}/../bin -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +LIBS += -L$$OUT_PWD/../lib -lzeiterfassunglib + +INCLUDEPATH += $$PWD/../zeiterfassunglib +DEPENDPATH += $$PWD/../zeiterfassunglib + +DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT RC_ICONS = icon.ico @@ -30,23 +31,7 @@ SOURCES += main.cpp \ dialogs/updatedialog.cpp \ stripswidget.cpp \ timeutils.cpp \ - stripfactory.cpp \ - zeiterfassungapi.cpp \ - replies/loginpagereply.cpp \ - replies/loginreply.cpp \ - replies/userinforeply.cpp \ - replies/getbookingsreply.cpp \ - replies/createbookingreply.cpp \ - replies/updatebookingreply.cpp \ - replies/deletebookingreply.cpp \ - replies/gettimeassignmentsreply.cpp \ - replies/createtimeassignmentreply.cpp \ - replies/updatetimeassignmentreply.cpp \ - replies/getprojectsreply.cpp \ - replies/getauswertungreply.cpp \ - replies/zeiterfassungreply.cpp \ - replies/deletetimeassignmentreply.cpp \ - replies/getpresencestatusreply.cpp + stripfactory.cpp HEADERS += \ mainwindow.h \ @@ -62,24 +47,7 @@ HEADERS += \ dialogs/updatedialog.h \ stripswidget.h \ timeutils.h \ - stripfactory.h \ - zeiterfassungapi.h \ - replies/loginpagereply.h \ - replies/loginreply.h \ - replies/userinforeply.h \ - replies/getbookingsreply.h \ - replies/createbookingreply.h \ - replies/updatebookingreply.h \ - replies/deletebookingreply.h \ - replies/gettimeassignmentsreply.h \ - replies/createtimeassignmentreply.h \ - replies/updatetimeassignmentreply.h \ - replies/getprojectsreply.h \ - replies/getauswertungreply.h \ - replies/zeiterfassungreply.h \ - replies/deletetimeassignmentreply.h \ - cpp14polyfills.h \ - replies/getpresencestatusreply.h + stripfactory.h FORMS += \ mainwindow.ui \ @@ -98,89 +66,6 @@ TRANSLATIONS += \ translations/zeiterfassung_en.ts \ translations/zeiterfassung_de.ts -win32 { - CONFIG(debug, release|debug) { - translationsinstall.path = $${OUT_PWD}/debug/translations - themesinstall.path = $${OUT_PWD}/debug/themes - darkthemeinstall.path = $${OUT_PWD}/debug/themes/dark_theme - stripsinstall.path = $${OUT_PWD}/debug/strips - } else { - translationsinstall.path = $${OUT_PWD}/release/translations - themesinstall.path = $${OUT_PWD}/release/themes - darkthemeinstall.path = $${OUT_PWD}/release/themes/dark_theme - stripsinstall.path = $${OUT_PWD}/release/strips - } -} -unix { - translationsinstall.path = $${OUT_PWD}/translations - themesinstall.path = $${OUT_PWD}/themes - darkthemeinstall.path = $${OUT_PWD}/themes/dark_theme - stripsinstall.path = $${OUT_PWD}/strips -} - -translationsinstall.files = $$[QT_INSTALL_TRANSLATIONS]/qt_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtbase_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtquick1_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtscript_nen.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qt_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtbase_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtquick1_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtscript_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_de.qm \ - translations/zeiterfassung_en.qm \ - translations/zeiterfassung_de.qm - -themesinstall.files = themes/dark_theme.qss - -darkthemeinstall.files = themes/dark_theme/checkbox_indeterminate_disabled.png \ - themes/dark_theme/radio_unchecked.png \ - themes/dark_theme/up_arrow.png \ - themes/dark_theme/branch_closed-on.png \ - themes/dark_theme/checkbox_checked_disabled.png \ - themes/dark_theme/checkbox_unchecked.png \ - themes/dark_theme/checkbox_indeterminate.png \ - themes/dark_theme/stylesheet-branch-more.png \ - themes/dark_theme/checkbox_checked.png \ - themes/dark_theme/checkbox_unchecked_disabled.png \ - themes/dark_theme/radio_checked.png \ - themes/dark_theme/checkbox_indeterminate_focus.png \ - themes/dark_theme/checkbox_checked_focus.png \ - themes/dark_theme/branch_closed.png \ - themes/dark_theme/Vsepartoolbar.png \ - themes/dark_theme/radio_checked_disabled.png \ - themes/dark_theme/left_arrow.png \ - themes/dark_theme/Vmovetoolbar.png \ - themes/dark_theme/branch_open-on.png \ - themes/dark_theme/close.png \ - themes/dark_theme/stylesheet-branch-end.png \ - themes/dark_theme/stylesheet-vline.png \ - themes/dark_theme/down_arrow_disabled.png \ - themes/dark_theme/radio_unchecked_disabled.png \ - themes/dark_theme/left_arrow_disabled.png \ - themes/dark_theme/Hmovetoolbar.png \ - themes/dark_theme/close-pressed.png \ - themes/dark_theme/up_arrow_disabled.png \ - themes/dark_theme/branch_open.png \ - themes/dark_theme/radio_checked_focus.png \ - themes/dark_theme/sizegrip.png \ - themes/dark_theme/checkbox_unchecked_focus.png \ - themes/dark_theme/right_arrow_disabled.png \ - themes/dark_theme/Hsepartoolbar.png \ - themes/dark_theme/undock.png \ - themes/dark_theme/transparent.png \ - themes/dark_theme/close-hover.png \ - themes/dark_theme/radio_unchecked_focus.png \ - themes/dark_theme/down_arrow.png \ - themes/dark_theme/right_arrow.png - -stripsinstall.files = strips/bookingstartstrip.ui \ - strips/bookingendstrip.ui \ - strips/timeassignmentstrip.ui - -INSTALLS += translationsinstall -INSTALLS += themesinstall -INSTALLS += darkthemeinstall -INSTALLS += stripsinstall +include(installs.pri) +unix: include(installs_unix.pri) +win32: include(installs_win32.pri) diff --git a/zeiterfassung/cpp14polyfills.h b/zeiterfassunglib/cpp14polyfills.h similarity index 100% rename from zeiterfassung/cpp14polyfills.h rename to zeiterfassunglib/cpp14polyfills.h diff --git a/zeiterfassung/replies/createbookingreply.cpp b/zeiterfassunglib/replies/createbookingreply.cpp similarity index 100% rename from zeiterfassung/replies/createbookingreply.cpp rename to zeiterfassunglib/replies/createbookingreply.cpp diff --git a/zeiterfassung/replies/createbookingreply.h b/zeiterfassunglib/replies/createbookingreply.h similarity index 78% rename from zeiterfassung/replies/createbookingreply.h rename to zeiterfassunglib/replies/createbookingreply.h index accc5dd..7111181 100644 --- a/zeiterfassung/replies/createbookingreply.h +++ b/zeiterfassunglib/replies/createbookingreply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class CreateBookingReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT CreateBookingReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/createtimeassignmentreply.cpp b/zeiterfassunglib/replies/createtimeassignmentreply.cpp similarity index 100% rename from zeiterfassung/replies/createtimeassignmentreply.cpp rename to zeiterfassunglib/replies/createtimeassignmentreply.cpp diff --git a/zeiterfassung/replies/createtimeassignmentreply.h b/zeiterfassunglib/replies/createtimeassignmentreply.h similarity index 79% rename from zeiterfassung/replies/createtimeassignmentreply.h rename to zeiterfassunglib/replies/createtimeassignmentreply.h index 634b907..0224410 100644 --- a/zeiterfassung/replies/createtimeassignmentreply.h +++ b/zeiterfassunglib/replies/createtimeassignmentreply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class CreateTimeAssignmentReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT CreateTimeAssignmentReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/deletebookingreply.cpp b/zeiterfassunglib/replies/deletebookingreply.cpp similarity index 100% rename from zeiterfassung/replies/deletebookingreply.cpp rename to zeiterfassunglib/replies/deletebookingreply.cpp diff --git a/zeiterfassung/replies/deletebookingreply.h b/zeiterfassunglib/replies/deletebookingreply.h similarity index 76% rename from zeiterfassung/replies/deletebookingreply.h rename to zeiterfassunglib/replies/deletebookingreply.h index 94796c4..6e701fa 100644 --- a/zeiterfassung/replies/deletebookingreply.h +++ b/zeiterfassunglib/replies/deletebookingreply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class DeleteBookingReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT DeleteBookingReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/deletetimeassignmentreply.cpp b/zeiterfassunglib/replies/deletetimeassignmentreply.cpp similarity index 100% rename from zeiterfassung/replies/deletetimeassignmentreply.cpp rename to zeiterfassunglib/replies/deletetimeassignmentreply.cpp diff --git a/zeiterfassung/replies/deletetimeassignmentreply.h b/zeiterfassunglib/replies/deletetimeassignmentreply.h similarity index 76% rename from zeiterfassung/replies/deletetimeassignmentreply.h rename to zeiterfassunglib/replies/deletetimeassignmentreply.h index b2a545e..ec7a4d0 100644 --- a/zeiterfassung/replies/deletetimeassignmentreply.h +++ b/zeiterfassunglib/replies/deletetimeassignmentreply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class DeleteTimeAssignmentReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT DeleteTimeAssignmentReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/getauswertungreply.cpp b/zeiterfassunglib/replies/getauswertungreply.cpp similarity index 100% rename from zeiterfassung/replies/getauswertungreply.cpp rename to zeiterfassunglib/replies/getauswertungreply.cpp diff --git a/zeiterfassung/replies/getauswertungreply.h b/zeiterfassunglib/replies/getauswertungreply.h similarity index 81% rename from zeiterfassung/replies/getauswertungreply.h rename to zeiterfassunglib/replies/getauswertungreply.h index b220880..c39e93e 100644 --- a/zeiterfassung/replies/getauswertungreply.h +++ b/zeiterfassunglib/replies/getauswertungreply.h @@ -6,9 +6,10 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class GetAuswertungReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT GetAuswertungReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/getbookingsreply.cpp b/zeiterfassunglib/replies/getbookingsreply.cpp similarity index 100% rename from zeiterfassung/replies/getbookingsreply.cpp rename to zeiterfassunglib/replies/getbookingsreply.cpp diff --git a/zeiterfassung/replies/getbookingsreply.h b/zeiterfassunglib/replies/getbookingsreply.h similarity index 82% rename from zeiterfassung/replies/getbookingsreply.h rename to zeiterfassunglib/replies/getbookingsreply.h index 459a426..e60c8d7 100644 --- a/zeiterfassung/replies/getbookingsreply.h +++ b/zeiterfassunglib/replies/getbookingsreply.h @@ -6,10 +6,11 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" #include "zeiterfassungapi.h" -class GetBookingsReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT GetBookingsReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/getpresencestatusreply.cpp b/zeiterfassunglib/replies/getpresencestatusreply.cpp similarity index 100% rename from zeiterfassung/replies/getpresencestatusreply.cpp rename to zeiterfassunglib/replies/getpresencestatusreply.cpp diff --git a/zeiterfassung/replies/getpresencestatusreply.h b/zeiterfassunglib/replies/getpresencestatusreply.h similarity index 82% rename from zeiterfassung/replies/getpresencestatusreply.h rename to zeiterfassunglib/replies/getpresencestatusreply.h index f75b230..730b2fb 100644 --- a/zeiterfassung/replies/getpresencestatusreply.h +++ b/zeiterfassunglib/replies/getpresencestatusreply.h @@ -5,10 +5,11 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" #include "zeiterfassungapi.h" -class GetPresenceStatusReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT GetPresenceStatusReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/getprojectsreply.cpp b/zeiterfassunglib/replies/getprojectsreply.cpp similarity index 100% rename from zeiterfassung/replies/getprojectsreply.cpp rename to zeiterfassunglib/replies/getprojectsreply.cpp diff --git a/zeiterfassung/replies/getprojectsreply.h b/zeiterfassunglib/replies/getprojectsreply.h similarity index 82% rename from zeiterfassung/replies/getprojectsreply.h rename to zeiterfassunglib/replies/getprojectsreply.h index faa4886..5aa5c23 100644 --- a/zeiterfassung/replies/getprojectsreply.h +++ b/zeiterfassunglib/replies/getprojectsreply.h @@ -6,10 +6,11 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" #include "zeiterfassungapi.h" -class GetProjectsReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT GetProjectsReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/gettimeassignmentsreply.cpp b/zeiterfassunglib/replies/gettimeassignmentsreply.cpp similarity index 100% rename from zeiterfassung/replies/gettimeassignmentsreply.cpp rename to zeiterfassunglib/replies/gettimeassignmentsreply.cpp diff --git a/zeiterfassung/replies/gettimeassignmentsreply.h b/zeiterfassunglib/replies/gettimeassignmentsreply.h similarity index 82% rename from zeiterfassung/replies/gettimeassignmentsreply.h rename to zeiterfassunglib/replies/gettimeassignmentsreply.h index 153064e..aa5355c 100644 --- a/zeiterfassung/replies/gettimeassignmentsreply.h +++ b/zeiterfassunglib/replies/gettimeassignmentsreply.h @@ -6,10 +6,11 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" #include "zeiterfassungapi.h" -class GetTimeAssignmentsReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT GetTimeAssignmentsReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/loginpagereply.cpp b/zeiterfassunglib/replies/loginpagereply.cpp similarity index 100% rename from zeiterfassung/replies/loginpagereply.cpp rename to zeiterfassunglib/replies/loginpagereply.cpp diff --git a/zeiterfassung/replies/loginpagereply.h b/zeiterfassunglib/replies/loginpagereply.h similarity index 76% rename from zeiterfassung/replies/loginpagereply.h rename to zeiterfassunglib/replies/loginpagereply.h index 203cb5d..daf0f44 100644 --- a/zeiterfassung/replies/loginpagereply.h +++ b/zeiterfassunglib/replies/loginpagereply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class LoginPageReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT LoginPageReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/loginreply.cpp b/zeiterfassunglib/replies/loginreply.cpp similarity index 100% rename from zeiterfassung/replies/loginreply.cpp rename to zeiterfassunglib/replies/loginreply.cpp diff --git a/zeiterfassung/replies/loginreply.h b/zeiterfassunglib/replies/loginreply.h similarity index 76% rename from zeiterfassung/replies/loginreply.h rename to zeiterfassunglib/replies/loginreply.h index bcf7dc1..2626d7a 100644 --- a/zeiterfassung/replies/loginreply.h +++ b/zeiterfassunglib/replies/loginreply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class LoginReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT LoginReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/updatebookingreply.cpp b/zeiterfassunglib/replies/updatebookingreply.cpp similarity index 100% rename from zeiterfassung/replies/updatebookingreply.cpp rename to zeiterfassunglib/replies/updatebookingreply.cpp diff --git a/zeiterfassung/replies/updatebookingreply.h b/zeiterfassunglib/replies/updatebookingreply.h similarity index 77% rename from zeiterfassung/replies/updatebookingreply.h rename to zeiterfassunglib/replies/updatebookingreply.h index f61e179..c948485 100644 --- a/zeiterfassung/replies/updatebookingreply.h +++ b/zeiterfassunglib/replies/updatebookingreply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class UpdateBookingReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT UpdateBookingReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/updatetimeassignmentreply.cpp b/zeiterfassunglib/replies/updatetimeassignmentreply.cpp similarity index 100% rename from zeiterfassung/replies/updatetimeassignmentreply.cpp rename to zeiterfassunglib/replies/updatetimeassignmentreply.cpp diff --git a/zeiterfassung/replies/updatetimeassignmentreply.h b/zeiterfassunglib/replies/updatetimeassignmentreply.h similarity index 79% rename from zeiterfassung/replies/updatetimeassignmentreply.h rename to zeiterfassunglib/replies/updatetimeassignmentreply.h index 84b4cca..ea9977a 100644 --- a/zeiterfassung/replies/updatetimeassignmentreply.h +++ b/zeiterfassunglib/replies/updatetimeassignmentreply.h @@ -5,9 +5,10 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -class UpdateTimeAssignmentReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT UpdateTimeAssignmentReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/userinforeply.cpp b/zeiterfassunglib/replies/userinforeply.cpp similarity index 100% rename from zeiterfassung/replies/userinforeply.cpp rename to zeiterfassunglib/replies/userinforeply.cpp diff --git a/zeiterfassung/replies/userinforeply.h b/zeiterfassunglib/replies/userinforeply.h similarity index 81% rename from zeiterfassung/replies/userinforeply.h rename to zeiterfassunglib/replies/userinforeply.h index aeee527..3b7fc09 100644 --- a/zeiterfassung/replies/userinforeply.h +++ b/zeiterfassunglib/replies/userinforeply.h @@ -5,10 +5,11 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" #include "zeiterfassungapi.h" -class UserInfoReply : public ZeiterfassungReply +class ZEITERFASSUNGLIBSHARED_EXPORT UserInfoReply : public ZeiterfassungReply { Q_OBJECT diff --git a/zeiterfassung/replies/zeiterfassungreply.cpp b/zeiterfassunglib/replies/zeiterfassungreply.cpp similarity index 100% rename from zeiterfassung/replies/zeiterfassungreply.cpp rename to zeiterfassunglib/replies/zeiterfassungreply.cpp diff --git a/zeiterfassung/replies/zeiterfassungreply.h b/zeiterfassunglib/replies/zeiterfassungreply.h similarity index 83% rename from zeiterfassung/replies/zeiterfassungreply.h rename to zeiterfassunglib/replies/zeiterfassungreply.h index 58f31f4..6ac1b68 100644 --- a/zeiterfassung/replies/zeiterfassungreply.h +++ b/zeiterfassunglib/replies/zeiterfassungreply.h @@ -3,9 +3,11 @@ #include +#include "zeiterfassunglib_global.h" + class ZeiterfassungApi; -class ZeiterfassungReply : public QObject +class ZEITERFASSUNGLIBSHARED_EXPORT ZeiterfassungReply : public QObject { Q_OBJECT diff --git a/zeiterfassunglib/translations/zeiterfassunglib_de.qm b/zeiterfassunglib/translations/zeiterfassunglib_de.qm new file mode 100644 index 0000000000000000000000000000000000000000..9dad8dffceb9623e88f8b96d9cd0caf25574c6fa GIT binary patch literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ literal 0 HcmV?d00001 diff --git a/zeiterfassunglib/translations/zeiterfassunglib_de.ts b/zeiterfassunglib/translations/zeiterfassunglib_de.ts new file mode 100644 index 0000000..7522e74 --- /dev/null +++ b/zeiterfassunglib/translations/zeiterfassunglib_de.ts @@ -0,0 +1,267 @@ + + + + + CreateBookingReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + CreateTimeAssignmentReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + DeleteBookingReply + + + Request error occured: %0 + + + + + DeleteTimeAssignmentReply + + + Request error occured: %0 + + + + + GetAuswertungReply + + + + Request error occured: %0 + + + + + GetBookingsReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an array! + + + + + GetPresenceStatusReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an array! + + + + + GetProjectsReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain elements! + + + + + elements is not an array! + + + + + GetTimeAssignmentsReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an array! + + + + + LoginPageReply + + + Request error occured: %0 + + + + + Could not find necessary keywords in login page! + + + + + LoginReply + + + Request error occured: %0 + + + + + Response did not contain a Location header. + + + + + Authentication failure. Please check username and password. + + + + + An unknown authentication failure occured. Redirected to: %0 + + + + + UpdateBookingReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + UpdateTimeAssignmentReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + UserInfoReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain evoAppsUser! + + + + + evoAppsUser is not an object! + + + + diff --git a/zeiterfassunglib/translations/zeiterfassunglib_en.qm b/zeiterfassunglib/translations/zeiterfassunglib_en.qm new file mode 100644 index 0000000000000000000000000000000000000000..9dad8dffceb9623e88f8b96d9cd0caf25574c6fa GIT binary patch literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ literal 0 HcmV?d00001 diff --git a/zeiterfassunglib/translations/zeiterfassunglib_en.ts b/zeiterfassunglib/translations/zeiterfassunglib_en.ts new file mode 100644 index 0000000..159cf9a --- /dev/null +++ b/zeiterfassunglib/translations/zeiterfassunglib_en.ts @@ -0,0 +1,267 @@ + + + + + CreateBookingReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + CreateTimeAssignmentReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + DeleteBookingReply + + + Request error occured: %0 + + + + + DeleteTimeAssignmentReply + + + Request error occured: %0 + + + + + GetAuswertungReply + + + + Request error occured: %0 + + + + + GetBookingsReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an array! + + + + + GetPresenceStatusReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an array! + + + + + GetProjectsReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain elements! + + + + + elements is not an array! + + + + + GetTimeAssignmentsReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an array! + + + + + LoginPageReply + + + Request error occured: %0 + + + + + Could not find necessary keywords in login page! + + + + + LoginReply + + + Request error occured: %0 + + + + + Response did not contain a Location header. + + + + + Authentication failure. Please check username and password. + + + + + An unknown authentication failure occured. Redirected to: %0 + + + + + UpdateBookingReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + UpdateTimeAssignmentReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain bookingNr! + + + + + UserInfoReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain evoAppsUser! + + + + + evoAppsUser is not an object! + + + + diff --git a/zeiterfassung/zeiterfassungapi.cpp b/zeiterfassunglib/zeiterfassungapi.cpp similarity index 100% rename from zeiterfassung/zeiterfassungapi.cpp rename to zeiterfassunglib/zeiterfassungapi.cpp diff --git a/zeiterfassung/zeiterfassungapi.h b/zeiterfassunglib/zeiterfassungapi.h similarity index 97% rename from zeiterfassung/zeiterfassungapi.h rename to zeiterfassunglib/zeiterfassungapi.h index 86bfa0c..19e04e2 100644 --- a/zeiterfassung/zeiterfassungapi.h +++ b/zeiterfassunglib/zeiterfassungapi.h @@ -8,6 +8,8 @@ #include #include +#include "zeiterfassunglib_global.h" + class QNetworkAccessManager; class LoginPageReply; @@ -25,7 +27,7 @@ class GetProjectsReply; class GetAuswertungReply; class GetPresenceStatusReply; -class ZeiterfassungApi : public QObject +class ZEITERFASSUNGLIBSHARED_EXPORT ZeiterfassungApi : public QObject { Q_OBJECT diff --git a/zeiterfassunglib/zeiterfassunglib.pro b/zeiterfassunglib/zeiterfassunglib.pro new file mode 100644 index 0000000..33dcaf4 --- /dev/null +++ b/zeiterfassunglib/zeiterfassunglib.pro @@ -0,0 +1,56 @@ +QT += network gui widgets + +TARGET = zeiterfassunglib +TEMPLATE = lib + +CONFIG += c++14 + +DESTDIR = $${OUT_PWD}/../lib + +DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT +DEFINES += ZEITERFASSUNGLIB_LIBRARY + +SOURCES += zeiterfassungapi.cpp \ + replies/createtimeassignmentreply.cpp \ + replies/updatebookingreply.cpp \ + replies/getbookingsreply.cpp \ + replies/getpresencestatusreply.cpp \ + replies/gettimeassignmentsreply.cpp \ + replies/deletetimeassignmentreply.cpp \ + replies/loginpagereply.cpp \ + replies/getprojectsreply.cpp \ + replies/getauswertungreply.cpp \ + replies/loginreply.cpp \ + replies/userinforeply.cpp \ + replies/zeiterfassungreply.cpp \ + replies/updatetimeassignmentreply.cpp \ + replies/deletebookingreply.cpp \ + replies/createbookingreply.cpp + +HEADERS += cpp14polyfills.h \ + zeiterfassunglib_global.h \ + zeiterfassungapi.h \ + replies/createtimeassignmentreply.h \ + replies/updatebookingreply.h \ + replies/getbookingsreply.h \ + replies/getpresencestatusreply.h \ + replies/gettimeassignmentsreply.h \ + replies/deletetimeassignmentreply.h \ + replies/loginpagereply.h \ + replies/getprojectsreply.h \ + replies/getauswertungreply.h \ + replies/loginreply.h \ + replies/userinforeply.h \ + replies/zeiterfassungreply.h \ + replies/updatetimeassignmentreply.h \ + replies/deletebookingreply.h \ + replies/createbookingreply.h + +TRANSLATIONS += \ + translations/zeiterfassunglib_en.ts \ + translations/zeiterfassunglib_de.ts + +# unix { +# target.path = /usr/lib +# INSTALLS += target +# } diff --git a/zeiterfassunglib/zeiterfassunglib_global.h b/zeiterfassunglib/zeiterfassunglib_global.h new file mode 100644 index 0000000..bfb9534 --- /dev/null +++ b/zeiterfassunglib/zeiterfassunglib_global.h @@ -0,0 +1,12 @@ +#ifndef ZEITERFASSUNGLIB_GLOBAL_H +#define ZEITERFASSUNGLIB_GLOBAL_H + +#include + +#if defined(ZEITERFASSUNGLIB_LIBRARY) +# define ZEITERFASSUNGLIBSHARED_EXPORT Q_DECL_EXPORT +#else +# define ZEITERFASSUNGLIBSHARED_EXPORT Q_DECL_IMPORT +#endif + +#endif // ZEITERFASSUNGLIB_GLOBAL_H -- 2.50.1 From a65a2cefff32e3228c8f3ba1cf579bda88b772ba Mon Sep 17 00:00:00 2001 From: Daniel Brunner <0xFEEDC0DE64@gmail.com> Date: Fri, 15 Dec 2017 19:54:25 +0100 Subject: [PATCH 04/15] Fixed qt plugins not being installed on win32 --- zeiterfassung/installs_win32.pri | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zeiterfassung/installs_win32.pri b/zeiterfassung/installs_win32.pri index f824ae9..9254151 100644 --- a/zeiterfassung/installs_win32.pri +++ b/zeiterfassung/installs_win32.pri @@ -14,6 +14,7 @@ INSTALLS += libinstall iconenginesinstall.path = $$DESTDIR/plugins/iconengines iconenginesinstall.files = $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon$${DEBUG_SIGN}.dll +INSTALLS += iconenginesinstall imageformatsinstall.path = $$DESTDIR/plugins/imageformats imageformatsinstall.files = $$[QT_INSTALL_PLUGINS]/imageformats/qdds$${DEBUG_SIGN}.dll \ @@ -26,6 +27,8 @@ imageformatsinstall.files = $$[QT_INSTALL_PLUGINS]/imageformats/qdds$${DEBUG_SIG $$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${DEBUG_SIGN}.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qwbmp$${DEBUG_SIGN}.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${DEBUG_SIGN}.dll +INSTALLS += imageformatsinstall platformsinstall.path = $$DESTDIR/plugins/platforms win32: platformsinstall.files = $$[QT_INSTALL_PLUGINS]/platforms/qwindows$${DEBUG_SIGN}.dll +INSTALLS += platformsinstall -- 2.50.1 From 147ce1aef60f09e6b4144256b22d9c7751101716 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Fri, 15 Dec 2017 20:04:31 +0100 Subject: [PATCH 05/15] Added plugin projects --- plugins/lunchmealplugin/lunchmealplugin.cpp | 6 ++++++ plugins/lunchmealplugin/lunchmealplugin.h | 17 +++++++++++++++++ plugins/lunchmealplugin/lunchmealplugin.pro | 21 +++++++++++++++++++++ plugins/plugins.pro | 5 +++++ plugins/presenceplugin/presenceplugin.cpp | 6 ++++++ plugins/presenceplugin/presenceplugin.h | 17 +++++++++++++++++ plugins/presenceplugin/presenceplugin.pro | 21 +++++++++++++++++++++ plugins/weatherplugin/weatherplugin.cpp | 6 ++++++ plugins/weatherplugin/weatherplugin.h | 17 +++++++++++++++++ plugins/weatherplugin/weatherplugin.pro | 21 +++++++++++++++++++++ zeiterfassung.pro | 4 +++- zeiterfassung/zeiterfassung.pro | 2 +- zeiterfassunglib/zeiterfassunglib.pro | 2 +- 13 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 plugins/lunchmealplugin/lunchmealplugin.cpp create mode 100644 plugins/lunchmealplugin/lunchmealplugin.h create mode 100644 plugins/lunchmealplugin/lunchmealplugin.pro create mode 100644 plugins/plugins.pro create mode 100644 plugins/presenceplugin/presenceplugin.cpp create mode 100644 plugins/presenceplugin/presenceplugin.h create mode 100644 plugins/presenceplugin/presenceplugin.pro create mode 100644 plugins/weatherplugin/weatherplugin.cpp create mode 100644 plugins/weatherplugin/weatherplugin.h create mode 100644 plugins/weatherplugin/weatherplugin.pro diff --git a/plugins/lunchmealplugin/lunchmealplugin.cpp b/plugins/lunchmealplugin/lunchmealplugin.cpp new file mode 100644 index 0000000..b07fbeb --- /dev/null +++ b/plugins/lunchmealplugin/lunchmealplugin.cpp @@ -0,0 +1,6 @@ +#include "lunchmealplugin.h" + +LunchMealPlugin::LunchMealPlugin(QObject *parent) : QObject(parent) +{ + +} diff --git a/plugins/lunchmealplugin/lunchmealplugin.h b/plugins/lunchmealplugin/lunchmealplugin.h new file mode 100644 index 0000000..3fe3055 --- /dev/null +++ b/plugins/lunchmealplugin/lunchmealplugin.h @@ -0,0 +1,17 @@ +#ifndef LUNCHMEALPLUGIN_H +#define LUNCHMEALPLUGIN_H + +#include + +class Q_DECL_EXPORT LunchMealPlugin : public QObject +{ + Q_OBJECT +public: + explicit LunchMealPlugin(QObject *parent = 0); + +signals: + +public slots: +}; + +#endif // LUNCHMEALPLUGIN_H diff --git a/plugins/lunchmealplugin/lunchmealplugin.pro b/plugins/lunchmealplugin/lunchmealplugin.pro new file mode 100644 index 0000000..306a80a --- /dev/null +++ b/plugins/lunchmealplugin/lunchmealplugin.pro @@ -0,0 +1,21 @@ +QT += core network gui widgets + +TARGET = lunchmealplugin +TEMPLATE = lib + +CONFIG += shared c++14 + +DESTDIR = $${OUT_PWD}/../../bin/plugins/zeiterfassung + +LIBS += -L$$OUT_PWD/../../lib -lzeiterfassunglib + +INCLUDEPATH += $$PWD/../zeiterfassunglib +DEPENDPATH += $$PWD/../zeiterfassunglib + +DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT + +HEADERS += \ + lunchmealplugin.h + +SOURCES += \ + lunchmealplugin.cpp diff --git a/plugins/plugins.pro b/plugins/plugins.pro new file mode 100644 index 0000000..5335e51 --- /dev/null +++ b/plugins/plugins.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs + +SUBDIRS += lunchmealplugin \ + presenceplugin \ + weatherplugin diff --git a/plugins/presenceplugin/presenceplugin.cpp b/plugins/presenceplugin/presenceplugin.cpp new file mode 100644 index 0000000..146fd65 --- /dev/null +++ b/plugins/presenceplugin/presenceplugin.cpp @@ -0,0 +1,6 @@ +#include "presenceplugin.h" + +PresencePlugin::PresencePlugin(QObject *parent) : QObject(parent) +{ + +} diff --git a/plugins/presenceplugin/presenceplugin.h b/plugins/presenceplugin/presenceplugin.h new file mode 100644 index 0000000..e8c14b2 --- /dev/null +++ b/plugins/presenceplugin/presenceplugin.h @@ -0,0 +1,17 @@ +#ifndef PRESENCEPLUGIN_H +#define PRESENCEPLUGIN_H + +#include + +class Q_DECL_EXPORT PresencePlugin : public QObject +{ + Q_OBJECT +public: + explicit PresencePlugin(QObject *parent = 0); + +signals: + +public slots: +}; + +#endif // PRESENCEPLUGIN_H diff --git a/plugins/presenceplugin/presenceplugin.pro b/plugins/presenceplugin/presenceplugin.pro new file mode 100644 index 0000000..a155df1 --- /dev/null +++ b/plugins/presenceplugin/presenceplugin.pro @@ -0,0 +1,21 @@ +QT += core network gui widgets + +TARGET = presenceplugin +TEMPLATE = lib + +CONFIG += shared c++14 + +DESTDIR = $${OUT_PWD}/../../bin/plugins/zeiterfassung + +LIBS += -L$$OUT_PWD/../../lib -lzeiterfassunglib + +INCLUDEPATH += $$PWD/../zeiterfassunglib +DEPENDPATH += $$PWD/../zeiterfassunglib + +DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT + +HEADERS += \ + presenceplugin.h + +SOURCES += \ + presenceplugin.cpp diff --git a/plugins/weatherplugin/weatherplugin.cpp b/plugins/weatherplugin/weatherplugin.cpp new file mode 100644 index 0000000..d9c5e95 --- /dev/null +++ b/plugins/weatherplugin/weatherplugin.cpp @@ -0,0 +1,6 @@ +#include "weatherplugin.h" + +WeatherPlugin::WeatherPlugin(QObject *parent) : QObject(parent) +{ + +} diff --git a/plugins/weatherplugin/weatherplugin.h b/plugins/weatherplugin/weatherplugin.h new file mode 100644 index 0000000..6420aba --- /dev/null +++ b/plugins/weatherplugin/weatherplugin.h @@ -0,0 +1,17 @@ +#ifndef WEATHERPLUGIN_H +#define WEATHERPLUGIN_H + +#include + +class Q_DECL_EXPORT WeatherPlugin : public QObject +{ + Q_OBJECT +public: + explicit WeatherPlugin(QObject *parent = 0); + +signals: + +public slots: +}; + +#endif // WEATHERPLUGIN_H diff --git a/plugins/weatherplugin/weatherplugin.pro b/plugins/weatherplugin/weatherplugin.pro new file mode 100644 index 0000000..5e7e7ad --- /dev/null +++ b/plugins/weatherplugin/weatherplugin.pro @@ -0,0 +1,21 @@ +QT += core network gui widgets + +TARGET = weatherplugin +TEMPLATE = lib + +CONFIG += shared c++14 + +DESTDIR = $${OUT_PWD}/../../bin/plugins/zeiterfassung + +LIBS += -L$$OUT_PWD/../../lib -lzeiterfassunglib + +INCLUDEPATH += $$PWD/../zeiterfassunglib +DEPENDPATH += $$PWD/../zeiterfassunglib + +DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT + +HEADERS += \ + weatherplugin.h + +SOURCES += \ + weatherplugin.cpp diff --git a/zeiterfassung.pro b/zeiterfassung.pro index 9c52032..337265b 100644 --- a/zeiterfassung.pro +++ b/zeiterfassung.pro @@ -1,6 +1,8 @@ TEMPLATE = subdirs -SUBDIRS += zeiterfassung \ +SUBDIRS += plugins \ + zeiterfassung \ zeiterfassunglib +plugins.depends += zeiterfassunglib zeiterfassung.depends += zeiterfassunglib diff --git a/zeiterfassung/zeiterfassung.pro b/zeiterfassung/zeiterfassung.pro index 671ba01..a3b6d96 100755 --- a/zeiterfassung/zeiterfassung.pro +++ b/zeiterfassung/zeiterfassung.pro @@ -1,4 +1,4 @@ -QT += network gui widgets uitools +QT += core network gui widgets uitools TARGET = zeiterfassung TEMPLATE = app diff --git a/zeiterfassunglib/zeiterfassunglib.pro b/zeiterfassunglib/zeiterfassunglib.pro index 33dcaf4..28013eb 100644 --- a/zeiterfassunglib/zeiterfassunglib.pro +++ b/zeiterfassunglib/zeiterfassunglib.pro @@ -1,4 +1,4 @@ -QT += network gui widgets +QT += core network gui widgets TARGET = zeiterfassunglib TEMPLATE = lib -- 2.50.1 From a05e70ef8c78de91a5ed6b37ec8596c392354a3c Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Fri, 15 Dec 2017 20:28:25 +0100 Subject: [PATCH 06/15] Implemented base class for all plugins --- plugins/lunchmealplugin/lunchmealplugin.cpp | 10 +++++++++- plugins/lunchmealplugin/lunchmealplugin.h | 12 ++++++++---- plugins/lunchmealplugin/lunchmealplugin.json | 0 plugins/lunchmealplugin/lunchmealplugin.pro | 12 ++++++------ plugins/presenceplugin/presenceplugin.cpp | 10 +++++++++- plugins/presenceplugin/presenceplugin.h | 12 ++++++++---- plugins/presenceplugin/presenceplugin.json | 0 plugins/presenceplugin/presenceplugin.pro | 12 ++++++------ plugins/weatherplugin/weatherplugin.cpp | 10 +++++++++- plugins/weatherplugin/weatherplugin.h | 12 ++++++++---- plugins/weatherplugin/weatherplugin.json | 0 plugins/weatherplugin/weatherplugin.pro | 12 ++++++------ zeiterfassunglib/zeiterfassunglib.pro | 2 ++ zeiterfassunglib/zeiterfassungplugin.cpp | 7 +++++++ zeiterfassunglib/zeiterfassungplugin.h | 18 ++++++++++++++++++ 15 files changed, 96 insertions(+), 33 deletions(-) create mode 100644 plugins/lunchmealplugin/lunchmealplugin.json create mode 100644 plugins/presenceplugin/presenceplugin.json create mode 100644 plugins/weatherplugin/weatherplugin.json create mode 100644 zeiterfassunglib/zeiterfassungplugin.cpp create mode 100644 zeiterfassunglib/zeiterfassungplugin.h diff --git a/plugins/lunchmealplugin/lunchmealplugin.cpp b/plugins/lunchmealplugin/lunchmealplugin.cpp index b07fbeb..3e8e278 100644 --- a/plugins/lunchmealplugin/lunchmealplugin.cpp +++ b/plugins/lunchmealplugin/lunchmealplugin.cpp @@ -1,6 +1,14 @@ #include "lunchmealplugin.h" -LunchMealPlugin::LunchMealPlugin(QObject *parent) : QObject(parent) +#include + +LunchMealPlugin::LunchMealPlugin(QObject *parent) : + ZeiterfassungPlugin(parent) { } + +void LunchMealPlugin::initialize() +{ + qDebug() << "called"; +} diff --git a/plugins/lunchmealplugin/lunchmealplugin.h b/plugins/lunchmealplugin/lunchmealplugin.h index 3fe3055..9befa20 100644 --- a/plugins/lunchmealplugin/lunchmealplugin.h +++ b/plugins/lunchmealplugin/lunchmealplugin.h @@ -3,15 +3,19 @@ #include -class Q_DECL_EXPORT LunchMealPlugin : public QObject +#include "zeiterfassungplugin.h" + +class Q_DECL_EXPORT LunchMealPlugin : public ZeiterfassungPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "dbsoftware.zeiterfassung.plugin/1.0" FILE "lunchmealplugin.json") + Q_INTERFACES(ZeiterfassungPlugin) + public: explicit LunchMealPlugin(QObject *parent = 0); -signals: - -public slots: + // ZeiterfassungPlugin interface + void initialize() Q_DECL_OVERRIDE; }; #endif // LUNCHMEALPLUGIN_H diff --git a/plugins/lunchmealplugin/lunchmealplugin.json b/plugins/lunchmealplugin/lunchmealplugin.json new file mode 100644 index 0000000..e69de29 diff --git a/plugins/lunchmealplugin/lunchmealplugin.pro b/plugins/lunchmealplugin/lunchmealplugin.pro index 306a80a..d0dd373 100644 --- a/plugins/lunchmealplugin/lunchmealplugin.pro +++ b/plugins/lunchmealplugin/lunchmealplugin.pro @@ -9,13 +9,13 @@ DESTDIR = $${OUT_PWD}/../../bin/plugins/zeiterfassung LIBS += -L$$OUT_PWD/../../lib -lzeiterfassunglib -INCLUDEPATH += $$PWD/../zeiterfassunglib -DEPENDPATH += $$PWD/../zeiterfassunglib +INCLUDEPATH += $$PWD/../../zeiterfassunglib +DEPENDPATH += $$PWD/../../zeiterfassunglib DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT -HEADERS += \ - lunchmealplugin.h +HEADERS += lunchmealplugin.h -SOURCES += \ - lunchmealplugin.cpp +SOURCES += lunchmealplugin.cpp + +OTHER_FILES += lunchmealplugin.json diff --git a/plugins/presenceplugin/presenceplugin.cpp b/plugins/presenceplugin/presenceplugin.cpp index 146fd65..d0a3f5f 100644 --- a/plugins/presenceplugin/presenceplugin.cpp +++ b/plugins/presenceplugin/presenceplugin.cpp @@ -1,6 +1,14 @@ #include "presenceplugin.h" -PresencePlugin::PresencePlugin(QObject *parent) : QObject(parent) +#include + +PresencePlugin::PresencePlugin(QObject *parent) : + ZeiterfassungPlugin(parent) { } + +void PresencePlugin::initialize() +{ + qDebug() << "called"; +} diff --git a/plugins/presenceplugin/presenceplugin.h b/plugins/presenceplugin/presenceplugin.h index e8c14b2..c90e0ea 100644 --- a/plugins/presenceplugin/presenceplugin.h +++ b/plugins/presenceplugin/presenceplugin.h @@ -3,15 +3,19 @@ #include -class Q_DECL_EXPORT PresencePlugin : public QObject +#include "zeiterfassungplugin.h" + +class Q_DECL_EXPORT PresencePlugin : public ZeiterfassungPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "dbsoftware.zeiterfassung.plugin/1.0" FILE "presenceplugin.json") + Q_INTERFACES(ZeiterfassungPlugin) + public: explicit PresencePlugin(QObject *parent = 0); -signals: - -public slots: + // ZeiterfassungPlugin interface + void initialize() Q_DECL_OVERRIDE; }; #endif // PRESENCEPLUGIN_H diff --git a/plugins/presenceplugin/presenceplugin.json b/plugins/presenceplugin/presenceplugin.json new file mode 100644 index 0000000..e69de29 diff --git a/plugins/presenceplugin/presenceplugin.pro b/plugins/presenceplugin/presenceplugin.pro index a155df1..9ad4afb 100644 --- a/plugins/presenceplugin/presenceplugin.pro +++ b/plugins/presenceplugin/presenceplugin.pro @@ -9,13 +9,13 @@ DESTDIR = $${OUT_PWD}/../../bin/plugins/zeiterfassung LIBS += -L$$OUT_PWD/../../lib -lzeiterfassunglib -INCLUDEPATH += $$PWD/../zeiterfassunglib -DEPENDPATH += $$PWD/../zeiterfassunglib +INCLUDEPATH += $$PWD/../../zeiterfassunglib +DEPENDPATH += $$PWD/../../zeiterfassunglib DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT -HEADERS += \ - presenceplugin.h +HEADERS += presenceplugin.h -SOURCES += \ - presenceplugin.cpp +SOURCES += presenceplugin.cpp + +OTHER_FILES += presenceplugin.json diff --git a/plugins/weatherplugin/weatherplugin.cpp b/plugins/weatherplugin/weatherplugin.cpp index d9c5e95..1fdfc72 100644 --- a/plugins/weatherplugin/weatherplugin.cpp +++ b/plugins/weatherplugin/weatherplugin.cpp @@ -1,6 +1,14 @@ #include "weatherplugin.h" -WeatherPlugin::WeatherPlugin(QObject *parent) : QObject(parent) +#include + +WeatherPlugin::WeatherPlugin(QObject *parent) : + ZeiterfassungPlugin(parent) { } + +void WeatherPlugin::initialize() +{ + qDebug() << "called"; +} diff --git a/plugins/weatherplugin/weatherplugin.h b/plugins/weatherplugin/weatherplugin.h index 6420aba..933fdbd 100644 --- a/plugins/weatherplugin/weatherplugin.h +++ b/plugins/weatherplugin/weatherplugin.h @@ -3,15 +3,19 @@ #include -class Q_DECL_EXPORT WeatherPlugin : public QObject +#include "zeiterfassungplugin.h" + +class Q_DECL_EXPORT WeatherPlugin : public ZeiterfassungPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "dbsoftware.zeiterfassung.plugin/1.0" FILE "weatherplugin.json") + Q_INTERFACES(ZeiterfassungPlugin) + public: explicit WeatherPlugin(QObject *parent = 0); -signals: - -public slots: + // ZeiterfassungPlugin interface + void initialize() Q_DECL_OVERRIDE; }; #endif // WEATHERPLUGIN_H diff --git a/plugins/weatherplugin/weatherplugin.json b/plugins/weatherplugin/weatherplugin.json new file mode 100644 index 0000000..e69de29 diff --git a/plugins/weatherplugin/weatherplugin.pro b/plugins/weatherplugin/weatherplugin.pro index 5e7e7ad..b67c6dd 100644 --- a/plugins/weatherplugin/weatherplugin.pro +++ b/plugins/weatherplugin/weatherplugin.pro @@ -9,13 +9,13 @@ DESTDIR = $${OUT_PWD}/../../bin/plugins/zeiterfassung LIBS += -L$$OUT_PWD/../../lib -lzeiterfassunglib -INCLUDEPATH += $$PWD/../zeiterfassunglib -DEPENDPATH += $$PWD/../zeiterfassunglib +INCLUDEPATH += $$PWD/../../zeiterfassunglib +DEPENDPATH += $$PWD/../../zeiterfassunglib DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT -HEADERS += \ - weatherplugin.h +HEADERS += weatherplugin.h -SOURCES += \ - weatherplugin.cpp +SOURCES += weatherplugin.cpp + +OTHER_FILES += weatherplugin.json diff --git a/zeiterfassunglib/zeiterfassunglib.pro b/zeiterfassunglib/zeiterfassunglib.pro index 28013eb..994e871 100644 --- a/zeiterfassunglib/zeiterfassunglib.pro +++ b/zeiterfassunglib/zeiterfassunglib.pro @@ -11,6 +11,7 @@ DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSA DEFINES += ZEITERFASSUNGLIB_LIBRARY SOURCES += zeiterfassungapi.cpp \ + zeiterfassungplugin.cpp \ replies/createtimeassignmentreply.cpp \ replies/updatebookingreply.cpp \ replies/getbookingsreply.cpp \ @@ -30,6 +31,7 @@ SOURCES += zeiterfassungapi.cpp \ HEADERS += cpp14polyfills.h \ zeiterfassunglib_global.h \ zeiterfassungapi.h \ + zeiterfassungplugin.h \ replies/createtimeassignmentreply.h \ replies/updatebookingreply.h \ replies/getbookingsreply.h \ diff --git a/zeiterfassunglib/zeiterfassungplugin.cpp b/zeiterfassunglib/zeiterfassungplugin.cpp new file mode 100644 index 0000000..4436d93 --- /dev/null +++ b/zeiterfassunglib/zeiterfassungplugin.cpp @@ -0,0 +1,7 @@ +#include "zeiterfassungplugin.h" + +ZeiterfassungPlugin::ZeiterfassungPlugin(QObject *parent) : + QObject(parent) +{ + +} diff --git a/zeiterfassunglib/zeiterfassungplugin.h b/zeiterfassunglib/zeiterfassungplugin.h new file mode 100644 index 0000000..f437480 --- /dev/null +++ b/zeiterfassunglib/zeiterfassungplugin.h @@ -0,0 +1,18 @@ +#ifndef ZEITERFASSUNGPLUGIN_H +#define ZEITERFASSUNGPLUGIN_H + +#include + +class ZeiterfassungPlugin : public QObject +{ + Q_OBJECT + +public: + explicit ZeiterfassungPlugin(QObject *parent = 0); + + virtual void initialize() = 0; +}; + +Q_DECLARE_INTERFACE(ZeiterfassungPlugin, "dbsoftware.zeiterfassung.plugin/1.0") + +#endif // ZEITERFASSUNGPLUGIN_H -- 2.50.1 From 3109a1869fec055569516179ffc6d3d3e983dbaa Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Fri, 15 Dec 2017 21:05:50 +0100 Subject: [PATCH 07/15] Implemented plugin loading --- zeiterfassung/main.cpp | 53 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/zeiterfassung/main.cpp b/zeiterfassung/main.cpp index b823c50..1f2fa27 100755 --- a/zeiterfassung/main.cpp +++ b/zeiterfassung/main.cpp @@ -12,12 +12,15 @@ #include #include #include +#include +#include #include #include "zeiterfassungsettings.h" #include "dialogs/languageselectiondialog.h" #include "zeiterfassungapi.h" #include "dialogs/authenticationdialog.h" +#include "zeiterfassungplugin.h" #include "mainwindow.h" #include "replies/loginpagereply.h" #include "replies/loginreply.h" @@ -271,9 +274,55 @@ bool loadUserInfo(QSplashScreen &splashScreen, ZeiterfassungApi &erfassung, Zeit return true; } +bool loadPlugins(QSplashScreen &splashScreen) +{ + auto ok = true; + + QDir dir( + QDir( + QDir( + QCoreApplication::applicationDirPath() + ).absoluteFilePath(QStringLiteral("plugins")) + ).absoluteFilePath(QStringLiteral("zeiterfassung")) + ); + + for(const auto &fileInfo : dir.entryInfoList(QDir::Files)) + { + if(fileInfo.isSymLink()) + continue; // to skip unix so symlinks + + if(!QLibrary::isLibrary(fileInfo.filePath())) + continue; // to skip windows junk files + + QPluginLoader loader(fileInfo.filePath()); + if(!loader.load()) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not load plugin %0!"), + QCoreApplication::translate("main", "Could not load plugin %0!").arg(fileInfo.fileName()) % + "\n\n" % loader.errorString()); + ok = false; + continue; + } + + auto plugin = qobject_cast(loader.instance()); + + if(!plugin) + { + QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Plugin not valid %0!"), + QCoreApplication::translate("main", "Plugin not valid %0!").arg(fileInfo.fileName()) % + "\n\n" % loader.errorString()); + ok = false; + continue; + } + + plugin->initialize(); + } + + return ok; +} + int main(int argc, char *argv[]) { - QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QApplication app(argc, argv); qSetMessagePattern(QStringLiteral("%{time dd.MM.yyyy HH:mm:ss.zzz} " @@ -324,6 +373,8 @@ int main(int argc, char *argv[]) if(!loadUserInfo(splashScreen, erfassung, userInfo)) return -6; + loadPlugins(splashScreen); + MainWindow mainWindow(settings, erfassung, userInfo, stripFactory); splashScreen.finish(&mainWindow); mainWindow.show(); -- 2.50.1 From 06695da344deafae4542a3623ac554a47aa9fc2b Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Sat, 16 Dec 2017 11:01:04 +0100 Subject: [PATCH 08/15] Moved most of the code into lib for later usage in plugins --- zeiterfassung/main.cpp | 2 +- .../translations/zeiterfassung_de.ts | 869 +----------------- .../translations/zeiterfassung_en.ts | 869 +----------------- zeiterfassung/zeiterfassung.pro | 52 +- .../dialogs/aboutmedialog.cpp | 0 .../dialogs/aboutmedialog.h | 0 .../dialogs/aboutmedialog.ui | 0 .../dialogs/authenticationdialog.cpp | 0 .../dialogs/authenticationdialog.h | 0 .../dialogs/authenticationdialog.ui | 2 +- .../dialogs/bookingdialog.cpp | 0 .../dialogs/bookingdialog.h | 0 .../dialogs/bookingdialog.ui | 0 .../dialogs/languageselectiondialog.cpp | 0 .../dialogs/languageselectiondialog.h | 0 .../dialogs/languageselectiondialog.ui | 0 .../dialogs/settingsdialog.cpp | 0 .../dialogs/settingsdialog.h | 0 .../dialogs/settingsdialog.ui | 0 .../dialogs/timeassignmentdialog.cpp | 0 .../dialogs/timeassignmentdialog.h | 0 .../dialogs/timeassignmentdialog.ui | 0 .../dialogs/updatedialog.cpp | 0 .../dialogs/updatedialog.h | 0 .../dialogs/updatedialog.ui | 0 .../images/about.png | Bin .../images/auswertung.png | Bin .../images/authentication.png | Bin .../images/help.png | Bin .../images/icon.png | Bin .../images/next.png | Bin .../images/now.png | Bin .../images/previous.png | Bin .../images/quit.png | Bin .../images/refresh.png | Bin .../images/settings.png | Bin .../images/splash.png | Bin .../images/today.png | Bin .../images/user.png | Bin .../mainwindow.cpp | 4 +- .../mainwindow.h | 0 .../mainwindow.ui | 24 +- .../models/bookingsmodel.cpp | 0 .../models/bookingsmodel.h | 0 .../models/timeassignmentsmodel.cpp | 0 .../models/timeassignmentsmodel.h | 0 .../resources.qrc | 2 +- .../stripfactory.cpp | 0 .../stripfactory.h | 0 .../stripswidget.cpp | 0 .../stripswidget.h | 0 .../timeutils.cpp | 0 .../timeutils.h | 0 .../translations/zeiterfassunglib_de.ts | 795 ++++++++++++++++ .../translations/zeiterfassunglib_en.ts | 795 ++++++++++++++++ zeiterfassunglib/zeiterfassunglib.pro | 86 +- .../zeiterfassungsettings.cpp | 0 .../zeiterfassungsettings.h | 0 58 files changed, 1762 insertions(+), 1738 deletions(-) rename {zeiterfassung => zeiterfassunglib}/dialogs/aboutmedialog.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/aboutmedialog.h (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/aboutmedialog.ui (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/authenticationdialog.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/authenticationdialog.h (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/authenticationdialog.ui (97%) rename {zeiterfassung => zeiterfassunglib}/dialogs/bookingdialog.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/bookingdialog.h (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/bookingdialog.ui (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/languageselectiondialog.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/languageselectiondialog.h (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/languageselectiondialog.ui (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/settingsdialog.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/settingsdialog.h (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/settingsdialog.ui (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/timeassignmentdialog.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/timeassignmentdialog.h (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/timeassignmentdialog.ui (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/updatedialog.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/updatedialog.h (100%) rename {zeiterfassung => zeiterfassunglib}/dialogs/updatedialog.ui (100%) rename {zeiterfassung => zeiterfassunglib}/images/about.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/auswertung.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/authentication.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/help.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/icon.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/next.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/now.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/previous.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/quit.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/refresh.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/settings.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/splash.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/today.png (100%) rename {zeiterfassung => zeiterfassunglib}/images/user.png (100%) rename {zeiterfassung => zeiterfassunglib}/mainwindow.cpp (99%) rename {zeiterfassung => zeiterfassunglib}/mainwindow.h (100%) rename {zeiterfassung => zeiterfassunglib}/mainwindow.ui (88%) rename {zeiterfassung => zeiterfassunglib}/models/bookingsmodel.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/models/bookingsmodel.h (100%) rename {zeiterfassung => zeiterfassunglib}/models/timeassignmentsmodel.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/models/timeassignmentsmodel.h (100%) rename {zeiterfassung => zeiterfassunglib}/resources.qrc (93%) rename {zeiterfassung => zeiterfassunglib}/stripfactory.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/stripfactory.h (100%) rename {zeiterfassung => zeiterfassunglib}/stripswidget.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/stripswidget.h (100%) rename {zeiterfassung => zeiterfassunglib}/timeutils.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/timeutils.h (100%) rename {zeiterfassung => zeiterfassunglib}/zeiterfassungsettings.cpp (100%) rename {zeiterfassung => zeiterfassunglib}/zeiterfassungsettings.h (100%) diff --git a/zeiterfassung/main.cpp b/zeiterfassung/main.cpp index 1f2fa27..b9a2965 100755 --- a/zeiterfassung/main.cpp +++ b/zeiterfassung/main.cpp @@ -341,7 +341,7 @@ int main(int argc, char *argv[]) QCoreApplication::setApplicationName(QStringLiteral("zeiterfassung")); QCoreApplication::setApplicationVersion(QStringLiteral("1.3.1")); - QSplashScreen splashScreen(QPixmap(QStringLiteral(":/zeiterfassung/images/splash.png"))); + QSplashScreen splashScreen(QPixmap(QStringLiteral(":/zeiterfassunglib/images/splash.png"))); splashScreen.showMessage(QCoreApplication::translate("main", "Loading settings...")); splashScreen.show(); diff --git a/zeiterfassung/translations/zeiterfassung_de.ts b/zeiterfassung/translations/zeiterfassung_de.ts index 84ab4c3..40cbf92 100644 --- a/zeiterfassung/translations/zeiterfassung_de.ts +++ b/zeiterfassung/translations/zeiterfassung_de.ts @@ -1,801 +1,6 @@ - - AboutMeDialog - - - - About me - Über mich - - - - User-ID: - Benutzer-ID: - - - - E-Mail: - E-Mail: - - - - Long username: - Langer Benutzername: - - - - Text: - Text: - - - - Username: - Benutzername: - - - - AuthenticationDialog - - - - Authentication - Authentifizierung - - - - Username: - Benutzername: - - - - Password: - Passwort: - - - - BookingDialog - - - - Booking - Buchung - - - - Time: - Zeit: - - - - Timespan: - Zeitspanne: - - - - Type: - Typ: - - - - Text: - Text: - - - - BookingsModel - - - ID - ID - - - - Time - Zeit - - - - Timespan - Zeitspanne - - - - Type - Typ - - - - Text - Text - - - - LanguageSelectionDialog - - - - Language selection - Sprachauswahl - - - - Please select a language: - Bitte wählen Sie eine Sprache: - - - - Language: - Sprache: - - - - English - Englisch - - - - German - Deutsch - - - - MainWindow - - - Previous day - Vorheriger Tag - - - - Next day - Nächster Tag - - - - Now - Jetzt - - - - - - Start - Kommen - - - - End - Gehen - - - - Optimized view - Optimierte Anzeige - - - - Advanced view - Erweiterte Anzeige - - - - Bookings - Buchungen - - - - Time assignments - Kontierungen - - - - &File - &Datei - - - - &About - &Über - - - - &View - &Ansicht - - - - &Tools - &Werkzeuge - - - - &Quit - &Beenden - - - - About &Me - Über &mich - - - - About &zeiterfassung - Über &zeiterfassung - - - - About &Qt - Über &Qt - - - - &Today - &Heute - - - - &Refresh everything - Alles &neu laden - - - - &Auswertung - - - - - &Settings - &Einstellungen - - - - Help - Hilfe - - - - Zeiterfassung - %0 (%1) - Zeiterfassung - %0 (%1) - - - - - Could not open auswertung! - - - - - Could not open default PDF viewer! - Konnte den PDF-Anzeiger nicht öffnen! - - - - Subproject - Subprojekt - - - - Workpackage - Arbeitspaket - - - - Text - Text - - - - - - - %0: %1 - %0: %1 - - - - - - - ??? - ??? - - - - - Balance - Saldo - - - - - Holidays - Urlaubstage - - - - - Could not load bookings! - Konnte Buchungen nicht laden! - - - - Could not load Auswertung! - - - - - %0h - %0h - - - - Could not delete booking! - Konnte Buchung nicht löschen! - - - - Edit booking - Buchung bearbeiten - - - - Delete booking - Buchung löschen - - - - Could not edit booking! - Konnte Buchung nicht bearbeiten! - - - - Create booking - Buchung erstellen - - - - - n/a - n/v - - - - Refresh bookings - Buchungen aktualisieren - - - - - - Could not create booking! - Konnte Buchung nicht erstellen! - - - - Do you really want to delete the booking? - Möchten Sie die Buchung wirklich löschen? - - - - Refresh time assignments - Kontierungen aktualisieren - - - - Edit time assignment - Kontierung bearbeiten - - - - Delete time assignment - Kontierung löschen - - - - - - Could not edit time assignment! - Konnte Kontierung nicht bearbeiten! - - - - Do you really want to delete the time assignment? - Möchten Sie die Kontierung wirklich löschen? - - - - Could not delete time assignment! - Konnte Kontierung nicht löschen! - - - - - %0 (%1) - %0 (%1) - - - - Create time assignment - Kontierung erstellen - - - - - Could not create time assignment! - Konnte Kontierung nicht erstellen! - - - - - Switch - Wechseln - - - - SettingsDialog - - - - Settings - Einstellungen - - - - Language: - Sprache: - - - - Theme: - Aussehen: - - - - English - Englisch - - - - German - Deutsch - - - - - - Invalid settings! - Ungültige Einstellungen! - - - - Unknown language! - Unbekannte Sprache! - - - - Default - Standard - - - - Unknown theme! - Unbekanntes Aussehen! - - - - Please fill all options with valid values! - Bitte füllen Sie alle Felder mit gültigen Werten! - - - - - Could not load theme! - Konnte Aussehen nicht laden! - - - - Theme file does not exist! - Aussehen-Datei existiert nicht! - - - - Restart required! - Neustart erforderlich! - - - - To apply the new settings a restart is required! - Um die neuen Einstellungen zu übernehmen, ist ein Neustart erforderlich! - - - - StripsWidget - - - Loading... - Lade... - - - - Missing booking! - Kontierung fehlend! - - - - Expected start booking, instead got type %0 -Booking ID: %1 - - - - - - %0: %1 - %0: %1 - - - - Break - Pause - - - - - - %0h - %0h - - - - - - - - HH:mm - HH:mm - - - - Missing time assignment! - Kontierung fehlend! - - - - - - Expected %0 but received %1 in time assignment. -Time assignment ID: %2 - - - - - - - - - - - - - HH:mm:ss - HH:mm:ss - - - - - There is another booking after an unfinished time assignment. -Booking ID: %0 -Time assignment ID: %1 - - - - - - - There is another time assignment after an unfinished time assignment. -Time assignment ID: %0 -Time assignment ID: %1 - - - - - The last time assignment is finished without end booking -Time assignment ID: %0 - - - - - Expected end booking, instead got type %0 -Booking ID: %1 - - - - - Missing time assignment! Missing: %0 - Kontierung fehlend! %0 nicht kontiert - - - - Assigned time - Kontierte Zeit - - - - dd.MM.yyyy - dd.MM.yyyy - - - - %0 (%1) - %0 (%1) - - - - Time assignment time longer than booking time! -Time assignment: %0 -Booking: %1 - - - - - Strip rendering aborted due error. -Your bookings and time assignments for this day are in an illegal state! - - - - - Monday - Montag - - - - Tuesday - Dienstag - - - - Wednesday - Mittwoch - - - - Thursday - Donnerstag - - - - Friday - Freitag - - - - Saturday - Samstag - - - - Sunday - Sonntag - - - - Invalid - Ungültig - - - - Open - Offen - - - - TimeAssignmentDialog - - - - Time assignment - Kontierung - - - - Time: - Zeit: - - - - Timespan: - Zeitspanne: - - - - Project: - Projekt: - - - - Subproject: - Subprojekt: - - - - Workpackage: - Arbeitspaket: - - - - Text: - Text: - - - - - %0 (%1) - %0 (%1) - - - - TimeAssignmentsModel - - - ID - ID - - - - Time - Zeit - - - - Timespan - Zeitspanne - - - - Project - Projekt - - - - Subproject - Subprojekt - - - - Workpackage - Arbeitspaket - - - - Text - Text - - - - UpdateDialog - - - - New update available! - Neues Update verfügbar! - - - - There is a new release available to download! - Es ist ein neues Update verfügbar zum Download! - - - - Dont show today anymore - Heute nicht mehr anzeigen - - - - Could not open default webbrowser! - Konnte den Standard-Browser nicht öffnen! - - bookingEndStrip @@ -815,101 +20,113 @@ Your bookings and time assignments for this day are in an illegal state! main - + Loading settings... Lade Einstellungen... - + Loading translations... Lade Übersetzungen... - - + + Invalid language selection! Ungültige Sprachauswahl! - + You did not select a valid language! Sie haben keine gültige Sprachauswahl getroffen! - + Loading theme... Lade Aussehen... - - - - + + + + Could not load theme! Konnte Aussehen nicht laden! - + Theme file does not exist! Aussehen-Datei existiert nicht! - + Loading login page... Lade Login-Seite... - - + + Could not access Zeiterfassung! Konnte Zeiterfassung nicht erreichen! - + Base url Basis URL - + Please enter the base url to the Zeiterfassung: Bitte geben Sie die Basis URL zur Zeiterfassung ein: - + Authenticating... Authentifiziere... - - + + Could not authenticate with Zeiterfassung! Konnte nicht mit Zeiterfassung authentifizieren! - + Getting user information... Hole Benutzer Information... - - + + Could not get user information! Konnte Benutzer Information nicht holen! - + + + Could not load plugin %0! + Konnte Plugin %0 nicht laden! + + + + + Plugin not valid %0! + Plugin %0 nicht gültig! + + + Loading strip layouts... Lade Streifenlayouts... - - - - - - - - + + + + + + + + Could not load strips! Konnte Streifenlayouts nicht laden! diff --git a/zeiterfassung/translations/zeiterfassung_en.ts b/zeiterfassung/translations/zeiterfassung_en.ts index 25b2183..332fdf7 100644 --- a/zeiterfassung/translations/zeiterfassung_en.ts +++ b/zeiterfassung/translations/zeiterfassung_en.ts @@ -1,801 +1,6 @@ - - AboutMeDialog - - - - About me - - - - - User-ID: - - - - - E-Mail: - - - - - Long username: - - - - - Text: - - - - - Username: - - - - - AuthenticationDialog - - - - Authentication - - - - - Username: - - - - - Password: - - - - - BookingDialog - - - - Booking - - - - - Time: - - - - - Timespan: - - - - - Type: - - - - - Text: - - - - - BookingsModel - - - ID - - - - - Time - - - - - Timespan - - - - - Type - - - - - Text - - - - - LanguageSelectionDialog - - - - Language selection - - - - - Please select a language: - - - - - Language: - - - - - English - - - - - German - - - - - MainWindow - - - Previous day - - - - - Next day - - - - - Now - - - - - - - Start - - - - - End - - - - - Optimized view - - - - - Advanced view - - - - - Bookings - - - - - Time assignments - - - - - &File - - - - - &About - - - - - &View - - - - - &Tools - - - - - &Quit - - - - - About &Me - - - - - About &zeiterfassung - - - - - About &Qt - - - - - &Today - - - - - &Refresh everything - - - - - &Auswertung - - - - - &Settings - - - - - Help - - - - - Zeiterfassung - %0 (%1) - - - - - - Could not open auswertung! - - - - - Could not open default PDF viewer! - - - - - Subproject - - - - - Workpackage - - - - - Text - - - - - - - - %0: %1 - - - - - - - - ??? - - - - - - Balance - - - - - - Holidays - - - - - - Could not load bookings! - - - - - Could not load Auswertung! - - - - - %0h - - - - - Could not delete booking! - - - - - Edit booking - - - - - Delete booking - - - - - Could not edit booking! - - - - - Create booking - - - - - - n/a - - - - - Refresh bookings - - - - - - - Could not create booking! - - - - - Do you really want to delete the booking? - - - - - Refresh time assignments - - - - - Edit time assignment - - - - - Delete time assignment - - - - - - - Could not edit time assignment! - - - - - Do you really want to delete the time assignment? - - - - - Could not delete time assignment! - - - - - - %0 (%1) - - - - - Create time assignment - - - - - - Could not create time assignment! - - - - - - Switch - - - - - SettingsDialog - - - - Settings - - - - - Language: - - - - - Theme: - - - - - English - - - - - German - - - - - - - Invalid settings! - - - - - Unknown language! - - - - - Default - - - - - Unknown theme! - - - - - Please fill all options with valid values! - - - - - - Could not load theme! - - - - - Theme file does not exist! - - - - - Restart required! - - - - - To apply the new settings a restart is required! - - - - - StripsWidget - - - Loading... - - - - - Missing booking! - - - - - Expected start booking, instead got type %0 -Booking ID: %1 - - - - - - %0: %1 - - - - - Break - - - - - - - %0h - - - - - - - - - HH:mm - - - - - Missing time assignment! - - - - - - - Expected %0 but received %1 in time assignment. -Time assignment ID: %2 - - - - - - - - - - - - - HH:mm:ss - - - - - - There is another booking after an unfinished time assignment. -Booking ID: %0 -Time assignment ID: %1 - - - - - - - There is another time assignment after an unfinished time assignment. -Time assignment ID: %0 -Time assignment ID: %1 - - - - - The last time assignment is finished without end booking -Time assignment ID: %0 - - - - - Expected end booking, instead got type %0 -Booking ID: %1 - - - - - Missing time assignment! Missing: %0 - - - - - Assigned time - - - - - dd.MM.yyyy - - - - - %0 (%1) - - - - - Time assignment time longer than booking time! -Time assignment: %0 -Booking: %1 - - - - - Strip rendering aborted due error. -Your bookings and time assignments for this day are in an illegal state! - - - - - Monday - - - - - Tuesday - - - - - Wednesday - - - - - Thursday - - - - - Friday - - - - - Saturday - - - - - Sunday - - - - - Invalid - - - - - Open - - - - - TimeAssignmentDialog - - - - Time assignment - - - - - Time: - - - - - Timespan: - - - - - Project: - - - - - Subproject: - - - - - Workpackage: - - - - - Text: - - - - - - %0 (%1) - - - - - TimeAssignmentsModel - - - ID - - - - - Time - - - - - Timespan - - - - - Project - - - - - Subproject - - - - - Workpackage - - - - - Text - - - - - UpdateDialog - - - - New update available! - - - - - There is a new release available to download! - - - - - Dont show today anymore - - - - - Could not open default webbrowser! - - - bookingEndStrip @@ -815,101 +20,113 @@ Your bookings and time assignments for this day are in an illegal state! main - + Loading settings... - + Loading translations... - - + + Invalid language selection! - + You did not select a valid language! - + Loading theme... - - - - + + + + Could not load theme! - + Theme file does not exist! - + Loading login page... - - + + Could not access Zeiterfassung! - + Base url - + Please enter the base url to the Zeiterfassung: - + Authenticating... - - + + Could not authenticate with Zeiterfassung! - + Getting user information... - - + + Could not get user information! - + + + Could not load plugin %0! + + + + + + Plugin not valid %0! + + + + Loading strip layouts... - - - - - - - - + + + + + + + + Could not load strips! diff --git a/zeiterfassung/zeiterfassung.pro b/zeiterfassung/zeiterfassung.pro index a3b6d96..6afd9cb 100755 --- a/zeiterfassung/zeiterfassung.pro +++ b/zeiterfassung/zeiterfassung.pro @@ -1,4 +1,4 @@ -QT += core network gui widgets uitools +QT += core network gui widgets TARGET = zeiterfassung TEMPLATE = app @@ -17,54 +17,16 @@ DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSA RC_ICONS = icon.ico -SOURCES += main.cpp \ - mainwindow.cpp \ - dialogs/aboutmedialog.cpp \ - dialogs/authenticationdialog.cpp \ - zeiterfassungsettings.cpp \ - dialogs/settingsdialog.cpp \ - dialogs/languageselectiondialog.cpp \ - dialogs/timeassignmentdialog.cpp \ - models/timeassignmentsmodel.cpp \ - dialogs/bookingdialog.cpp \ - models/bookingsmodel.cpp \ - dialogs/updatedialog.cpp \ - stripswidget.cpp \ - timeutils.cpp \ - stripfactory.cpp +SOURCES += main.cpp -HEADERS += \ - mainwindow.h \ - dialogs/aboutmedialog.h \ - dialogs/authenticationdialog.h \ - zeiterfassungsettings.h \ - dialogs/settingsdialog.h \ - dialogs/languageselectiondialog.h \ - dialogs/timeassignmentdialog.h \ - models/timeassignmentsmodel.h \ - dialogs/bookingdialog.h \ - models/bookingsmodel.h \ - dialogs/updatedialog.h \ - stripswidget.h \ - timeutils.h \ - stripfactory.h +HEADERS += -FORMS += \ - mainwindow.ui \ - dialogs/aboutmedialog.ui \ - dialogs/authenticationdialog.ui \ - dialogs/settingsdialog.ui \ - dialogs/languageselectiondialog.ui \ - dialogs/timeassignmentdialog.ui \ - dialogs/bookingdialog.ui \ - dialogs/updatedialog.ui +FORMS += -RESOURCES += \ - resources.qrc +RESOURCES += -TRANSLATIONS += \ - translations/zeiterfassung_en.ts \ - translations/zeiterfassung_de.ts +TRANSLATIONS += translations/zeiterfassung_en.ts \ + translations/zeiterfassung_de.ts include(installs.pri) unix: include(installs_unix.pri) diff --git a/zeiterfassung/dialogs/aboutmedialog.cpp b/zeiterfassunglib/dialogs/aboutmedialog.cpp similarity index 100% rename from zeiterfassung/dialogs/aboutmedialog.cpp rename to zeiterfassunglib/dialogs/aboutmedialog.cpp diff --git a/zeiterfassung/dialogs/aboutmedialog.h b/zeiterfassunglib/dialogs/aboutmedialog.h similarity index 100% rename from zeiterfassung/dialogs/aboutmedialog.h rename to zeiterfassunglib/dialogs/aboutmedialog.h diff --git a/zeiterfassung/dialogs/aboutmedialog.ui b/zeiterfassunglib/dialogs/aboutmedialog.ui similarity index 100% rename from zeiterfassung/dialogs/aboutmedialog.ui rename to zeiterfassunglib/dialogs/aboutmedialog.ui diff --git a/zeiterfassung/dialogs/authenticationdialog.cpp b/zeiterfassunglib/dialogs/authenticationdialog.cpp similarity index 100% rename from zeiterfassung/dialogs/authenticationdialog.cpp rename to zeiterfassunglib/dialogs/authenticationdialog.cpp diff --git a/zeiterfassung/dialogs/authenticationdialog.h b/zeiterfassunglib/dialogs/authenticationdialog.h similarity index 100% rename from zeiterfassung/dialogs/authenticationdialog.h rename to zeiterfassunglib/dialogs/authenticationdialog.h diff --git a/zeiterfassung/dialogs/authenticationdialog.ui b/zeiterfassunglib/dialogs/authenticationdialog.ui similarity index 97% rename from zeiterfassung/dialogs/authenticationdialog.ui rename to zeiterfassunglib/dialogs/authenticationdialog.ui index 16ff60c..cbb43c6 100644 --- a/zeiterfassung/dialogs/authenticationdialog.ui +++ b/zeiterfassunglib/dialogs/authenticationdialog.ui @@ -37,7 +37,7 @@ - :/zeiterfassung/images/authentication.png + :/zeiterfassunglib/images/authentication.png true diff --git a/zeiterfassung/dialogs/bookingdialog.cpp b/zeiterfassunglib/dialogs/bookingdialog.cpp similarity index 100% rename from zeiterfassung/dialogs/bookingdialog.cpp rename to zeiterfassunglib/dialogs/bookingdialog.cpp diff --git a/zeiterfassung/dialogs/bookingdialog.h b/zeiterfassunglib/dialogs/bookingdialog.h similarity index 100% rename from zeiterfassung/dialogs/bookingdialog.h rename to zeiterfassunglib/dialogs/bookingdialog.h diff --git a/zeiterfassung/dialogs/bookingdialog.ui b/zeiterfassunglib/dialogs/bookingdialog.ui similarity index 100% rename from zeiterfassung/dialogs/bookingdialog.ui rename to zeiterfassunglib/dialogs/bookingdialog.ui diff --git a/zeiterfassung/dialogs/languageselectiondialog.cpp b/zeiterfassunglib/dialogs/languageselectiondialog.cpp similarity index 100% rename from zeiterfassung/dialogs/languageselectiondialog.cpp rename to zeiterfassunglib/dialogs/languageselectiondialog.cpp diff --git a/zeiterfassung/dialogs/languageselectiondialog.h b/zeiterfassunglib/dialogs/languageselectiondialog.h similarity index 100% rename from zeiterfassung/dialogs/languageselectiondialog.h rename to zeiterfassunglib/dialogs/languageselectiondialog.h diff --git a/zeiterfassung/dialogs/languageselectiondialog.ui b/zeiterfassunglib/dialogs/languageselectiondialog.ui similarity index 100% rename from zeiterfassung/dialogs/languageselectiondialog.ui rename to zeiterfassunglib/dialogs/languageselectiondialog.ui diff --git a/zeiterfassung/dialogs/settingsdialog.cpp b/zeiterfassunglib/dialogs/settingsdialog.cpp similarity index 100% rename from zeiterfassung/dialogs/settingsdialog.cpp rename to zeiterfassunglib/dialogs/settingsdialog.cpp diff --git a/zeiterfassung/dialogs/settingsdialog.h b/zeiterfassunglib/dialogs/settingsdialog.h similarity index 100% rename from zeiterfassung/dialogs/settingsdialog.h rename to zeiterfassunglib/dialogs/settingsdialog.h diff --git a/zeiterfassung/dialogs/settingsdialog.ui b/zeiterfassunglib/dialogs/settingsdialog.ui similarity index 100% rename from zeiterfassung/dialogs/settingsdialog.ui rename to zeiterfassunglib/dialogs/settingsdialog.ui diff --git a/zeiterfassung/dialogs/timeassignmentdialog.cpp b/zeiterfassunglib/dialogs/timeassignmentdialog.cpp similarity index 100% rename from zeiterfassung/dialogs/timeassignmentdialog.cpp rename to zeiterfassunglib/dialogs/timeassignmentdialog.cpp diff --git a/zeiterfassung/dialogs/timeassignmentdialog.h b/zeiterfassunglib/dialogs/timeassignmentdialog.h similarity index 100% rename from zeiterfassung/dialogs/timeassignmentdialog.h rename to zeiterfassunglib/dialogs/timeassignmentdialog.h diff --git a/zeiterfassung/dialogs/timeassignmentdialog.ui b/zeiterfassunglib/dialogs/timeassignmentdialog.ui similarity index 100% rename from zeiterfassung/dialogs/timeassignmentdialog.ui rename to zeiterfassunglib/dialogs/timeassignmentdialog.ui diff --git a/zeiterfassung/dialogs/updatedialog.cpp b/zeiterfassunglib/dialogs/updatedialog.cpp similarity index 100% rename from zeiterfassung/dialogs/updatedialog.cpp rename to zeiterfassunglib/dialogs/updatedialog.cpp diff --git a/zeiterfassung/dialogs/updatedialog.h b/zeiterfassunglib/dialogs/updatedialog.h similarity index 100% rename from zeiterfassung/dialogs/updatedialog.h rename to zeiterfassunglib/dialogs/updatedialog.h diff --git a/zeiterfassung/dialogs/updatedialog.ui b/zeiterfassunglib/dialogs/updatedialog.ui similarity index 100% rename from zeiterfassung/dialogs/updatedialog.ui rename to zeiterfassunglib/dialogs/updatedialog.ui diff --git a/zeiterfassung/images/about.png b/zeiterfassunglib/images/about.png similarity index 100% rename from zeiterfassung/images/about.png rename to zeiterfassunglib/images/about.png diff --git a/zeiterfassung/images/auswertung.png b/zeiterfassunglib/images/auswertung.png similarity index 100% rename from zeiterfassung/images/auswertung.png rename to zeiterfassunglib/images/auswertung.png diff --git a/zeiterfassung/images/authentication.png b/zeiterfassunglib/images/authentication.png similarity index 100% rename from zeiterfassung/images/authentication.png rename to zeiterfassunglib/images/authentication.png diff --git a/zeiterfassung/images/help.png b/zeiterfassunglib/images/help.png similarity index 100% rename from zeiterfassung/images/help.png rename to zeiterfassunglib/images/help.png diff --git a/zeiterfassung/images/icon.png b/zeiterfassunglib/images/icon.png similarity index 100% rename from zeiterfassung/images/icon.png rename to zeiterfassunglib/images/icon.png diff --git a/zeiterfassung/images/next.png b/zeiterfassunglib/images/next.png similarity index 100% rename from zeiterfassung/images/next.png rename to zeiterfassunglib/images/next.png diff --git a/zeiterfassung/images/now.png b/zeiterfassunglib/images/now.png similarity index 100% rename from zeiterfassung/images/now.png rename to zeiterfassunglib/images/now.png diff --git a/zeiterfassung/images/previous.png b/zeiterfassunglib/images/previous.png similarity index 100% rename from zeiterfassung/images/previous.png rename to zeiterfassunglib/images/previous.png diff --git a/zeiterfassung/images/quit.png b/zeiterfassunglib/images/quit.png similarity index 100% rename from zeiterfassung/images/quit.png rename to zeiterfassunglib/images/quit.png diff --git a/zeiterfassung/images/refresh.png b/zeiterfassunglib/images/refresh.png similarity index 100% rename from zeiterfassung/images/refresh.png rename to zeiterfassunglib/images/refresh.png diff --git a/zeiterfassung/images/settings.png b/zeiterfassunglib/images/settings.png similarity index 100% rename from zeiterfassung/images/settings.png rename to zeiterfassunglib/images/settings.png diff --git a/zeiterfassung/images/splash.png b/zeiterfassunglib/images/splash.png similarity index 100% rename from zeiterfassung/images/splash.png rename to zeiterfassunglib/images/splash.png diff --git a/zeiterfassung/images/today.png b/zeiterfassunglib/images/today.png similarity index 100% rename from zeiterfassung/images/today.png rename to zeiterfassunglib/images/today.png diff --git a/zeiterfassung/images/user.png b/zeiterfassunglib/images/user.png similarity index 100% rename from zeiterfassung/images/user.png rename to zeiterfassunglib/images/user.png diff --git a/zeiterfassung/mainwindow.cpp b/zeiterfassunglib/mainwindow.cpp similarity index 99% rename from zeiterfassung/mainwindow.cpp rename to zeiterfassunglib/mainwindow.cpp index 6233128..b1423bb 100644 --- a/zeiterfassung/mainwindow.cpp +++ b/zeiterfassunglib/mainwindow.cpp @@ -225,7 +225,7 @@ void MainWindow::contextMenuBooking(const QPoint &pos) { QMenu menu; auto createAction = menu.addAction(tr("Create booking")); - auto refreshAction = menu.addAction(QIcon(QPixmap(QStringLiteral(":/zeiterfassung/images/refresh.png"))), tr("Refresh bookings")); + auto refreshAction = menu.addAction(QIcon(QPixmap(QStringLiteral(":/zeiterfassunglib/images/refresh.png"))), tr("Refresh bookings")); auto selectedAction = menu.exec(ui->treeViewBookings->viewport()->mapToGlobal(pos)); if(selectedAction == createAction) { @@ -332,7 +332,7 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos) { QMenu menu; auto createAction = menu.addAction(tr("Create time assignment")); - auto refreshAction = menu.addAction(QIcon(QPixmap(QStringLiteral(":/zeiterfassung/images/refresh.png"))), tr("Refresh time assignments")); + auto refreshAction = menu.addAction(QIcon(QPixmap(QStringLiteral(":/zeiterfassunglib/images/refresh.png"))), tr("Refresh time assignments")); auto selectedAction = menu.exec(ui->treeViewTimeAssignments->viewport()->mapToGlobal(pos)); if(selectedAction == createAction) { diff --git a/zeiterfassung/mainwindow.h b/zeiterfassunglib/mainwindow.h similarity index 100% rename from zeiterfassung/mainwindow.h rename to zeiterfassunglib/mainwindow.h diff --git a/zeiterfassung/mainwindow.ui b/zeiterfassunglib/mainwindow.ui similarity index 88% rename from zeiterfassung/mainwindow.ui rename to zeiterfassunglib/mainwindow.ui index 87a9f30..9ea7fe6 100644 --- a/zeiterfassung/mainwindow.ui +++ b/zeiterfassunglib/mainwindow.ui @@ -12,7 +12,7 @@ - :/zeiterfassung/images/icon.png:/zeiterfassung/images/icon.png + :/zeiterfassunglib/images/icon.png:/zeiterfassunglib/images/icon.png @@ -31,7 +31,7 @@ - :/zeiterfassung/images/previous.png:/zeiterfassung/images/previous.png + :/zeiterfassunglib/images/previous.png:/zeiterfassunglib/images/previous.png @@ -45,7 +45,7 @@ - :/zeiterfassung/images/next.png:/zeiterfassung/images/next.png + :/zeiterfassunglib/images/next.png:/zeiterfassunglib/images/next.png @@ -75,7 +75,7 @@ - :/zeiterfassung/images/now.png:/zeiterfassung/images/now.png + :/zeiterfassunglib/images/now.png:/zeiterfassunglib/images/now.png @@ -296,7 +296,7 @@ - :/zeiterfassung/images/quit.png:/zeiterfassung/images/quit.png + :/zeiterfassunglib/images/quit.png:/zeiterfassunglib/images/quit.png &Quit @@ -305,7 +305,7 @@ - :/zeiterfassung/images/user.png:/zeiterfassung/images/user.png + :/zeiterfassunglib/images/user.png:/zeiterfassunglib/images/user.png About &Me @@ -314,7 +314,7 @@ - :/zeiterfassung/images/about.png:/zeiterfassung/images/about.png + :/zeiterfassunglib/images/about.png:/zeiterfassunglib/images/about.png About &zeiterfassung @@ -328,7 +328,7 @@ - :/zeiterfassung/images/today.png:/zeiterfassung/images/today.png + :/zeiterfassunglib/images/today.png:/zeiterfassunglib/images/today.png &Today @@ -337,7 +337,7 @@ - :/zeiterfassung/images/refresh.png:/zeiterfassung/images/refresh.png + :/zeiterfassunglib/images/refresh.png:/zeiterfassunglib/images/refresh.png &Refresh everything @@ -346,7 +346,7 @@ - :/zeiterfassung/images/auswertung.png:/zeiterfassung/images/auswertung.png + :/zeiterfassunglib/images/auswertung.png:/zeiterfassunglib/images/auswertung.png &Auswertung @@ -355,7 +355,7 @@ - :/zeiterfassung/images/settings.png:/zeiterfassung/images/settings.png + :/zeiterfassunglib/images/settings.png:/zeiterfassunglib/images/settings.png &Settings @@ -364,7 +364,7 @@ - :/zeiterfassung/images/help.png:/zeiterfassung/images/help.png + :/zeiterfassunglib/images/help.png:/zeiterfassunglib/images/help.png Help diff --git a/zeiterfassung/models/bookingsmodel.cpp b/zeiterfassunglib/models/bookingsmodel.cpp similarity index 100% rename from zeiterfassung/models/bookingsmodel.cpp rename to zeiterfassunglib/models/bookingsmodel.cpp diff --git a/zeiterfassung/models/bookingsmodel.h b/zeiterfassunglib/models/bookingsmodel.h similarity index 100% rename from zeiterfassung/models/bookingsmodel.h rename to zeiterfassunglib/models/bookingsmodel.h diff --git a/zeiterfassung/models/timeassignmentsmodel.cpp b/zeiterfassunglib/models/timeassignmentsmodel.cpp similarity index 100% rename from zeiterfassung/models/timeassignmentsmodel.cpp rename to zeiterfassunglib/models/timeassignmentsmodel.cpp diff --git a/zeiterfassung/models/timeassignmentsmodel.h b/zeiterfassunglib/models/timeassignmentsmodel.h similarity index 100% rename from zeiterfassung/models/timeassignmentsmodel.h rename to zeiterfassunglib/models/timeassignmentsmodel.h diff --git a/zeiterfassung/resources.qrc b/zeiterfassunglib/resources.qrc similarity index 93% rename from zeiterfassung/resources.qrc rename to zeiterfassunglib/resources.qrc index 37eb951..13f4b93 100644 --- a/zeiterfassung/resources.qrc +++ b/zeiterfassunglib/resources.qrc @@ -1,5 +1,5 @@ - + images/about.png images/auswertung.png images/authentication.png diff --git a/zeiterfassung/stripfactory.cpp b/zeiterfassunglib/stripfactory.cpp similarity index 100% rename from zeiterfassung/stripfactory.cpp rename to zeiterfassunglib/stripfactory.cpp diff --git a/zeiterfassung/stripfactory.h b/zeiterfassunglib/stripfactory.h similarity index 100% rename from zeiterfassung/stripfactory.h rename to zeiterfassunglib/stripfactory.h diff --git a/zeiterfassung/stripswidget.cpp b/zeiterfassunglib/stripswidget.cpp similarity index 100% rename from zeiterfassung/stripswidget.cpp rename to zeiterfassunglib/stripswidget.cpp diff --git a/zeiterfassung/stripswidget.h b/zeiterfassunglib/stripswidget.h similarity index 100% rename from zeiterfassung/stripswidget.h rename to zeiterfassunglib/stripswidget.h diff --git a/zeiterfassung/timeutils.cpp b/zeiterfassunglib/timeutils.cpp similarity index 100% rename from zeiterfassung/timeutils.cpp rename to zeiterfassunglib/timeutils.cpp diff --git a/zeiterfassung/timeutils.h b/zeiterfassunglib/timeutils.h similarity index 100% rename from zeiterfassung/timeutils.h rename to zeiterfassunglib/timeutils.h diff --git a/zeiterfassunglib/translations/zeiterfassunglib_de.ts b/zeiterfassunglib/translations/zeiterfassunglib_de.ts index 7522e74..7beaec5 100644 --- a/zeiterfassunglib/translations/zeiterfassunglib_de.ts +++ b/zeiterfassunglib/translations/zeiterfassunglib_de.ts @@ -1,6 +1,116 @@ + + AboutMeDialog + + + + About me + Über mich + + + + User-ID: + Benutzer-ID: + + + + E-Mail: + E-Mail: + + + + Long username: + Langer Benutzername: + + + + Text: + Text: + + + + Username: + Benutzername: + + + + AuthenticationDialog + + + + Authentication + Authentifizierung + + + + Username: + Benutzername: + + + + Password: + Passwort: + + + + BookingDialog + + + + Booking + Buchung + + + + Time: + Zeit: + + + + Timespan: + Zeitspanne: + + + + Type: + Typ: + + + + Text: + Text: + + + + BookingsModel + + + ID + ID + + + + Time + Zeit + + + + Timespan + Zeitspanne + + + + Type + Typ + + + + Text + Text + + CreateBookingReply @@ -154,6 +264,35 @@ + + LanguageSelectionDialog + + + + Language selection + Sprachauswahl + + + + Please select a language: + Bitte wählen Sie eine Sprache: + + + + Language: + Sprache: + + + + English + Englisch + + + + German + Deutsch + + LoginPageReply @@ -190,6 +329,638 @@ + + MainWindow + + + Previous day + Vorheriger Tag + + + + Next day + Nächster Tag + + + + Now + Jetzt + + + + + + Start + Kommen + + + + End + Gehen + + + + Optimized view + Optimierte Anzeige + + + + Advanced view + Erweiterte Anzeige + + + + Bookings + Buchungen + + + + Time assignments + Kontierungen + + + + &File + &Datei + + + + &About + &Über + + + + &View + &Ansicht + + + + &Tools + &Werkzeuge + + + + &Quit + &Beenden + + + + About &Me + Über &mich + + + + About &zeiterfassung + Über &zeiterfassung + + + + About &Qt + Über &Qt + + + + &Today + &Heute + + + + &Refresh everything + Alles &neu laden + + + + &Auswertung + + + + + &Settings + &Einstellungen + + + + Help + Hilfe + + + + Zeiterfassung - %0 (%1) + Zeiterfassung - %0 (%1) + + + + + Could not open auswertung! + + + + + Could not open default PDF viewer! + Konnte den PDF-Anzeiger nicht öffnen! + + + + Subproject + Subprojekt + + + + Workpackage + Arbeitspaket + + + + Text + Text + + + + + + + %0: %1 + %0: %1 + + + + + + + ??? + ??? + + + + + Balance + Saldo + + + + + Holidays + Urlaubstage + + + + + Could not load bookings! + Konnte Buchungen nicht laden! + + + + Could not load Auswertung! + + + + + %0h + %0h + + + + Could not delete booking! + Konnte Buchung nicht löschen! + + + + Edit booking + Buchung bearbeiten + + + + Delete booking + Buchung löschen + + + + Could not edit booking! + Konnte Buchung nicht bearbeiten! + + + + Create booking + Buchung erstellen + + + + + n/a + n/v + + + + Refresh bookings + Buchungen aktualisieren + + + + + + Could not create booking! + Konnte Buchung nicht erstellen! + + + + Do you really want to delete the booking? + Möchten Sie die Buchung wirklich löschen? + + + + Refresh time assignments + Kontierungen aktualisieren + + + + Edit time assignment + Kontierung bearbeiten + + + + Delete time assignment + Kontierung löschen + + + + + + Could not edit time assignment! + Konnte Kontierung nicht bearbeiten! + + + + Do you really want to delete the time assignment? + Möchten Sie die Kontierung wirklich löschen? + + + + Could not delete time assignment! + Konnte Kontierung nicht löschen! + + + + + %0 (%1) + %0 (%1) + + + + Create time assignment + Kontierung erstellen + + + + + Could not create time assignment! + Konnte Kontierung nicht erstellen! + + + + + Switch + Wechseln + + + + SettingsDialog + + + + Settings + Einstellungen + + + + Language: + Sprache: + + + + Theme: + Aussehen: + + + + English + Englisch + + + + German + Deutsch + + + + + + Invalid settings! + Ungültige Einstellungen! + + + + Unknown language! + Unbekannte Sprache! + + + + Default + Standard + + + + Unknown theme! + Unbekanntes Aussehen! + + + + Please fill all options with valid values! + Bitte füllen Sie alle Felder mit gültigen Werten! + + + + + Could not load theme! + Konnte Aussehen nicht laden! + + + + Theme file does not exist! + Aussehen-Datei existiert nicht! + + + + Restart required! + Neustart erforderlich! + + + + To apply the new settings a restart is required! + Um die neuen Einstellungen zu übernehmen, ist ein Neustart erforderlich! + + + + StripsWidget + + + Loading... + Lade... + + + + Missing booking! + Kontierung fehlend! + + + + Expected start booking, instead got type %0 +Booking ID: %1 + + + + + + %0: %1 + %0: %1 + + + + Break + Pause + + + + + + %0h + %0h + + + + + + + + HH:mm + HH:mm + + + + Missing time assignment! + Kontierung fehlend! + + + + + + Expected %0 but received %1 in time assignment. +Time assignment ID: %2 + + + + + + + + + + + + + HH:mm:ss + HH:mm:ss + + + + + There is another booking after an unfinished time assignment. +Booking ID: %0 +Time assignment ID: %1 + + + + + + + There is another time assignment after an unfinished time assignment. +Time assignment ID: %0 +Time assignment ID: %1 + + + + + The last time assignment is finished without end booking +Time assignment ID: %0 + + + + + Expected end booking, instead got type %0 +Booking ID: %1 + + + + + Missing time assignment! Missing: %0 + Kontierung fehlend! %0 nicht kontiert + + + + Assigned time + Kontierte Zeit + + + + dd.MM.yyyy + dd.MM.yyyy + + + + %0 (%1) + %0 (%1) + + + + Time assignment time longer than booking time! +Time assignment: %0 +Booking: %1 + + + + + Strip rendering aborted due error. +Your bookings and time assignments for this day are in an illegal state! + + + + + Monday + Montag + + + + Tuesday + Dienstag + + + + Wednesday + Mittwoch + + + + Thursday + Donnerstag + + + + Friday + Freitag + + + + Saturday + Samstag + + + + Sunday + Sonntag + + + + Invalid + Ungültig + + + + Open + Offen + + + + TimeAssignmentDialog + + + + Time assignment + Kontierung + + + + Time: + Zeit: + + + + Timespan: + Zeitspanne: + + + + Project: + Projekt: + + + + Subproject: + Subprojekt: + + + + Workpackage: + Arbeitspaket: + + + + Text: + Text: + + + + + %0 (%1) + %0 (%1) + + + + TimeAssignmentsModel + + + ID + ID + + + + Time + Zeit + + + + Timespan + Zeitspanne + + + + Project + Projekt + + + + Subproject + Subprojekt + + + + Workpackage + Arbeitspaket + + + + Text + Text + + UpdateBookingReply @@ -213,6 +984,30 @@ + + UpdateDialog + + + + New update available! + Neues Update verfügbar! + + + + There is a new release available to download! + Es ist ein neues Update verfügbar zum Download! + + + + Dont show today anymore + Heute nicht mehr anzeigen + + + + Could not open default webbrowser! + Konnte den Standard-Browser nicht öffnen! + + UpdateTimeAssignmentReply diff --git a/zeiterfassunglib/translations/zeiterfassunglib_en.ts b/zeiterfassunglib/translations/zeiterfassunglib_en.ts index 159cf9a..b8bbd95 100644 --- a/zeiterfassunglib/translations/zeiterfassunglib_en.ts +++ b/zeiterfassunglib/translations/zeiterfassunglib_en.ts @@ -1,6 +1,116 @@ + + AboutMeDialog + + + + About me + + + + + User-ID: + + + + + E-Mail: + + + + + Long username: + + + + + Text: + + + + + Username: + + + + + AuthenticationDialog + + + + Authentication + + + + + Username: + + + + + Password: + + + + + BookingDialog + + + + Booking + + + + + Time: + + + + + Timespan: + + + + + Type: + + + + + Text: + + + + + BookingsModel + + + ID + + + + + Time + + + + + Timespan + + + + + Type + + + + + Text + + + CreateBookingReply @@ -154,6 +264,35 @@ + + LanguageSelectionDialog + + + + Language selection + + + + + Please select a language: + + + + + Language: + + + + + English + + + + + German + + + LoginPageReply @@ -190,6 +329,638 @@ + + MainWindow + + + Previous day + + + + + Next day + + + + + Now + + + + + + + Start + + + + + End + + + + + Optimized view + + + + + Advanced view + + + + + Bookings + + + + + Time assignments + + + + + &File + + + + + &About + + + + + &View + + + + + &Tools + + + + + &Quit + + + + + About &Me + + + + + About &zeiterfassung + + + + + About &Qt + + + + + &Today + + + + + &Refresh everything + + + + + &Auswertung + + + + + &Settings + + + + + Help + + + + + Zeiterfassung - %0 (%1) + + + + + Subproject + + + + + Workpackage + + + + + Text + + + + + + + + ??? + + + + + + Could not load bookings! + + + + + Could not load Auswertung! + + + + + + n/a + + + + + %0h + + + + + + + + %0: %1 + + + + + + Balance + + + + + + Holidays + + + + + Create booking + + + + + Refresh bookings + + + + + + + Could not create booking! + + + + + Edit booking + + + + + Delete booking + + + + + Could not edit booking! + + + + + Do you really want to delete the booking? + + + + + Could not delete booking! + + + + + Create time assignment + + + + + Refresh time assignments + + + + + + Could not create time assignment! + + + + + Edit time assignment + + + + + Delete time assignment + + + + + + + Could not edit time assignment! + + + + + Do you really want to delete the time assignment? + + + + + Could not delete time assignment! + + + + + + Could not open auswertung! + + + + + Could not open default PDF viewer! + + + + + + Switch + + + + + + %0 (%1) + + + + + SettingsDialog + + + + Settings + + + + + Language: + + + + + Theme: + + + + + English + + + + + German + + + + + + + Invalid settings! + + + + + Unknown language! + + + + + Default + + + + + Unknown theme! + + + + + Please fill all options with valid values! + + + + + + Could not load theme! + + + + + Theme file does not exist! + + + + + Restart required! + + + + + To apply the new settings a restart is required! + + + + + StripsWidget + + + Loading... + + + + + Missing booking! + + + + + Expected start booking, instead got type %0 +Booking ID: %1 + + + + + + %0: %1 + + + + + Break + + + + + + + %0h + + + + + + + + + HH:mm + + + + + Missing time assignment! + + + + + + + Expected %0 but received %1 in time assignment. +Time assignment ID: %2 + + + + + + + + + + + + + HH:mm:ss + + + + + + There is another booking after an unfinished time assignment. +Booking ID: %0 +Time assignment ID: %1 + + + + + + + There is another time assignment after an unfinished time assignment. +Time assignment ID: %0 +Time assignment ID: %1 + + + + + The last time assignment is finished without end booking +Time assignment ID: %0 + + + + + Expected end booking, instead got type %0 +Booking ID: %1 + + + + + Missing time assignment! Missing: %0 + + + + + Time assignment time longer than booking time! +Time assignment: %0 +Booking: %1 + + + + + Assigned time + + + + + Strip rendering aborted due error. +Your bookings and time assignments for this day are in an illegal state! + + + + + %0 (%1) + + + + + Monday + + + + + Tuesday + + + + + Wednesday + + + + + Thursday + + + + + Friday + + + + + Saturday + + + + + Sunday + + + + + dd.MM.yyyy + + + + + Invalid + + + + + Open + + + + + TimeAssignmentDialog + + + + Time assignment + + + + + Time: + + + + + Timespan: + + + + + Project: + + + + + Subproject: + + + + + Workpackage: + + + + + Text: + + + + + + %0 (%1) + + + + + TimeAssignmentsModel + + + ID + + + + + Time + + + + + Timespan + + + + + Project + + + + + Subproject + + + + + Workpackage + + + + + Text + + + UpdateBookingReply @@ -213,6 +984,30 @@ + + UpdateDialog + + + + New update available! + + + + + There is a new release available to download! + + + + + Dont show today anymore + + + + + Could not open default webbrowser! + + + UpdateTimeAssignmentReply diff --git a/zeiterfassunglib/zeiterfassunglib.pro b/zeiterfassunglib/zeiterfassunglib.pro index 994e871..4ca7d26 100644 --- a/zeiterfassunglib/zeiterfassunglib.pro +++ b/zeiterfassunglib/zeiterfassunglib.pro @@ -1,4 +1,4 @@ -QT += core network gui widgets +QT += core network gui widgets uitools TARGET = zeiterfassunglib TEMPLATE = lib @@ -10,47 +10,85 @@ DESTDIR = $${OUT_PWD}/../lib DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT DEFINES += ZEITERFASSUNGLIB_LIBRARY -SOURCES += zeiterfassungapi.cpp \ +SOURCES += mainwindow.cpp \ + stripfactory.cpp \ + stripswidget.cpp \ + timeutils.cpp \ + zeiterfassungapi.cpp \ zeiterfassungplugin.cpp \ + zeiterfassungsettings.cpp \ + dialogs/aboutmedialog.cpp \ + dialogs/authenticationdialog.cpp \ + dialogs/bookingdialog.cpp \ + dialogs/languageselectiondialog.cpp \ + dialogs/settingsdialog.cpp \ + dialogs/timeassignmentdialog.cpp \ + dialogs/updatedialog.cpp \ + models/bookingsmodel.cpp \ + models/timeassignmentsmodel.cpp \ + replies/createbookingreply.cpp \ replies/createtimeassignmentreply.cpp \ - replies/updatebookingreply.cpp \ + replies/deletebookingreply.cpp \ + replies/deletetimeassignmentreply.cpp \ + replies/getauswertungreply.cpp \ replies/getbookingsreply.cpp \ replies/getpresencestatusreply.cpp \ - replies/gettimeassignmentsreply.cpp \ - replies/deletetimeassignmentreply.cpp \ - replies/loginpagereply.cpp \ replies/getprojectsreply.cpp \ - replies/getauswertungreply.cpp \ + replies/gettimeassignmentsreply.cpp \ + replies/loginpagereply.cpp \ replies/loginreply.cpp \ - replies/userinforeply.cpp \ - replies/zeiterfassungreply.cpp \ + replies/updatebookingreply.cpp \ replies/updatetimeassignmentreply.cpp \ - replies/deletebookingreply.cpp \ - replies/createbookingreply.cpp + replies/userinforeply.cpp \ + replies/zeiterfassungreply.cpp HEADERS += cpp14polyfills.h \ - zeiterfassunglib_global.h \ + mainwindow.h \ + stripfactory.h \ + stripswidget.h \ + timeutils.h \ zeiterfassungapi.h \ + zeiterfassunglib_global.h \ zeiterfassungplugin.h \ + zeiterfassungsettings.h \ + dialogs/aboutmedialog.h \ + dialogs/authenticationdialog.h \ + dialogs/bookingdialog.h \ + dialogs/languageselectiondialog.h \ + dialogs/settingsdialog.h \ + dialogs/timeassignmentdialog.h \ + dialogs/updatedialog.h \ + models/bookingsmodel.h \ + models/timeassignmentsmodel.h \ + replies/createbookingreply.h \ replies/createtimeassignmentreply.h \ - replies/updatebookingreply.h \ + replies/deletebookingreply.h \ + replies/deletetimeassignmentreply.h \ + replies/getauswertungreply.h \ replies/getbookingsreply.h \ replies/getpresencestatusreply.h \ - replies/gettimeassignmentsreply.h \ - replies/deletetimeassignmentreply.h \ - replies/loginpagereply.h \ replies/getprojectsreply.h \ - replies/getauswertungreply.h \ + replies/gettimeassignmentsreply.h \ + replies/loginpagereply.h \ replies/loginreply.h \ - replies/userinforeply.h \ - replies/zeiterfassungreply.h \ + replies/updatebookingreply.h \ replies/updatetimeassignmentreply.h \ - replies/deletebookingreply.h \ - replies/createbookingreply.h + replies/userinforeply.h \ + replies/zeiterfassungreply.h -TRANSLATIONS += \ - translations/zeiterfassunglib_en.ts \ - translations/zeiterfassunglib_de.ts +FORMS += mainwindow.ui \ + dialogs/updatedialog.ui \ + dialogs/settingsdialog.ui \ + dialogs/languageselectiondialog.ui \ + dialogs/authenticationdialog.ui \ + dialogs/bookingdialog.ui \ + dialogs/aboutmedialog.ui \ + dialogs/timeassignmentdialog.ui + +RESOURCES += resources.qrc + +TRANSLATIONS += translations/zeiterfassunglib_en.ts \ + translations/zeiterfassunglib_de.ts # unix { # target.path = /usr/lib diff --git a/zeiterfassung/zeiterfassungsettings.cpp b/zeiterfassunglib/zeiterfassungsettings.cpp similarity index 100% rename from zeiterfassung/zeiterfassungsettings.cpp rename to zeiterfassunglib/zeiterfassungsettings.cpp diff --git a/zeiterfassung/zeiterfassungsettings.h b/zeiterfassunglib/zeiterfassungsettings.h similarity index 100% rename from zeiterfassung/zeiterfassungsettings.h rename to zeiterfassunglib/zeiterfassungsettings.h -- 2.50.1 From 551fce4496f671eb46bb41eee89b99a111712b0f Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Sat, 16 Dec 2017 11:26:54 +0100 Subject: [PATCH 09/15] Automated lrelease --- lrelease.pri | 11 +++++++++++ zeiterfassung/translations/zeiterfassung_de.qm | Bin 18923 -> 0 bytes zeiterfassung/translations/zeiterfassung_en.qm | Bin 23 -> 0 bytes zeiterfassung/zeiterfassung.pro | 6 +++++- .../translations/zeiterfassunglib_de.qm | Bin 23 -> 0 bytes .../translations/zeiterfassunglib_en.qm | Bin 23 -> 0 bytes zeiterfassunglib/zeiterfassunglib.pro | 2 ++ 7 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 lrelease.pri delete mode 100644 zeiterfassung/translations/zeiterfassung_de.qm delete mode 100644 zeiterfassung/translations/zeiterfassung_en.qm delete mode 100644 zeiterfassunglib/translations/zeiterfassunglib_de.qm delete mode 100644 zeiterfassunglib/translations/zeiterfassunglib_en.qm diff --git a/lrelease.pri b/lrelease.pri new file mode 100644 index 0000000..23dba4a --- /dev/null +++ b/lrelease.pri @@ -0,0 +1,11 @@ +isEmpty(QMAKE_LRELEASE) { + win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe + else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease +} + +lrelease.input = TRANSLATIONS +lrelease.output = $${OUT_PWD}/translations/${QMAKE_FILE_BASE}.qm +lrelease.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm $${OUT_PWD}/translations/${QMAKE_FILE_BASE}.qm +lrelease.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += lrelease +PRE_TARGETDEPS += compiler_lrelease_make_all diff --git a/zeiterfassung/translations/zeiterfassung_de.qm b/zeiterfassung/translations/zeiterfassung_de.qm deleted file mode 100644 index 681992c46af52e04baee1e35a7f38e7979e7d597..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18923 zcmcE7ks@*G{hX<16=n7(EZlq7iGhLj1p@=i6$S?8QV4Chmw`begMmRz9YSlpWnggD zXJC*JV_@)7VPLQ^XJGJgVPH^r!oU!k&cL9!lYyZykbyzvKLg7f0|o{~0S4BzeGCkG z5)7mxeQttR2dk= z>KL?pSQr?@)-hsvI{FL=Mi&_vbQUlaeSgTnV10n0{j4MdgUW1%K1)Uh2K9*y6K2~nFgR2& zUS@SG?dYke*T27wh2T5TDtV8=lQ23cuVH?K|x2HmHuX-VY_3=*4I zyFlSB7sR>-B(7J-x{hlG1B3D=)^&%w7#K7*vL1STkAcClkxirSD+7Z{B!o6rVAEgw znSnvkmMxs0k%2)*jV-}u9|MEK8McJVj|>d93T#OX#S9FR-E8X)FJNF`&4JMDy%3sf zJA~%h3!(XTLTHmx2yL+xLR%eRJC-BDz#vh@b}Vlx1A~Me+qW%w3=B5&*~LpXGcYLK zV)xrw$H3sI#NK1^kbyzt4g16eCJYS9r4ZUki+vjR7X}8yH|#5U7cwxIJ!0Q_VG09- zLOc6)`vwLEq3!H9_Wx&Kke|Szm^zPv!SNJ_(h5li2GK(hTB`*@>o4R`uHVJLz+l5s zmuASopkW4~ovv^+wOnOjkc{S-Uctk_VDpw^ProDsgPuDlS2ifVoH(VJxfmD>6gU+g z-D6;|U%{#QN|Awq%K}348FT8Y@iQ>UedA2n&&9x?f1fi=ft`VYDTgyB*_DBTfq`@3 zy^RbEQu{a;zY}C&5X|E|DgkoGAI{sxf(#4}B3yhc92pp-H*l@9`^CV(c!z6GPYDBq z>U6Fv2fs2fn2B)RmC|BhU?}Eh+*ZfHpp(w6AfU*=AZ5j^V4ujqAZ@^Hx2KqaK}Cq$ z=Qt?8X>jkEb(4WX?*osBXfgwX_BS4hr;ZE^cCI|?f6^Hk#2)eZ8QfrC;6DqYRWI`7 zeTZUUa8lu!VlTzOz-R}dnG|?7zdpjiV6cd1*ZX1y25}Rf-HgQy4C)_wu6HhHU{HL@ zbK6^-fkBd+=Ue_s1_s3{ULLK53=BHod37Be85qp!cxxp0F))Z~@cw=+$iSeg4x#Ox zc>hbOGcYJv@a1GAGBDUK;%ogO$iU$2%D47qGXsNCEq`IqMg|6!rx2R$KZG`Z2ca#* z`KL`j$iTpo458V|AT;-02yL7Lq0RdswB=s@lk+th81y#tzi(`0V6Z!z$-volrU6* zMe-OD8FCp?kqqSX$Z8YCFdt=47m zWN<;!&JkLiTBPggg3AOc3==RN&j~UEpSzV99KpWN0Ea^fLncESLncENLnb&hNlLoq`+Lq0oWVfGf>ShHEej|;<5Ugx1(NDaXy%2w0m*C;Y<`C81=S6NWHXd7D8g-!_X_s+Q%K2AF3nBND^bWSR>;dQQAo^F$WO{jO)gOcSuW&Ul$uzQ z3iWJIYC%pVI2;|2TmUNUG8yt1G8hsWau`Y&Qc-MAWl&&9V#o)(5~M1f!H=N`$rTDv zSENF$PtMOPNzBYsNP;9_zaqTO@IZ1#HbXu`9s?){Kvw2KN?x#2K*b^`5f(uMrW{-h zq<{+tD+UDyRR#lipoj+~78Pgar9+&RmYA87nqsA(YJe{=To~LKQW-KBa=_+-ybH=J z3Ji`6c?@X`MGT4Hf?0tfk)f0!4a_cKC;|r)sF+4~fn-o>VQFe{i9%{oQGSs^esXeY z5n(sbFG)y3k_0F@I~EsbrssiD&w!;20A5gDa}hqWE|3RFsO|4ffn_tNX4lfv^d2m)Dw$}5-Y)lsepTG z3A8{jMp#eZoPymA^o$1VE+8!uD5+UN_6HQ@gKAo&SU|QPf4!=}kP5DFK<#=^rB{rU z2w*ikTAiAjlL{)Ui{YsN(|-D=0!%m1I~8EMzz8F3FGfT+||W<=I{H(sMG4Ge8YP zai7Gz^wPxi)Zo;d)MQXM5~;Jr$Kb+{3hs^;gL-Q4mL{8fYEfgHkQBN02R)49H1MEKY?wULjE-2O6G)9Z<&Ljn?kZXDDF+ zwea&8QW!G9t?gn4kYhlhm&5P}+8aqdm(K^p4@gW;Mby9aO!C<5Uk4s|$z)JqfCU7>F%+b}CaA*$3PjK_1gPH1 zhW7bEK?e#{)D9B%j*uRM0z)`Fz>C1O8)(P@WM(>p0t09u2o#B^9X1=sJcZJ{?7aN) zJcUG*p&SKJ@2#{b71o8)QwT~;$t+4uE=f&MD9MNQ>bSs>fryAnga?lpiW$<7dVC;< zBWHs@(D6S|uKfd62?`omc0eB?19=Nni7SA|a8ei)Fvghl;Q8Ddbz}nSAWr6?3YN2T;Y1p>NX>6z%z?G6Co^gw-mT?P+^RE9)of<=Uqc2H_@L4ICwszOR8Bx}M(6%rME@*(4V z3K^-1DXB$RLxm4CBEX=)puwQZV91~e4}Er30|gCLLrri<`X*-Pg=gla3Ekv1t%tPy?4YMGV>Caq?17Wr3nGKL@K# zpfCfC?G(etnBbaN)xt7U%duI;#$XSEaFxvV_V(D+iNGS8L4iRHWBz~>9PbKhzBu9% zG4r6t5Xevhw+*H*5NmwG6ByV|(3AnF*agjCq(Mi!!9_6KG!dvPs!}scQj5|Oi;GJk zL(S;Xs>0yPPz0`wVFrTg15onG1BW=cdWIXz>zGoOn3tTIqELn-5V;tF!DEam4Eb`sX}AYIr3QwVi<9Mmp>>*IiRfw5_{Lu*x_jIx8PBJjKpcytjIPKZ1n*r#-<$`7_q-6st?Lc;bJcr>M z1Gr5K3RtA>Cz7vIz(YTHeeHl|BVk|TvKPt6Pvu?!&O`FI zI3mPTQ!-2N`r3_TU*or19?foIe2zb^K`9y3=t87)c=?XxX9&kK&=nR`~al(No7FPJA9B4Z&KFA;^K6k3%a3^*H#h?Zf;l>~aUxsg>{w;U{2)Vrr>V<(i zf9UzDoFS6|RP}2?~Tz=3) zOGJ=DJP|zeTMBMFfo6vx>mZOLPXN|Vht9iV4PO(iNs3r2Bw$vcr7x^j@qn$$h0JQh zqmMPXB(Vr<6IO&Fn4y#*2|Q4i51Z?T>*ES8O)7wlwPQ&}S%vhdpzi zej>I&w}1u;C|E$%18B4fw6F#=kq${x$aO!qriUn^<_9-DN-|P&q2p_?ej?H^ENHkB zRGNT>@IXzt6u1l7T_8;ckSqDH>Lg|i7@JNahJLYWGhhe>4?6z=FQ))^k{A?l_m7cU zV}hP}Wr;bNDGJ5VjxxB7kIfEHaDc|A62avq@?b3L=r1Vb5EhWIPi&Y+aS9X0SY#sN!LxDuHi19}F~MU3MxfLf;&;3)`Dh=Cjr z@&qD-Ae=1~0?GvnX_+~x3Mu)}3Bc5f%wouT9&F(wgkd#e;UOE?IPfq$HmwsFLK$+w zL&l(z4b)oz&2)fb5MO##V5njMjTgbjNkQXB8IYo$K?lpAGC9#_5R$KuSWu8tsZf%U zs*smj4$l$_i3&x~sLd=U9J^}Z%m`{VA&+T;CKQmf4IvBwcr}X#8fE*E$KUv+b4+ku9AI5m#o#&}({%#iRDe_*!Zor( z3v=ui@`2azhcx)TfLN&CAfV4&w!1EN4HEf_N5|QKt zd^3x|E8?I{LvVVg+*k>iv1rXf9LB?j4q(X#hpXXD7)03!nneK37Ql2OnoBCUoS*=e zfK3r$`j&^m7d-6T#DOiBH&e|pv9A*ss&O{B7DUWl2KYzjMGK|1{d&* zO&*3**+WWG@#*u0P91}0Vv(oTIm1&^^6=;sVMt*}VbEjnW$XF+eGH@p${f&z9pKs$w*g|< zx++MBP4>Lg&U{>1hp_hEhJF)GME8WSA&{1pgv#?oAjWa-BbopMX%xsPzp}t3W;TjnK_9`Igr5=OgrKjT*0P;h7v*jP}t%h zP(QAefjFBXeLzs(5wzg3oFR`Phan%legNSn-H?pbqEyg2%0zGvt|%3mB3omFBqi0@P zJ|c-YA#GNH6rH#>Re{EX${6w)92p823K)tRLZO8iBJU_c_W?jhfM5%tQp@rk3kr%s zc7rnv7FWn#{k8L)*dXq_miYXs^~!b&{s8|!3|LK#$gVQ#C#Vl8M& z&6UA}!Ii-e-lAf5^#gBYUGq}FgEr978gB-Fa32U+3u|zQV^9dF87BzU1fDZN zXj1`?_LVSzCYnHXBJa8gIOAOWq3fNTqBIuBH*;d2#eauRm{A}>zRLUI>kZE7lH@EV^J1JIm^ zzGzf|!4tf>5Hy0F3$EZZ!Q&C2Ay`NNfjp7Hkk0^Wiy=D+DX7v@OTcSI6*BYE@{4l8 z`=8N*3VoRhs1*f?1keIlP^F#7P|1)FUEYprJGMC+F+_lXDs6>g@E9bTrL>$HLZku< z1`lZPD1cW$B5#<-6}+fJZPM4whvs{6xRFJPdBr*4Jca4R43rr(&%<|uXA}~l6N@NQ PI1tBmFfcGMF){)GWt#zx diff --git a/zeiterfassung/translations/zeiterfassung_en.qm b/zeiterfassung/translations/zeiterfassung_en.qm deleted file mode 100644 index 9dad8dffceb9623e88f8b96d9cd0caf25574c6fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ diff --git a/zeiterfassung/zeiterfassung.pro b/zeiterfassung/zeiterfassung.pro index 6afd9cb..a4214f7 100755 --- a/zeiterfassung/zeiterfassung.pro +++ b/zeiterfassung/zeiterfassung.pro @@ -21,13 +21,17 @@ SOURCES += main.cpp HEADERS += -FORMS += +FORMS += strips/bookingstartstrip.ui \ + strips/bookingendstrip.ui \ + strips/timeassignmentstrip.ui RESOURCES += TRANSLATIONS += translations/zeiterfassung_en.ts \ translations/zeiterfassung_de.ts +include(../lrelease.pri) + include(installs.pri) unix: include(installs_unix.pri) win32: include(installs_win32.pri) diff --git a/zeiterfassunglib/translations/zeiterfassunglib_de.qm b/zeiterfassunglib/translations/zeiterfassunglib_de.qm deleted file mode 100644 index 9dad8dffceb9623e88f8b96d9cd0caf25574c6fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ diff --git a/zeiterfassunglib/translations/zeiterfassunglib_en.qm b/zeiterfassunglib/translations/zeiterfassunglib_en.qm deleted file mode 100644 index 9dad8dffceb9623e88f8b96d9cd0caf25574c6fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ diff --git a/zeiterfassunglib/zeiterfassunglib.pro b/zeiterfassunglib/zeiterfassunglib.pro index 4ca7d26..4e5ce59 100644 --- a/zeiterfassunglib/zeiterfassunglib.pro +++ b/zeiterfassunglib/zeiterfassunglib.pro @@ -90,6 +90,8 @@ RESOURCES += resources.qrc TRANSLATIONS += translations/zeiterfassunglib_en.ts \ translations/zeiterfassunglib_de.ts +include(../lrelease.pri) + # unix { # target.path = /usr/lib # INSTALLS += target -- 2.50.1 From 98b5c0ece4c37ebd261a9520fbcd6814df2c3368 Mon Sep 17 00:00:00 2001 From: Daniel Brunner <0xFEEDC0DE64@gmail.com> Date: Sat, 16 Dec 2017 11:39:32 +0100 Subject: [PATCH 10/15] Fixed compilaion on windows --- zeiterfassung/installs.pri | 8 ++++---- zeiterfassunglib/dialogs/aboutmedialog.h | 3 ++- zeiterfassunglib/dialogs/authenticationdialog.h | 4 +++- zeiterfassunglib/dialogs/bookingdialog.h | 4 +++- zeiterfassunglib/dialogs/languageselectiondialog.h | 4 +++- zeiterfassunglib/dialogs/settingsdialog.h | 4 +++- zeiterfassunglib/dialogs/timeassignmentdialog.h | 4 +++- zeiterfassunglib/dialogs/updatedialog.h | 4 +++- zeiterfassunglib/mainwindow.h | 3 ++- zeiterfassunglib/models/bookingsmodel.h | 3 ++- zeiterfassunglib/models/timeassignmentsmodel.h | 3 ++- zeiterfassunglib/stripfactory.h | 4 +++- zeiterfassunglib/stripswidget.h | 3 ++- zeiterfassunglib/timeutils.h | 10 ++++++---- zeiterfassunglib/zeiterfassungplugin.h | 4 +++- zeiterfassunglib/zeiterfassungsettings.h | 4 +++- 16 files changed, 47 insertions(+), 22 deletions(-) diff --git a/zeiterfassung/installs.pri b/zeiterfassung/installs.pri index 78833de..a9f5977 100644 --- a/zeiterfassung/installs.pri +++ b/zeiterfassung/installs.pri @@ -11,10 +11,10 @@ translationsinstall.files = $$[QT_INSTALL_TRANSLATIONS]/qt_en.qm \ $$[QT_INSTALL_TRANSLATIONS]/qtquick1_de.qm \ $$[QT_INSTALL_TRANSLATIONS]/qtscript_de.qm \ $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_de.qm \ - translations/zeiterfassung_en.qm \ - translations/zeiterfassung_de.qm \ - ../zeiterfassunglib/translations/zeiterfassunglib_en.qm \ - ../zeiterfassunglib/translations/zeiterfassunglib_de.qm + $$OUT_PWD/translations/zeiterfassung_en.qm \ + $$OUT_PWD/translations/zeiterfassung_de.qm \ + $$OUT_PWD/../zeiterfassunglib/translations/zeiterfassunglib_en.qm \ + $$OUT_PWD/../zeiterfassunglib/translations/zeiterfassunglib_de.qm INSTALLS += translationsinstall themesinstall.path = $${DESTDIR}/themes diff --git a/zeiterfassunglib/dialogs/aboutmedialog.h b/zeiterfassunglib/dialogs/aboutmedialog.h index 5336433..2297c13 100644 --- a/zeiterfassunglib/dialogs/aboutmedialog.h +++ b/zeiterfassunglib/dialogs/aboutmedialog.h @@ -3,11 +3,12 @@ #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungapi.h" namespace Ui { class AboutMeDialog; } -class AboutMeDialog : public QDialog +class ZEITERFASSUNGLIBSHARED_EXPORT AboutMeDialog : public QDialog { Q_OBJECT diff --git a/zeiterfassunglib/dialogs/authenticationdialog.h b/zeiterfassunglib/dialogs/authenticationdialog.h index 7a4f86c..712059c 100644 --- a/zeiterfassunglib/dialogs/authenticationdialog.h +++ b/zeiterfassunglib/dialogs/authenticationdialog.h @@ -3,11 +3,13 @@ #include +#include "zeiterfassunglib_global.h" + namespace Ui { class AuthenticationDialog; } -class AuthenticationDialog : public QDialog +class ZEITERFASSUNGLIBSHARED_EXPORT AuthenticationDialog : public QDialog { Q_OBJECT diff --git a/zeiterfassunglib/dialogs/bookingdialog.h b/zeiterfassunglib/dialogs/bookingdialog.h index 4a308f2..67a95e7 100644 --- a/zeiterfassunglib/dialogs/bookingdialog.h +++ b/zeiterfassunglib/dialogs/bookingdialog.h @@ -4,9 +4,11 @@ #include #include +#include "zeiterfassunglib_global.h" + namespace Ui { class BookingDialog; } -class BookingDialog : public QDialog +class ZEITERFASSUNGLIBSHARED_EXPORT BookingDialog : public QDialog { Q_OBJECT diff --git a/zeiterfassunglib/dialogs/languageselectiondialog.h b/zeiterfassunglib/dialogs/languageselectiondialog.h index 33bf90e..e28b883 100644 --- a/zeiterfassunglib/dialogs/languageselectiondialog.h +++ b/zeiterfassunglib/dialogs/languageselectiondialog.h @@ -4,9 +4,11 @@ #include #include +#include "zeiterfassunglib_global.h" + namespace Ui { class LanguageSelectionDialog; } -class LanguageSelectionDialog : public QDialog +class ZEITERFASSUNGLIBSHARED_EXPORT LanguageSelectionDialog : public QDialog { Q_OBJECT diff --git a/zeiterfassunglib/dialogs/settingsdialog.h b/zeiterfassunglib/dialogs/settingsdialog.h index 9db52de..5cafed2 100644 --- a/zeiterfassunglib/dialogs/settingsdialog.h +++ b/zeiterfassunglib/dialogs/settingsdialog.h @@ -3,10 +3,12 @@ #include +#include "zeiterfassunglib_global.h" + class ZeiterfassungSettings; namespace Ui { class SettingsDialog; } -class SettingsDialog : public QDialog +class ZEITERFASSUNGLIBSHARED_EXPORT SettingsDialog : public QDialog { Q_OBJECT diff --git a/zeiterfassunglib/dialogs/timeassignmentdialog.h b/zeiterfassunglib/dialogs/timeassignmentdialog.h index a8d253c..160b057 100644 --- a/zeiterfassunglib/dialogs/timeassignmentdialog.h +++ b/zeiterfassunglib/dialogs/timeassignmentdialog.h @@ -4,13 +4,15 @@ #include #include +#include "zeiterfassunglib_global.h" + template class QMap; class ZeiterfassungSettings; namespace Ui { class TimeAssignmentDialog; } -class TimeAssignmentDialog : public QDialog +class ZEITERFASSUNGLIBSHARED_EXPORT TimeAssignmentDialog : public QDialog { Q_OBJECT diff --git a/zeiterfassunglib/dialogs/updatedialog.h b/zeiterfassunglib/dialogs/updatedialog.h index 9175684..d2a9c08 100644 --- a/zeiterfassunglib/dialogs/updatedialog.h +++ b/zeiterfassunglib/dialogs/updatedialog.h @@ -4,13 +4,15 @@ #include #include +#include "zeiterfassunglib_global.h" + class QNetworkAccessManager; class QNetworkReply; class ZeiterfassungSettings; namespace Ui { class UpdateDialog; } -class UpdateDialog : public QDialog +class ZEITERFASSUNGLIBSHARED_EXPORT UpdateDialog : public QDialog { Q_OBJECT diff --git a/zeiterfassunglib/mainwindow.h b/zeiterfassunglib/mainwindow.h index ccb5d66..37817a7 100644 --- a/zeiterfassunglib/mainwindow.h +++ b/zeiterfassunglib/mainwindow.h @@ -6,6 +6,7 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungapi.h" #include "replies/getprojectsreply.h" #include "replies/getauswertungreply.h" @@ -21,7 +22,7 @@ class StripsWidget; class BookingsModel; class TimeAssignmentsModel; -class MainWindow : public QMainWindow +class ZEITERFASSUNGLIBSHARED_EXPORT MainWindow : public QMainWindow { Q_OBJECT diff --git a/zeiterfassunglib/models/bookingsmodel.h b/zeiterfassunglib/models/bookingsmodel.h index ea95bd6..c6a0e5e 100644 --- a/zeiterfassunglib/models/bookingsmodel.h +++ b/zeiterfassunglib/models/bookingsmodel.h @@ -4,11 +4,12 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungapi.h" class StripsWidget; -class BookingsModel : public QAbstractListModel +class ZEITERFASSUNGLIBSHARED_EXPORT BookingsModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY(StripsWidget* stripsWidget READ stripsWidget WRITE setStripsWidget NOTIFY stripsWidgetChanged) diff --git a/zeiterfassunglib/models/timeassignmentsmodel.h b/zeiterfassunglib/models/timeassignmentsmodel.h index 1caacf1..a860a40 100644 --- a/zeiterfassunglib/models/timeassignmentsmodel.h +++ b/zeiterfassunglib/models/timeassignmentsmodel.h @@ -4,11 +4,12 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungapi.h" class StripsWidget; -class TimeAssignmentsModel : public QAbstractListModel +class ZEITERFASSUNGLIBSHARED_EXPORT TimeAssignmentsModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY(StripsWidget* stripsWidget READ stripsWidget WRITE setStripsWidget NOTIFY stripsWidgetChanged) diff --git a/zeiterfassunglib/stripfactory.h b/zeiterfassunglib/stripfactory.h index 4aae50e..af3e1d3 100644 --- a/zeiterfassunglib/stripfactory.h +++ b/zeiterfassunglib/stripfactory.h @@ -6,10 +6,12 @@ #include #include +#include "zeiterfassunglib_global.h" + class QUiLoader; class QByteArray; -class StripFactory : public QObject +class ZEITERFASSUNGLIBSHARED_EXPORT StripFactory : public QObject { Q_OBJECT diff --git a/zeiterfassunglib/stripswidget.h b/zeiterfassunglib/stripswidget.h index 689511d..90614d2 100644 --- a/zeiterfassunglib/stripswidget.h +++ b/zeiterfassunglib/stripswidget.h @@ -6,6 +6,7 @@ #include #include +#include "zeiterfassunglib_global.h" #include "zeiterfassungapi.h" #include "replies/getbookingsreply.h" #include "replies/gettimeassignmentsreply.h" @@ -16,7 +17,7 @@ template class QVector; class StripFactory; -class StripsWidget : public QWidget +class ZEITERFASSUNGLIBSHARED_EXPORT StripsWidget : public QWidget { Q_OBJECT diff --git a/zeiterfassunglib/timeutils.h b/zeiterfassunglib/timeutils.h index c42555d..0bc866a 100644 --- a/zeiterfassunglib/timeutils.h +++ b/zeiterfassunglib/timeutils.h @@ -3,9 +3,11 @@ #include -int timeToSeconds(const QTime &time); -QTime timeBetween(const QTime &l, const QTime &r); -QTime timeAdd(const QTime &l, const QTime &r); -QTime timeNormalise(const QTime &time); +#include "zeiterfassunglib_global.h" + +int ZEITERFASSUNGLIBSHARED_EXPORT timeToSeconds(const QTime &time); +QTime ZEITERFASSUNGLIBSHARED_EXPORT timeBetween(const QTime &l, const QTime &r); +QTime ZEITERFASSUNGLIBSHARED_EXPORT timeAdd(const QTime &l, const QTime &r); +QTime ZEITERFASSUNGLIBSHARED_EXPORT timeNormalise(const QTime &time); #endif // TIMEUTILS_H diff --git a/zeiterfassunglib/zeiterfassungplugin.h b/zeiterfassunglib/zeiterfassungplugin.h index f437480..f893180 100644 --- a/zeiterfassunglib/zeiterfassungplugin.h +++ b/zeiterfassunglib/zeiterfassungplugin.h @@ -3,7 +3,9 @@ #include -class ZeiterfassungPlugin : public QObject +#include "zeiterfassunglib_global.h" + +class ZEITERFASSUNGLIBSHARED_EXPORT ZeiterfassungPlugin : public QObject { Q_OBJECT diff --git a/zeiterfassunglib/zeiterfassungsettings.h b/zeiterfassunglib/zeiterfassungsettings.h index 34e2489..952cbdb 100644 --- a/zeiterfassunglib/zeiterfassungsettings.h +++ b/zeiterfassunglib/zeiterfassungsettings.h @@ -7,7 +7,9 @@ #include #include -class ZeiterfassungSettings : public QSettings +#include "zeiterfassunglib_global.h" + +class ZEITERFASSUNGLIBSHARED_EXPORT ZeiterfassungSettings : public QSettings { Q_OBJECT -- 2.50.1 From 206d696efcee9f066fe0d50eb767232448757ae5 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Sat, 16 Dec 2017 12:51:01 +0100 Subject: [PATCH 11/15] Removed the need for install make step --- README.md | 21 +++-- lrelease.pri | 2 +- zeiterfassung/installs.pri | 156 +++++++++++++++++-------------- zeiterfassung/installs_unix.pri | 11 ++- zeiterfassung/installs_win32.pri | 69 ++++++++------ zeiterfassung/zeiterfassung.pro | 4 +- 6 files changed, 151 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 6e3b550..40176c6 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,27 @@ # Zeiterfassung -This tool helps me assigning my working hours to various accounts at work. +This tool helps me assigning my working hours to projects at work. + +![Screenshot of the main window](https://raw.githubusercontent.com/0xFEEDC0DE64/QtZeiterfassung/master/screenshot.png) ## Building from source +The build process has only been tested with gcc. On windows you have to use MinGW (provided by the Qt setup). All necessary config files or translations should be copied over to the build folder. The executable with all plugin lands in your build folder under /bin + +The simplest way to get it up and running is to just open it in QtCreator. If you are more like a terminal monkey, you can build it there too: ``` git clone https://github.com/0xFEEDC0DE64/QtZeiterfassung.git -pushd QtZeiterfassung -lrelease translations/zeiterfassung_*.ts -popd mkdir build_QtZeiterfassung cd build_QtZeiterfassung qmake ../QtZeiterfassung make -make install # to copy Qt's translations ``` -## Launching +## Launching (on unix) ``` -./zeiterfassung +LD_LIBRARY_PATH=../lib ./zeiterfassung # or just use start.sh ``` +## Launching (on win32) +Double click the **zeiterfassung.exe**. Please report any error message like missing libraries or plugins! + +## Configuration This tool saves its configuration using [QSettings](https://doc.qt.io/qt-5/qsettings.html). On linux, the configuration files are placed in `~/.config/db-software/zeiterfassung.conf`. **Be careful!** This config file contains your password in plain text (if you log in correctly). You can alter the code in main.cpp to change the behaviour of QSettings (for example: saving into an ini file at working directory). - -![Screenshot of the main window](https://raw.githubusercontent.com/0xFEEDC0DE64/QtZeiterfassung/master/screenshot.png) diff --git a/lrelease.pri b/lrelease.pri index 23dba4a..a0ad8fa 100644 --- a/lrelease.pri +++ b/lrelease.pri @@ -5,7 +5,7 @@ isEmpty(QMAKE_LRELEASE) { lrelease.input = TRANSLATIONS lrelease.output = $${OUT_PWD}/translations/${QMAKE_FILE_BASE}.qm -lrelease.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm $${OUT_PWD}/translations/${QMAKE_FILE_BASE}.qm +lrelease.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} lrelease.CONFIG += no_link QMAKE_EXTRA_COMPILERS += lrelease PRE_TARGETDEPS += compiler_lrelease_make_all diff --git a/zeiterfassung/installs.pri b/zeiterfassung/installs.pri index a9f5977..7782a92 100644 --- a/zeiterfassung/installs.pri +++ b/zeiterfassung/installs.pri @@ -1,71 +1,91 @@ -translationsinstall.path = $${DESTDIR}/translations -translationsinstall.files = $$[QT_INSTALL_TRANSLATIONS]/qt_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtbase_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtquick1_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtscript_nen.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_en.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qt_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtbase_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtquick1_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtscript_de.qm \ - $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_de.qm \ - $$OUT_PWD/translations/zeiterfassung_en.qm \ - $$OUT_PWD/translations/zeiterfassung_de.qm \ - $$OUT_PWD/../zeiterfassunglib/translations/zeiterfassunglib_en.qm \ - $$OUT_PWD/../zeiterfassunglib/translations/zeiterfassunglib_de.qm -INSTALLS += translationsinstall +COMPILED_TRANSLATIONS += $$[QT_INSTALL_TRANSLATIONS]/qt_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtbase_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtquick1_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtscript_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_en.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qt_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtbase_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtmultimedia_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtquick1_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtscript_de.qm \ + $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_de.qm \ + $${OUT_PWD}/translations/zeiterfassung_en.qm \ + $${OUT_PWD}/translations/zeiterfassung_de.qm \ + $${OUT_PWD}/../zeiterfassunglib/translations/zeiterfassunglib_en.qm \ + $${OUT_PWD}/../zeiterfassunglib/translations/zeiterfassunglib_de.qm -themesinstall.path = $${DESTDIR}/themes -themesinstall.files = themes/dark_theme.qss -INSTALLS += themesinstall +copy_compiled_translations.input = COMPILED_TRANSLATIONS +copy_compiled_translations.output = $${DESTDIR}/translations/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_compiled_translations.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_compiled_translations.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_compiled_translations +PRE_TARGETDEPS += compiler_copy_compiled_translations_make_all -darkthemeinstall.path = $${DESTDIR}/themes/dark_theme -darkthemeinstall.files = themes/dark_theme/checkbox_indeterminate_disabled.png \ - themes/dark_theme/radio_unchecked.png \ - themes/dark_theme/up_arrow.png \ - themes/dark_theme/branch_closed-on.png \ - themes/dark_theme/checkbox_checked_disabled.png \ - themes/dark_theme/checkbox_unchecked.png \ - themes/dark_theme/checkbox_indeterminate.png \ - themes/dark_theme/stylesheet-branch-more.png \ - themes/dark_theme/checkbox_checked.png \ - themes/dark_theme/checkbox_unchecked_disabled.png \ - themes/dark_theme/radio_checked.png \ - themes/dark_theme/checkbox_indeterminate_focus.png \ - themes/dark_theme/checkbox_checked_focus.png \ - themes/dark_theme/branch_closed.png \ - themes/dark_theme/Vsepartoolbar.png \ - themes/dark_theme/radio_checked_disabled.png \ - themes/dark_theme/left_arrow.png \ - themes/dark_theme/Vmovetoolbar.png \ - themes/dark_theme/branch_open-on.png \ - themes/dark_theme/close.png \ - themes/dark_theme/stylesheet-branch-end.png \ - themes/dark_theme/stylesheet-vline.png \ - themes/dark_theme/down_arrow_disabled.png \ - themes/dark_theme/radio_unchecked_disabled.png \ - themes/dark_theme/left_arrow_disabled.png \ - themes/dark_theme/Hmovetoolbar.png \ - themes/dark_theme/close-pressed.png \ - themes/dark_theme/up_arrow_disabled.png \ - themes/dark_theme/branch_open.png \ - themes/dark_theme/radio_checked_focus.png \ - themes/dark_theme/sizegrip.png \ - themes/dark_theme/checkbox_unchecked_focus.png \ - themes/dark_theme/right_arrow_disabled.png \ - themes/dark_theme/Hsepartoolbar.png \ - themes/dark_theme/undock.png \ - themes/dark_theme/transparent.png \ - themes/dark_theme/close-hover.png \ - themes/dark_theme/radio_unchecked_focus.png \ - themes/dark_theme/down_arrow.png \ - themes/dark_theme/right_arrow.png -INSTALLS += darkthemeinstall +THEMES += themes/dark_theme.qss -stripsinstall.path = $${DESTDIR}/strips -stripsinstall.files = strips/bookingstartstrip.ui \ - strips/bookingendstrip.ui \ - strips/timeassignmentstrip.ui -INSTALLS += stripsinstall +copy_themes.input = THEMES +copy_themes.output = $${DESTDIR}/themes/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_themes.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_themes.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_themes +PRE_TARGETDEPS += compiler_copy_themes_make_all + +DARK_THEME_RESOURCES += themes/dark_theme/checkbox_indeterminate_disabled.png \ + themes/dark_theme/radio_unchecked.png \ + themes/dark_theme/up_arrow.png \ + themes/dark_theme/branch_closed-on.png \ + themes/dark_theme/checkbox_checked_disabled.png \ + themes/dark_theme/checkbox_unchecked.png \ + themes/dark_theme/checkbox_indeterminate.png \ + themes/dark_theme/stylesheet-branch-more.png \ + themes/dark_theme/checkbox_checked.png \ + themes/dark_theme/checkbox_unchecked_disabled.png \ + themes/dark_theme/radio_checked.png \ + themes/dark_theme/checkbox_indeterminate_focus.png \ + themes/dark_theme/checkbox_checked_focus.png \ + themes/dark_theme/branch_closed.png \ + themes/dark_theme/Vsepartoolbar.png \ + themes/dark_theme/radio_checked_disabled.png \ + themes/dark_theme/left_arrow.png \ + themes/dark_theme/Vmovetoolbar.png \ + themes/dark_theme/branch_open-on.png \ + themes/dark_theme/close.png \ + themes/dark_theme/stylesheet-branch-end.png \ + themes/dark_theme/stylesheet-vline.png \ + themes/dark_theme/down_arrow_disabled.png \ + themes/dark_theme/radio_unchecked_disabled.png \ + themes/dark_theme/left_arrow_disabled.png \ + themes/dark_theme/Hmovetoolbar.png \ + themes/dark_theme/close-pressed.png \ + themes/dark_theme/up_arrow_disabled.png \ + themes/dark_theme/branch_open.png \ + themes/dark_theme/radio_checked_focus.png \ + themes/dark_theme/sizegrip.png \ + themes/dark_theme/checkbox_unchecked_focus.png \ + themes/dark_theme/right_arrow_disabled.png \ + themes/dark_theme/Hsepartoolbar.png \ + themes/dark_theme/undock.png \ + themes/dark_theme/transparent.png \ + themes/dark_theme/close-hover.png \ + themes/dark_theme/radio_unchecked_focus.png \ + themes/dark_theme/down_arrow.png \ + themes/dark_theme/right_arrow.png + +copy_dark_theme_resouces.input = DARK_THEME_RESOURCES +copy_dark_theme_resouces.output = $${DESTDIR}/themes/dark_theme/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_dark_theme_resouces.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_dark_theme_resouces.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_dark_theme_resouces +PRE_TARGETDEPS += compiler_copy_dark_theme_resouces_make_all + +STRIPLAYOUTS += strips/bookingstartstrip.ui \ + strips/bookingendstrip.ui \ + strips/timeassignmentstrip.ui + +copy_striplayouts.input = STRIPLAYOUTS +copy_striplayouts.output = $${DESTDIR}/strips/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_striplayouts.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_striplayouts.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_striplayouts +PRE_TARGETDEPS += compiler_copy_striplayouts_make_all diff --git a/zeiterfassung/installs_unix.pri b/zeiterfassung/installs_unix.pri index 0e21c25..c8dd1f2 100644 --- a/zeiterfassung/installs_unix.pri +++ b/zeiterfassung/installs_unix.pri @@ -1,3 +1,8 @@ -scriptsinstall.path = $${DESTDIR} -scriptsinstall.files = unix/start.sh -INSTALLS += scriptsinstall +SCRIPTS += unix/start.sh + +copy_scripts.input = SCRIPTS +copy_scripts.output = $${DESTDIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_scripts.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_scripts.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_scripts +PRE_TARGETDEPS += compiler_copy_scripts_make_all diff --git a/zeiterfassung/installs_win32.pri b/zeiterfassung/installs_win32.pri index 9254151..4279b20 100644 --- a/zeiterfassung/installs_win32.pri +++ b/zeiterfassung/installs_win32.pri @@ -1,34 +1,45 @@ CONFIG(debug, release|debug): DEBUG_SIGN = d -libinstall.path = $${DESTDIR} -libinstall.files = win32/Qt.conf \ - $$OUT_PWD/../lib/zeiterfassunglib.dll \ - $$[QT_INSTALL_BINS]/Qt5Core$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_BINS]/Qt5Gui$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_BINS]/Qt5Network$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_BINS]/Qt5Widgets$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_BINS]/libgcc_s_dw2-1.dll \ - $$[QT_INSTALL_BINS]/libstd~1.dll \ - $$[QT_INSTALL_BINS]/libwinpthread-1.dll -INSTALLS += libinstall +LIBRARIES += win32/Qt.conf \ + $$OUT_PWD/../lib/zeiterfassunglib.dll \ + $$[QT_INSTALL_BINS]/Qt5Core$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/Qt5Gui$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/Qt5Network$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/Qt5Widgets$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_BINS]/libgcc_s_dw2-1.dll \ + $$[QT_INSTALL_BINS]/libstdc++-6.dll \ + $$[QT_INSTALL_BINS]/libwinpthread-1.dll -iconenginesinstall.path = $$DESTDIR/plugins/iconengines -iconenginesinstall.files = $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon$${DEBUG_SIGN}.dll -INSTALLS += iconenginesinstall +copy_libraries.input = LIBRARIES +copy_libraries.output = $${DESTDIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_libraries.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_libraries.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_libraries +PRE_TARGETDEPS += compiler_copy_libraries_make_all -imageformatsinstall.path = $$DESTDIR/plugins/imageformats -imageformatsinstall.files = $$[QT_INSTALL_PLUGINS]/imageformats/qdds$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qicns$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qico$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qtga$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qwbmp$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${DEBUG_SIGN}.dll -INSTALLS += imageformatsinstall +IMAGE_FORMATS += $$[QT_INSTALL_PLUGINS]/imageformats/qdds$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qicns$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qico$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qtga$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qwbmp$${DEBUG_SIGN}.dll \ + $$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${DEBUG_SIGN}.dll -platformsinstall.path = $$DESTDIR/plugins/platforms -win32: platformsinstall.files = $$[QT_INSTALL_PLUGINS]/platforms/qwindows$${DEBUG_SIGN}.dll -INSTALLS += platformsinstall +copy_image_formats.input = IMAGE_FORMATS +copy_image_formats.output = $${DESTDIR}/plugins/imageformats/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_image_formats.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_image_formats.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_image_formats +PRE_TARGETDEPS += compiler_copy_image_formats_make_all + +PLATFORMS += $$[QT_INSTALL_PLUGINS]/platforms/qwindows$${DEBUG_SIGN}.dll + +copy_platforms.input = PLATFORMS +copy_platforms.output = $${DESTDIR}/plugins/platforms/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} +copy_platforms.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_platforms.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += copy_platforms +PRE_TARGETDEPS += compiler_copy_platforms_make_all diff --git a/zeiterfassung/zeiterfassung.pro b/zeiterfassung/zeiterfassung.pro index a4214f7..23b76b5 100755 --- a/zeiterfassung/zeiterfassung.pro +++ b/zeiterfassung/zeiterfassung.pro @@ -27,8 +27,8 @@ FORMS += strips/bookingstartstrip.ui \ RESOURCES += -TRANSLATIONS += translations/zeiterfassung_en.ts \ - translations/zeiterfassung_de.ts +TRANSLATIONS += translations/zeiterfassung_en.ts \ + translations/zeiterfassung_de.ts include(../lrelease.pri) -- 2.50.1 From a16498283aad593336a40cb8ac71ad13081c2f8d Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Sat, 16 Dec 2017 21:11:06 +0100 Subject: [PATCH 12/15] Moved presence functionality from mainWindow into plugin --- plugins/lunchmealplugin/lunchmealplugin.cpp | 5 -- plugins/lunchmealplugin/lunchmealplugin.h | 1 - plugins/presenceplugin/presenceplugin.cpp | 13 ++-- plugins/presenceplugin/presenceplugin.h | 4 +- plugins/presenceplugin/presenceplugin.pro | 6 +- plugins/presenceplugin/presencewidget.cpp | 77 +++++++++++++++++++ plugins/presenceplugin/presencewidget.h | 31 ++++++++ plugins/weatherplugin/weatherplugin.cpp | 5 -- plugins/weatherplugin/weatherplugin.h | 1 - zeiterfassung/main.cpp | 8 +- zeiterfassunglib/mainwindow.cpp | 84 ++++++++++----------- zeiterfassunglib/mainwindow.h | 16 ++-- zeiterfassunglib/mainwindow.ui | 12 +-- zeiterfassunglib/zeiterfassungplugin.h | 6 +- 14 files changed, 192 insertions(+), 77 deletions(-) create mode 100644 plugins/presenceplugin/presencewidget.cpp create mode 100644 plugins/presenceplugin/presencewidget.h diff --git a/plugins/lunchmealplugin/lunchmealplugin.cpp b/plugins/lunchmealplugin/lunchmealplugin.cpp index 3e8e278..e1b1b92 100644 --- a/plugins/lunchmealplugin/lunchmealplugin.cpp +++ b/plugins/lunchmealplugin/lunchmealplugin.cpp @@ -7,8 +7,3 @@ LunchMealPlugin::LunchMealPlugin(QObject *parent) : { } - -void LunchMealPlugin::initialize() -{ - qDebug() << "called"; -} diff --git a/plugins/lunchmealplugin/lunchmealplugin.h b/plugins/lunchmealplugin/lunchmealplugin.h index 9befa20..e73e062 100644 --- a/plugins/lunchmealplugin/lunchmealplugin.h +++ b/plugins/lunchmealplugin/lunchmealplugin.h @@ -15,7 +15,6 @@ public: explicit LunchMealPlugin(QObject *parent = 0); // ZeiterfassungPlugin interface - void initialize() Q_DECL_OVERRIDE; }; #endif // LUNCHMEALPLUGIN_H diff --git a/plugins/presenceplugin/presenceplugin.cpp b/plugins/presenceplugin/presenceplugin.cpp index d0a3f5f..0560bb6 100644 --- a/plugins/presenceplugin/presenceplugin.cpp +++ b/plugins/presenceplugin/presenceplugin.cpp @@ -2,13 +2,16 @@ #include +#include "mainwindow.h" +#include "presencewidget.h" + PresencePlugin::PresencePlugin(QObject *parent) : ZeiterfassungPlugin(parent) -{ - -} - -void PresencePlugin::initialize() { qDebug() << "called"; } + +void PresencePlugin::attachTo(MainWindow &mainWindow) +{ + new PresenceWidget(mainWindow); +} diff --git a/plugins/presenceplugin/presenceplugin.h b/plugins/presenceplugin/presenceplugin.h index c90e0ea..5ccdc86 100644 --- a/plugins/presenceplugin/presenceplugin.h +++ b/plugins/presenceplugin/presenceplugin.h @@ -5,6 +5,8 @@ #include "zeiterfassungplugin.h" +class MainWindow; + class Q_DECL_EXPORT PresencePlugin : public ZeiterfassungPlugin { Q_OBJECT @@ -15,7 +17,7 @@ public: explicit PresencePlugin(QObject *parent = 0); // ZeiterfassungPlugin interface - void initialize() Q_DECL_OVERRIDE; + void attachTo(MainWindow &mainWindow); }; #endif // PRESENCEPLUGIN_H diff --git a/plugins/presenceplugin/presenceplugin.pro b/plugins/presenceplugin/presenceplugin.pro index 9ad4afb..7767bfe 100644 --- a/plugins/presenceplugin/presenceplugin.pro +++ b/plugins/presenceplugin/presenceplugin.pro @@ -14,8 +14,10 @@ DEPENDPATH += $$PWD/../../zeiterfassunglib DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT -HEADERS += presenceplugin.h +HEADERS += presenceplugin.h \ + presencewidget.h -SOURCES += presenceplugin.cpp +SOURCES += presenceplugin.cpp \ + presencewidget.cpp OTHER_FILES += presenceplugin.json diff --git a/plugins/presenceplugin/presencewidget.cpp b/plugins/presenceplugin/presencewidget.cpp new file mode 100644 index 0000000..05d6223 --- /dev/null +++ b/plugins/presenceplugin/presencewidget.cpp @@ -0,0 +1,77 @@ +#include "presencewidget.h" + +#include +#include +#include +#include +#include + +#include "mainwindow.h" +#include "zeiterfassungapi.h" + +PresenceWidget::PresenceWidget(MainWindow &mainWindow) : + QWidget(&mainWindow), + m_mainWindow(mainWindow) +{ + m_labelAvailable = new QLabel(this); + m_labelAvailable->setFrameShape(QFrame::Panel); + m_labelAvailable->setFrameShadow(QFrame::Sunken); + m_mainWindow.statusBar()->addWidget(m_labelAvailable); + + m_labelNotAvailable = new QLabel(this); + m_labelNotAvailable->setFrameShape(QFrame::Panel); + m_labelNotAvailable->setFrameShadow(QFrame::Sunken); + m_mainWindow.statusBar()->addWidget(m_labelNotAvailable); + + auto timer = new QTimer(this); + timer->setInterval(60000); + connect(timer, &QTimer::timeout, this, &PresenceWidget::timeout); + timer->start(); + + timeout(); +} + +void PresenceWidget::timeout() +{ + if(m_reply) + { + qWarning() << "last request not finished yet!"; + return; + } + + m_labelAvailable->setText(tr("%0: %1").arg(tr("Available")).arg(tr("???"))); + m_labelNotAvailable->setText(tr("%0: %1").arg(tr("Not available")).arg(tr("???"))); + + m_reply = m_mainWindow.erfassung().doGetPresenceStatus(); + connect(m_reply.get(), &ZeiterfassungReply::finished, this, &PresenceWidget::finished); +} + +void PresenceWidget::finished() +{ + if(!m_reply->success()) + { + QMessageBox::warning(&m_mainWindow, tr("Could not get presence status!"), + tr("Could not get presence status!") % "\n\n" % m_reply->message()); + goto after; + } + + { + int available = 0, + notAvailable = 0; + for(const auto &status : m_reply->presenceStatuses()) + { + if(status.presence == QStringLiteral("J")) + available++; + else if(status.presence == QStringLiteral("N")) + notAvailable++; + else + qWarning() << "unknown presence" << status.firstName << status.lastName << status.presence; + } + + m_labelAvailable->setText(tr("%0: %1").arg(tr("Available")).arg(available)); + m_labelNotAvailable->setText(tr("%0: %1").arg(tr("Not available")).arg(notAvailable)); + } + + after: + m_reply = Q_NULLPTR; +} diff --git a/plugins/presenceplugin/presencewidget.h b/plugins/presenceplugin/presencewidget.h new file mode 100644 index 0000000..2c1e578 --- /dev/null +++ b/plugins/presenceplugin/presencewidget.h @@ -0,0 +1,31 @@ +#ifndef PRESENCEWIDGET_H +#define PRESENCEWIDGET_H + +#include + +#include "replies/getpresencestatusreply.h" + +class QLabel; + +class MainWindow; + +class PresenceWidget : public QWidget +{ + Q_OBJECT +public: + explicit PresenceWidget(MainWindow &mainWindow); + +private Q_SLOTS: + void timeout(); + void finished(); + +private: + MainWindow &m_mainWindow; + + QLabel *m_labelAvailable; + QLabel *m_labelNotAvailable; + + std::unique_ptr m_reply; +}; + +#endif // PRESENCEWIDGET_H diff --git a/plugins/weatherplugin/weatherplugin.cpp b/plugins/weatherplugin/weatherplugin.cpp index 1fdfc72..0be043f 100644 --- a/plugins/weatherplugin/weatherplugin.cpp +++ b/plugins/weatherplugin/weatherplugin.cpp @@ -7,8 +7,3 @@ WeatherPlugin::WeatherPlugin(QObject *parent) : { } - -void WeatherPlugin::initialize() -{ - qDebug() << "called"; -} diff --git a/plugins/weatherplugin/weatherplugin.h b/plugins/weatherplugin/weatherplugin.h index 933fdbd..9db873d 100644 --- a/plugins/weatherplugin/weatherplugin.h +++ b/plugins/weatherplugin/weatherplugin.h @@ -15,7 +15,6 @@ public: explicit WeatherPlugin(QObject *parent = 0); // ZeiterfassungPlugin interface - void initialize() Q_DECL_OVERRIDE; }; #endif // WEATHERPLUGIN_H diff --git a/zeiterfassung/main.cpp b/zeiterfassung/main.cpp index b9a2965..4075122 100755 --- a/zeiterfassung/main.cpp +++ b/zeiterfassung/main.cpp @@ -33,6 +33,8 @@ struct { QTranslator zeiterfassunglibTranslator; } translators; +QVector plugins; + bool loadAndInstallTranslator(QTranslator &translator, const QLocale &locale, const QString &filename, @@ -315,7 +317,7 @@ bool loadPlugins(QSplashScreen &splashScreen) continue; } - plugin->initialize(); + plugins.append(plugin); } return ok; @@ -377,6 +379,10 @@ int main(int argc, char *argv[]) MainWindow mainWindow(settings, erfassung, userInfo, stripFactory); splashScreen.finish(&mainWindow); + + for(auto plugin : plugins) + plugin->attachTo(mainWindow); + mainWindow.show(); return app.exec(); diff --git a/zeiterfassunglib/mainwindow.cpp b/zeiterfassunglib/mainwindow.cpp index b1423bb..723cd98 100644 --- a/zeiterfassunglib/mainwindow.cpp +++ b/zeiterfassunglib/mainwindow.cpp @@ -48,8 +48,7 @@ MainWindow::MainWindow(ZeiterfassungSettings &settings, ZeiterfassungApi &erfass m_getAuswertungReply(Q_NULLPTR), m_bookingsModel(new BookingsModel(this)), m_timeAssignmentsModel(new TimeAssignmentsModel(this)), - m_currentStripWidget(Q_NULLPTR), - m_getPresenceStatusReply(Q_NULLPTR) + m_currentStripWidget(Q_NULLPTR) { ui->setupUi(this); @@ -108,10 +107,6 @@ MainWindow::MainWindow(ZeiterfassungSettings &settings, ZeiterfassungApi &erfass connect(m_timeAssignmentsModel, &TimeAssignmentsModel::enabledChanged, ui->treeViewTimeAssignments, &QWidget::setEnabled); connect(ui->treeViewTimeAssignments, &QWidget::customContextMenuRequested, this, &MainWindow::contextMenuTimeAssignment); - ui->statusbar->addWidget(m_presenceLabel = new QLabel(tr("???"), ui->statusbar)); - m_presenceLabel->setFrameShape(QFrame::Panel); - m_presenceLabel->setFrameShadow(QFrame::Sunken); - ui->statusbar->addPermanentWidget(m_balanceLabel = new QLabel(ui->statusbar)); m_balanceLabel->setFrameShape(QFrame::Panel); m_balanceLabel->setFrameShadow(QFrame::Sunken); @@ -121,15 +116,6 @@ MainWindow::MainWindow(ZeiterfassungSettings &settings, ZeiterfassungApi &erfass dateChanged(); - { - auto timer = new QTimer(this); - timer->setInterval(60000); - connect(timer, &QTimer::timeout, this, &MainWindow::refreshPresence); - timer->start(); - } - - refreshPresence(); - if(settings.lastUpdateCheck().isNull() || settings.lastUpdateCheck() < QDate::currentDate()) new UpdateDialog(settings, erfassung.manager(), this); } @@ -139,6 +125,46 @@ MainWindow::~MainWindow() delete ui; } +QMenu *MainWindow::menuFile() const +{ + return ui->menuFile; +} + +QMenu *MainWindow::menuView() const +{ + return ui->menuView; +} + +QMenu *MainWindow::menuTools() const +{ + return ui->menuTools; +} + +QMenu *MainWindow::menuAbout() const +{ + return ui->menuAbout; +} + +ZeiterfassungSettings &MainWindow::settings() const +{ + return m_settings; +} + +ZeiterfassungApi &MainWindow::erfassung() const +{ + return m_erfassung; +} + +const ZeiterfassungApi::UserInfo &MainWindow::userInfo() const +{ + return m_userInfo; +} + +StripFactory &MainWindow::stripFactory() const +{ + return m_stripFactory; +} + void MainWindow::getProjectsFinished() { if(m_getProjectsReply->success()) @@ -663,34 +689,6 @@ void MainWindow::openAuswertung() } } -void MainWindow::refreshPresence() -{ - m_presenceLabel->setText(tr("???")); - - m_getPresenceStatusReply = m_erfassung.doGetPresenceStatus(); - connect(m_getPresenceStatusReply.get(), &ZeiterfassungReply::finished, this, &MainWindow::getPresenceStatusFinished); -} - -void MainWindow::getPresenceStatusFinished() -{ - if(m_getPresenceStatusReply->success()) - { - QMap counts; - for(const auto &presenceStatus : m_getPresenceStatusReply->presenceStatuses()) - counts[presenceStatus.presence]++; - QString text; - for(auto iter = counts.constBegin(); iter != counts.constEnd(); iter++) - { - if(!text.isEmpty()) - text.append(' '); - text.append(QStringLiteral("%0: %1").arg(iter.key()).arg(iter.value())); - } - m_presenceLabel->setText(text); - } - - m_getPresenceStatusReply = Q_NULLPTR; -} - void MainWindow::minimumTimeChanged() { ui->timeEditTime->setMinimumTime(m_currentStripWidget->minimumTime()); diff --git a/zeiterfassunglib/mainwindow.h b/zeiterfassunglib/mainwindow.h index 37817a7..8de3dcd 100644 --- a/zeiterfassunglib/mainwindow.h +++ b/zeiterfassunglib/mainwindow.h @@ -31,6 +31,16 @@ public: StripFactory &stripFactory, QWidget *parent = Q_NULLPTR); ~MainWindow(); + QMenu *menuFile() const; + QMenu *menuView() const; + QMenu *menuTools() const; + QMenu *menuAbout() const; + + ZeiterfassungSettings &settings() const; + ZeiterfassungApi &erfassung() const; + const ZeiterfassungApi::UserInfo &userInfo() const; + StripFactory &stripFactory() const; + private Q_SLOTS: void getProjectsFinished(); void getAuswertungFinished(); @@ -40,8 +50,6 @@ private Q_SLOTS: void pushButtonEndPressed(); void dateChanged(bool force = false); void openAuswertung(); - void refreshPresence(); - void getPresenceStatusFinished(); void minimumTimeChanged(); void refreshingChanged(); @@ -69,15 +77,11 @@ private: QDate m_auswertungDate; QByteArray m_auswertung; - QLabel *m_presenceLabel; - QLabel *m_balanceLabel; QLabel *m_holidaysLabel; std::array m_stripsWidgets; StripsWidget *m_currentStripWidget; - - std::unique_ptr m_getPresenceStatusReply; }; #endif // MAINWINDOW_H diff --git a/zeiterfassunglib/mainwindow.ui b/zeiterfassunglib/mainwindow.ui index 9ea7fe6..1097f45 100644 --- a/zeiterfassunglib/mainwindow.ui +++ b/zeiterfassunglib/mainwindow.ui @@ -251,7 +251,7 @@ - + &About @@ -262,23 +262,23 @@ - + &View - + &Tools - - - + + + diff --git a/zeiterfassunglib/zeiterfassungplugin.h b/zeiterfassunglib/zeiterfassungplugin.h index f893180..33eee20 100644 --- a/zeiterfassunglib/zeiterfassungplugin.h +++ b/zeiterfassunglib/zeiterfassungplugin.h @@ -5,6 +5,9 @@ #include "zeiterfassunglib_global.h" +class MainWindow; +class StripsWidget; + class ZEITERFASSUNGLIBSHARED_EXPORT ZeiterfassungPlugin : public QObject { Q_OBJECT @@ -12,7 +15,8 @@ class ZEITERFASSUNGLIBSHARED_EXPORT ZeiterfassungPlugin : public QObject public: explicit ZeiterfassungPlugin(QObject *parent = 0); - virtual void initialize() = 0; + virtual void attachTo(MainWindow &mainWindow) { Q_UNUSED(mainWindow) } + virtual void attachTo(StripsWidget &stripsWidget) { Q_UNUSED(stripsWidget) } }; Q_DECLARE_INTERFACE(ZeiterfassungPlugin, "dbsoftware.zeiterfassung.plugin/1.0") -- 2.50.1 From a1138041f06e1941ebbf28bef6014c700c921e3b Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Sun, 17 Dec 2017 16:26:16 +0100 Subject: [PATCH 13/15] Moved structs into their correct reply classes --- zeiterfassung/main.cpp | 6 +- .../translations/zeiterfassung_de.ts | 70 ++--- .../translations/zeiterfassung_en.ts | 70 ++--- zeiterfassunglib/dialogs/aboutmedialog.cpp | 5 +- zeiterfassunglib/dialogs/aboutmedialog.h | 5 +- zeiterfassunglib/mainwindow.cpp | 5 +- zeiterfassunglib/mainwindow.h | 8 +- zeiterfassunglib/replies/getbookingsreply.cpp | 4 +- zeiterfassunglib/replies/getbookingsreply.h | 17 +- .../replies/getpresencestatusreply.cpp | 4 +- .../replies/getpresencestatusreply.h | 15 +- zeiterfassunglib/replies/getprojectsreply.cpp | 4 +- zeiterfassunglib/replies/getprojectsreply.h | 13 +- .../replies/gettimeassignmentsreply.cpp | 4 +- .../replies/gettimeassignmentsreply.h | 19 +- ...userinforeply.cpp => getuserinforeply.cpp} | 12 +- zeiterfassunglib/replies/getuserinforeply.h | 39 +++ zeiterfassunglib/replies/userinforeply.h | 29 -- zeiterfassunglib/stripswidget.cpp | 7 +- zeiterfassunglib/stripswidget.h | 14 +- .../translations/zeiterfassunglib_de.ts | 264 +++++++++--------- .../translations/zeiterfassunglib_en.ts | 264 +++++++++--------- zeiterfassunglib/zeiterfassungapi.cpp | 8 +- zeiterfassunglib/zeiterfassungapi.h | 49 +--- zeiterfassunglib/zeiterfassunglib.pro | 8 +- 25 files changed, 478 insertions(+), 465 deletions(-) rename zeiterfassunglib/replies/{userinforeply.cpp => getuserinforeply.cpp} (83%) create mode 100644 zeiterfassunglib/replies/getuserinforeply.h delete mode 100644 zeiterfassunglib/replies/userinforeply.h diff --git a/zeiterfassung/main.cpp b/zeiterfassung/main.cpp index 4075122..c4580fa 100755 --- a/zeiterfassung/main.cpp +++ b/zeiterfassung/main.cpp @@ -24,7 +24,7 @@ #include "mainwindow.h" #include "replies/loginpagereply.h" #include "replies/loginreply.h" -#include "replies/userinforeply.h" +#include "replies/getuserinforeply.h" #include "stripfactory.h" struct { @@ -250,7 +250,7 @@ bool doAuthentication(QSplashScreen &splashScreen, ZeiterfassungSettings &settin return true; } -bool loadUserInfo(QSplashScreen &splashScreen, ZeiterfassungApi &erfassung, ZeiterfassungApi::UserInfo &userInfo) +bool loadUserInfo(QSplashScreen &splashScreen, ZeiterfassungApi &erfassung, GetUserInfoReply::UserInfo &userInfo) { splashScreen.showMessage(QCoreApplication::translate("main", "Getting user information...")); @@ -370,7 +370,7 @@ int main(int argc, char *argv[]) if(!doAuthentication(splashScreen, settings, erfassung)) return -5; - ZeiterfassungApi::UserInfo userInfo; + GetUserInfoReply::UserInfo userInfo; if(!loadUserInfo(splashScreen, erfassung, userInfo)) return -6; diff --git a/zeiterfassung/translations/zeiterfassung_de.ts b/zeiterfassung/translations/zeiterfassung_de.ts index 40cbf92..9206edb 100644 --- a/zeiterfassung/translations/zeiterfassung_de.ts +++ b/zeiterfassung/translations/zeiterfassung_de.ts @@ -20,113 +20,113 @@ main - + Loading settings... Lade Einstellungen... - + Loading translations... Lade Übersetzungen... - - + + Invalid language selection! Ungültige Sprachauswahl! - + You did not select a valid language! Sie haben keine gültige Sprachauswahl getroffen! - + Loading theme... Lade Aussehen... - - - - + + + + Could not load theme! Konnte Aussehen nicht laden! - + Theme file does not exist! Aussehen-Datei existiert nicht! - + Loading login page... Lade Login-Seite... - - + + Could not access Zeiterfassung! Konnte Zeiterfassung nicht erreichen! - + Base url Basis URL - + Please enter the base url to the Zeiterfassung: Bitte geben Sie die Basis URL zur Zeiterfassung ein: - + Authenticating... Authentifiziere... - - + + Could not authenticate with Zeiterfassung! Konnte nicht mit Zeiterfassung authentifizieren! - + Getting user information... Hole Benutzer Information... - - + + Could not get user information! Konnte Benutzer Information nicht holen! - - + + Could not load plugin %0! Konnte Plugin %0 nicht laden! - - + + Plugin not valid %0! Plugin %0 nicht gültig! - + Loading strip layouts... Lade Streifenlayouts... - - - - - - - - + + + + + + + + Could not load strips! Konnte Streifenlayouts nicht laden! diff --git a/zeiterfassung/translations/zeiterfassung_en.ts b/zeiterfassung/translations/zeiterfassung_en.ts index 332fdf7..81507c1 100644 --- a/zeiterfassung/translations/zeiterfassung_en.ts +++ b/zeiterfassung/translations/zeiterfassung_en.ts @@ -20,113 +20,113 @@ main - + Loading settings... - + Loading translations... - - + + Invalid language selection! - + You did not select a valid language! - + Loading theme... - - - - + + + + Could not load theme! - + Theme file does not exist! - + Loading login page... - - + + Could not access Zeiterfassung! - + Base url - + Please enter the base url to the Zeiterfassung: - + Authenticating... - - + + Could not authenticate with Zeiterfassung! - + Getting user information... - - + + Could not get user information! - - + + Could not load plugin %0! - - + + Plugin not valid %0! - + Loading strip layouts... - - - - - - - - + + + + + + + + Could not load strips! diff --git a/zeiterfassunglib/dialogs/aboutmedialog.cpp b/zeiterfassunglib/dialogs/aboutmedialog.cpp index 9747cb6..338a67b 100644 --- a/zeiterfassunglib/dialogs/aboutmedialog.cpp +++ b/zeiterfassunglib/dialogs/aboutmedialog.cpp @@ -1,10 +1,9 @@ #include "aboutmedialog.h" #include "ui_aboutmedialog.h" -AboutMeDialog::AboutMeDialog(const ZeiterfassungApi::UserInfo &userInfo, QWidget *parent) : +AboutMeDialog::AboutMeDialog(const GetUserInfoReply::UserInfo &userInfo, QWidget *parent) : QDialog(parent), - ui(new Ui::AboutMeDialog), - m_userInfo(userInfo) + ui(new Ui::AboutMeDialog) { ui->setupUi(this); diff --git a/zeiterfassunglib/dialogs/aboutmedialog.h b/zeiterfassunglib/dialogs/aboutmedialog.h index 2297c13..d33fbd4 100644 --- a/zeiterfassunglib/dialogs/aboutmedialog.h +++ b/zeiterfassunglib/dialogs/aboutmedialog.h @@ -4,7 +4,7 @@ #include #include "zeiterfassunglib_global.h" -#include "zeiterfassungapi.h" +#include "replies/getuserinforeply.h" namespace Ui { class AboutMeDialog; } @@ -13,12 +13,11 @@ class ZEITERFASSUNGLIBSHARED_EXPORT AboutMeDialog : public QDialog Q_OBJECT public: - explicit AboutMeDialog(const ZeiterfassungApi::UserInfo &userInfo, QWidget *parent = Q_NULLPTR); + explicit AboutMeDialog(const GetUserInfoReply::UserInfo &userInfo, QWidget *parent = Q_NULLPTR); ~AboutMeDialog(); private: Ui::AboutMeDialog *ui; - const ZeiterfassungApi::UserInfo &m_userInfo; }; #endif // ABOUTMEDIALOG_H diff --git a/zeiterfassunglib/mainwindow.cpp b/zeiterfassunglib/mainwindow.cpp index 723cd98..da35f4b 100644 --- a/zeiterfassunglib/mainwindow.cpp +++ b/zeiterfassunglib/mainwindow.cpp @@ -15,6 +15,7 @@ #include #include +#include "zeiterfassungapi.h" #include "timeutils.h" #include "zeiterfassungsettings.h" #include "stripfactory.h" @@ -36,7 +37,7 @@ #include "replies/createtimeassignmentreply.h" #include "replies/createbookingreply.h" -MainWindow::MainWindow(ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung, const ZeiterfassungApi::UserInfo &userInfo, +MainWindow::MainWindow(ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung, const GetUserInfoReply::UserInfo &userInfo, StripFactory &stripFactory, QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), @@ -155,7 +156,7 @@ ZeiterfassungApi &MainWindow::erfassung() const return m_erfassung; } -const ZeiterfassungApi::UserInfo &MainWindow::userInfo() const +const GetUserInfoReply::UserInfo &MainWindow::userInfo() const { return m_userInfo; } diff --git a/zeiterfassunglib/mainwindow.h b/zeiterfassunglib/mainwindow.h index 8de3dcd..a41e9cc 100644 --- a/zeiterfassunglib/mainwindow.h +++ b/zeiterfassunglib/mainwindow.h @@ -7,7 +7,7 @@ #include #include "zeiterfassunglib_global.h" -#include "zeiterfassungapi.h" +#include "replies/getuserinforeply.h" #include "replies/getprojectsreply.h" #include "replies/getauswertungreply.h" #include "replies/getpresencestatusreply.h" @@ -27,7 +27,7 @@ class ZEITERFASSUNGLIBSHARED_EXPORT MainWindow : public QMainWindow Q_OBJECT public: - explicit MainWindow(ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung, const ZeiterfassungApi::UserInfo &userInfo, + explicit MainWindow(ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung, const GetUserInfoReply::UserInfo &userInfo, StripFactory &stripFactory, QWidget *parent = Q_NULLPTR); ~MainWindow(); @@ -38,7 +38,7 @@ public: ZeiterfassungSettings &settings() const; ZeiterfassungApi &erfassung() const; - const ZeiterfassungApi::UserInfo &userInfo() const; + const GetUserInfoReply::UserInfo &userInfo() const; StripFactory &stripFactory() const; private Q_SLOTS: @@ -63,7 +63,7 @@ private: Ui::MainWindow *ui; ZeiterfassungSettings &m_settings; ZeiterfassungApi &m_erfassung; - const ZeiterfassungApi::UserInfo &m_userInfo; + const GetUserInfoReply::UserInfo &m_userInfo; StripFactory &m_stripFactory; std::unique_ptr m_getProjectsReply; diff --git a/zeiterfassunglib/replies/getbookingsreply.cpp b/zeiterfassunglib/replies/getbookingsreply.cpp index d08704a..b7941fa 100644 --- a/zeiterfassunglib/replies/getbookingsreply.cpp +++ b/zeiterfassunglib/replies/getbookingsreply.cpp @@ -6,6 +6,8 @@ #include #include +#include "zeiterfassungapi.h" + GetBookingsReply::GetBookingsReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung) : ZeiterfassungReply(zeiterfassung), m_reply(std::move(reply)) @@ -13,7 +15,7 @@ GetBookingsReply::GetBookingsReply(std::unique_ptr &&reply, Zeite connect(m_reply.get(), &QNetworkReply::finished, this, &GetBookingsReply::requestFinished); } -const QVector &GetBookingsReply::bookings() const +const QVector &GetBookingsReply::bookings() const { return m_bookings; } diff --git a/zeiterfassunglib/replies/getbookingsreply.h b/zeiterfassunglib/replies/getbookingsreply.h index e60c8d7..59344b9 100644 --- a/zeiterfassunglib/replies/getbookingsreply.h +++ b/zeiterfassunglib/replies/getbookingsreply.h @@ -8,7 +8,8 @@ #include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -#include "zeiterfassungapi.h" + +class ZeiterfassungApi; class ZEITERFASSUNGLIBSHARED_EXPORT GetBookingsReply : public ZeiterfassungReply { @@ -17,14 +18,24 @@ class ZEITERFASSUNGLIBSHARED_EXPORT GetBookingsReply : public ZeiterfassungReply public: GetBookingsReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung); - const QVector &bookings() const; + struct Booking + { + int id; + QDate date; + QTime time; + QTime timespan; + QString type; + QString text; + }; + + const QVector &bookings() const; private Q_SLOTS: void requestFinished(); private: std::unique_ptr m_reply; - QVector m_bookings; + QVector m_bookings; }; #endif // GETBOOKINGSREPLY_H diff --git a/zeiterfassunglib/replies/getpresencestatusreply.cpp b/zeiterfassunglib/replies/getpresencestatusreply.cpp index de95aa3..5ee41db 100644 --- a/zeiterfassunglib/replies/getpresencestatusreply.cpp +++ b/zeiterfassunglib/replies/getpresencestatusreply.cpp @@ -6,6 +6,8 @@ #include #include +#include "zeiterfassungapi.h" + GetPresenceStatusReply::GetPresenceStatusReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung) : ZeiterfassungReply(zeiterfassung), m_reply(std::move(reply)) @@ -13,7 +15,7 @@ GetPresenceStatusReply::GetPresenceStatusReply(std::unique_ptr && connect(m_reply.get(), &QNetworkReply::finished, this, &GetPresenceStatusReply::requestFinished); } -const QVector &GetPresenceStatusReply::presenceStatuses() const +const QVector &GetPresenceStatusReply::presenceStatuses() const { return m_presenceStatuses; } diff --git a/zeiterfassunglib/replies/getpresencestatusreply.h b/zeiterfassunglib/replies/getpresencestatusreply.h index 730b2fb..e220379 100644 --- a/zeiterfassunglib/replies/getpresencestatusreply.h +++ b/zeiterfassunglib/replies/getpresencestatusreply.h @@ -7,7 +7,8 @@ #include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -#include "zeiterfassungapi.h" + +class ZeiterfassungApi; class ZEITERFASSUNGLIBSHARED_EXPORT GetPresenceStatusReply : public ZeiterfassungReply { @@ -16,14 +17,22 @@ class ZEITERFASSUNGLIBSHARED_EXPORT GetPresenceStatusReply : public Zeiterfassun public: explicit GetPresenceStatusReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung); - const QVector &presenceStatuses() const; + struct PresenceStatus + { + int userId; + QString firstName; + QString lastName; + QString presence; + }; + + const QVector &presenceStatuses() const; private Q_SLOTS: void requestFinished(); private: std::unique_ptr m_reply; - QVector m_presenceStatuses; + QVector m_presenceStatuses; }; #endif // GETPRESENCESTATUSREPLY_H diff --git a/zeiterfassunglib/replies/getprojectsreply.cpp b/zeiterfassunglib/replies/getprojectsreply.cpp index 9c18ebb..1800d10 100644 --- a/zeiterfassunglib/replies/getprojectsreply.cpp +++ b/zeiterfassunglib/replies/getprojectsreply.cpp @@ -6,6 +6,8 @@ #include #include +#include "zeiterfassungapi.h" + GetProjectsReply::GetProjectsReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung) : ZeiterfassungReply(zeiterfassung), m_reply(std::move(reply)) @@ -13,7 +15,7 @@ GetProjectsReply::GetProjectsReply(std::unique_ptr &&reply, Zeite connect(m_reply.get(), &QNetworkReply::finished, this, &GetProjectsReply::requestFinished); } -const QVector &GetProjectsReply::projects() const +const QVector &GetProjectsReply::projects() const { return m_projects; } diff --git a/zeiterfassunglib/replies/getprojectsreply.h b/zeiterfassunglib/replies/getprojectsreply.h index 5aa5c23..576728a 100644 --- a/zeiterfassunglib/replies/getprojectsreply.h +++ b/zeiterfassunglib/replies/getprojectsreply.h @@ -8,7 +8,8 @@ #include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -#include "zeiterfassungapi.h" + +class ZeiterfassungApi; class ZEITERFASSUNGLIBSHARED_EXPORT GetProjectsReply : public ZeiterfassungReply { @@ -17,14 +18,20 @@ class ZEITERFASSUNGLIBSHARED_EXPORT GetProjectsReply : public ZeiterfassungReply public: GetProjectsReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung); - const QVector &projects() const; + struct Project + { + QString label; + QString value; + }; + + const QVector &projects() const; private Q_SLOTS: void requestFinished(); private: std::unique_ptr m_reply; - QVector m_projects; + QVector m_projects; }; #endif // GETPROJECTSREPLY_H diff --git a/zeiterfassunglib/replies/gettimeassignmentsreply.cpp b/zeiterfassunglib/replies/gettimeassignmentsreply.cpp index 9d04093..a4b62ef 100644 --- a/zeiterfassunglib/replies/gettimeassignmentsreply.cpp +++ b/zeiterfassunglib/replies/gettimeassignmentsreply.cpp @@ -7,6 +7,8 @@ #include #include +#include "zeiterfassungapi.h" + GetTimeAssignmentsReply::GetTimeAssignmentsReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung) : ZeiterfassungReply(zeiterfassung), m_reply(std::move(reply)) @@ -14,7 +16,7 @@ GetTimeAssignmentsReply::GetTimeAssignmentsReply(std::unique_ptr connect(m_reply.get(), &QNetworkReply::finished, this, &GetTimeAssignmentsReply::requestFinished); } -const QVector &GetTimeAssignmentsReply::timeAssignments() const +const QVector &GetTimeAssignmentsReply::timeAssignments() const { return m_timeAssignments; } diff --git a/zeiterfassunglib/replies/gettimeassignmentsreply.h b/zeiterfassunglib/replies/gettimeassignmentsreply.h index aa5355c..a335a70 100644 --- a/zeiterfassunglib/replies/gettimeassignmentsreply.h +++ b/zeiterfassunglib/replies/gettimeassignmentsreply.h @@ -8,7 +8,8 @@ #include "zeiterfassunglib_global.h" #include "zeiterfassungreply.h" -#include "zeiterfassungapi.h" + +class ZeiterfassungApi; class ZEITERFASSUNGLIBSHARED_EXPORT GetTimeAssignmentsReply : public ZeiterfassungReply { @@ -17,14 +18,26 @@ class ZEITERFASSUNGLIBSHARED_EXPORT GetTimeAssignmentsReply : public Zeiterfassu public: GetTimeAssignmentsReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung); - const QVector &timeAssignments() const; + struct TimeAssignment + { + int id; + QDate date; + QTime time; + QTime timespan; + QString text; + QString project; + QString subproject; + QString workpackage; + }; + + const QVector &timeAssignments() const; private Q_SLOTS: void requestFinished(); private: std::unique_ptr m_reply; - QVector m_timeAssignments; + QVector m_timeAssignments; }; #endif // GETTIMEASSIGNMENTSREPLY_H diff --git a/zeiterfassunglib/replies/userinforeply.cpp b/zeiterfassunglib/replies/getuserinforeply.cpp similarity index 83% rename from zeiterfassunglib/replies/userinforeply.cpp rename to zeiterfassunglib/replies/getuserinforeply.cpp index 4e45625..73d751b 100644 --- a/zeiterfassunglib/replies/userinforeply.cpp +++ b/zeiterfassunglib/replies/getuserinforeply.cpp @@ -1,23 +1,25 @@ -#include "userinforeply.h" +#include "getuserinforeply.h" #include #include #include #include -UserInfoReply::UserInfoReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung) : +#include "zeiterfassungapi.h" + +GetUserInfoReply::GetUserInfoReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung) : ZeiterfassungReply(zeiterfassung), m_reply(std::move(reply)) { - connect(m_reply.get(), &QNetworkReply::finished, this, &UserInfoReply::requestFinished); + connect(m_reply.get(), &QNetworkReply::finished, this, &GetUserInfoReply::requestFinished); } -const ZeiterfassungApi::UserInfo &UserInfoReply::userInfo() const +const GetUserInfoReply::UserInfo &GetUserInfoReply::userInfo() const { return m_userInfo; } -void UserInfoReply::requestFinished() +void GetUserInfoReply::requestFinished() { if(m_reply->error() != QNetworkReply::NoError) { diff --git a/zeiterfassunglib/replies/getuserinforeply.h b/zeiterfassunglib/replies/getuserinforeply.h new file mode 100644 index 0000000..30e2579 --- /dev/null +++ b/zeiterfassunglib/replies/getuserinforeply.h @@ -0,0 +1,39 @@ +#ifndef GETUSERINFOREPLY_H +#define GETUSERINFOREPLY_H + +#include + +#include + +#include "zeiterfassunglib_global.h" +#include "zeiterfassungreply.h" + +class ZeiterfassungApi; + +class ZEITERFASSUNGLIBSHARED_EXPORT GetUserInfoReply : public ZeiterfassungReply +{ + Q_OBJECT + +public: + GetUserInfoReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung); + + struct UserInfo + { + int userId; + QString email; + QString longUsername; + QString text; + QString username; + }; + + const UserInfo &userInfo() const; + +private Q_SLOTS: + void requestFinished(); + +private: + std::unique_ptr m_reply; + UserInfo m_userInfo; +}; + +#endif // GETUSERINFOREPLY_H diff --git a/zeiterfassunglib/replies/userinforeply.h b/zeiterfassunglib/replies/userinforeply.h deleted file mode 100644 index 3b7fc09..0000000 --- a/zeiterfassunglib/replies/userinforeply.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef USERINFOREPLY_H -#define USERINFOREPLY_H - -#include - -#include - -#include "zeiterfassunglib_global.h" -#include "zeiterfassungreply.h" -#include "zeiterfassungapi.h" - -class ZEITERFASSUNGLIBSHARED_EXPORT UserInfoReply : public ZeiterfassungReply -{ - Q_OBJECT - -public: - UserInfoReply(std::unique_ptr &&reply, ZeiterfassungApi *zeiterfassung); - - const ZeiterfassungApi::UserInfo &userInfo() const; - -private Q_SLOTS: - void requestFinished(); - -private: - std::unique_ptr m_reply; - ZeiterfassungApi::UserInfo m_userInfo; -}; - -#endif // USERINFOREPLY_H diff --git a/zeiterfassunglib/stripswidget.cpp b/zeiterfassunglib/stripswidget.cpp index 150a711..6b00f52 100644 --- a/zeiterfassunglib/stripswidget.cpp +++ b/zeiterfassunglib/stripswidget.cpp @@ -7,6 +7,7 @@ #include #include +#include "zeiterfassungapi.h" #include "timeutils.h" #include "stripfactory.h" @@ -40,12 +41,12 @@ void StripsWidget::setDate(const QDate &date) refresh(); } -const QVector &StripsWidget::bookings() const +const QVector &StripsWidget::bookings() const { return m_bookings; } -const QVector &StripsWidget::timeAssignments() const +const QVector &StripsWidget::timeAssignments() const { return m_timeAssignments; } @@ -167,7 +168,7 @@ bool StripsWidget::createStrips() auto bookingTimespan = QTime(0, 0); - const ZeiterfassungApi::Booking *lastBooking = Q_NULLPTR; + const GetBookingsReply::Booking *lastBooking = Q_NULLPTR; QString errorMessage; diff --git a/zeiterfassunglib/stripswidget.h b/zeiterfassunglib/stripswidget.h index 90614d2..8995538 100644 --- a/zeiterfassunglib/stripswidget.h +++ b/zeiterfassunglib/stripswidget.h @@ -7,7 +7,6 @@ #include #include "zeiterfassunglib_global.h" -#include "zeiterfassungapi.h" #include "replies/getbookingsreply.h" #include "replies/gettimeassignmentsreply.h" @@ -15,6 +14,7 @@ class QBoxLayout; template class QMap; template class QVector; +class ZeiterfassungApi; class StripFactory; class ZEITERFASSUNGLIBSHARED_EXPORT StripsWidget : public QWidget @@ -28,8 +28,8 @@ public: const QDate &date() const; void setDate(const QDate &date); - const QVector &bookings() const; - const QVector &timeAssignments() const; + const QVector &bookings() const; + const QVector &timeAssignments() const; const QTime &timeAssignmentTime() const; const QTime &lastTimeAssignmentStart() const; @@ -47,8 +47,8 @@ public: void clearStrips(); Q_SIGNALS: - void bookingsChanged(const QVector &bookings); - void timeAssignmentsChanged(const QVector &timeAssignments); + void bookingsChanged(const QVector &bookings); + void timeAssignmentsChanged(const QVector &timeAssignments); void timeAssignmentTimeChanged(const QTime &timeAssignmentTime); void lastTimeAssignmentStartChanged(const QTime &lastTimeAssignmentStart); @@ -82,8 +82,8 @@ private: QDate m_date; - QVector m_bookings; - QVector m_timeAssignments; + QVector m_bookings; + QVector m_timeAssignments; QTime m_timeAssignmentTime; QTime m_lastTimeAssignmentStart; diff --git a/zeiterfassunglib/translations/zeiterfassunglib_de.ts b/zeiterfassunglib/translations/zeiterfassunglib_de.ts index 7beaec5..db4389c 100644 --- a/zeiterfassunglib/translations/zeiterfassunglib_de.ts +++ b/zeiterfassunglib/translations/zeiterfassunglib_de.ts @@ -185,17 +185,17 @@ GetBookingsReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an array! @@ -203,17 +203,17 @@ GetPresenceStatusReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an array! @@ -221,27 +221,27 @@ GetProjectsReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an object! - + JSON does not contain elements! - + elements is not an array! @@ -249,21 +249,49 @@ GetTimeAssignmentsReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an array! + + GetUserInfoReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain evoAppsUser! + + + + + evoAppsUser is not an object! + + + LanguageSelectionDialog @@ -348,8 +376,8 @@ - - + + Start Kommen @@ -449,13 +477,13 @@ Zeiterfassung - %0 (%1) - - + + Could not open auswertung! - + Could not open default PDF viewer! Konnte den PDF-Anzeiger nicht öffnen! @@ -475,149 +503,147 @@ Text - - + + + - %0: %1 %0: %1 - - + - ??? ??? - - + + Balance Saldo - - + + Holidays Urlaubstage - - + + Could not load bookings! Konnte Buchungen nicht laden! - + Could not load Auswertung! - + %0h %0h - + Could not delete booking! Konnte Buchung nicht löschen! - + Edit booking Buchung bearbeiten - + Delete booking Buchung löschen - + Could not edit booking! Konnte Buchung nicht bearbeiten! - + Create booking Buchung erstellen - - + + n/a n/v - + Refresh bookings Buchungen aktualisieren - - - + + + Could not create booking! Konnte Buchung nicht erstellen! - + Do you really want to delete the booking? Möchten Sie die Buchung wirklich löschen? - + Refresh time assignments Kontierungen aktualisieren - + Edit time assignment Kontierung bearbeiten - + Delete time assignment Kontierung löschen - - - + + + Could not edit time assignment! Konnte Kontierung nicht bearbeiten! - + Do you really want to delete the time assignment? Möchten Sie die Kontierung wirklich löschen? - + Could not delete time assignment! Konnte Kontierung nicht löschen! - - + + %0 (%1) %0 (%1) - + Create time assignment Kontierung erstellen - - + + Could not create time assignment! Konnte Kontierung nicht erstellen! - - + + Switch Wechseln @@ -702,178 +728,178 @@ StripsWidget - + Loading... Lade... - + Missing booking! Kontierung fehlend! - + Expected start booking, instead got type %0 Booking ID: %1 - - + + %0: %1 %0: %1 - + Break Pause - - - + + + %0h %0h - - - - - + + + + + HH:mm HH:mm - + Missing time assignment! Kontierung fehlend! - - - + + + Expected %0 but received %1 in time assignment. Time assignment ID: %2 - - + - - + + - + + HH:mm:ss HH:mm:ss - - + + There is another booking after an unfinished time assignment. Booking ID: %0 Time assignment ID: %1 - - - + + + There is another time assignment after an unfinished time assignment. Time assignment ID: %0 Time assignment ID: %1 - + The last time assignment is finished without end booking Time assignment ID: %0 - + Expected end booking, instead got type %0 Booking ID: %1 - + Missing time assignment! Missing: %0 Kontierung fehlend! %0 nicht kontiert - + Assigned time Kontierte Zeit - + dd.MM.yyyy dd.MM.yyyy - + %0 (%1) %0 (%1) - + Time assignment time longer than booking time! Time assignment: %0 Booking: %1 - + Strip rendering aborted due error. Your bookings and time assignments for this day are in an illegal state! - + Monday Montag - + Tuesday Dienstag - + Wednesday Mittwoch - + Thursday Donnerstag - + Friday Freitag - + Saturday Samstag - + Sunday Sonntag - + Invalid Ungültig - + Open Offen @@ -1031,32 +1057,4 @@ Your bookings and time assignments for this day are in an illegal state! - - UserInfoReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain evoAppsUser! - - - - - evoAppsUser is not an object! - - - diff --git a/zeiterfassunglib/translations/zeiterfassunglib_en.ts b/zeiterfassunglib/translations/zeiterfassunglib_en.ts index b8bbd95..7fb33eb 100644 --- a/zeiterfassunglib/translations/zeiterfassunglib_en.ts +++ b/zeiterfassunglib/translations/zeiterfassunglib_en.ts @@ -185,17 +185,17 @@ GetBookingsReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an array! @@ -203,17 +203,17 @@ GetPresenceStatusReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an array! @@ -221,27 +221,27 @@ GetProjectsReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an object! - + JSON does not contain elements! - + elements is not an array! @@ -249,21 +249,49 @@ GetTimeAssignmentsReply - + Request error occured: %0 - + Parsing JSON failed: %0 - + JSON document is not an array! + + GetUserInfoReply + + + Request error occured: %0 + + + + + Parsing JSON failed: %0 + + + + + JSON document is not an object! + + + + + JSON does not contain evoAppsUser! + + + + + evoAppsUser is not an object! + + + LanguageSelectionDialog @@ -348,8 +376,8 @@ - - + + Start @@ -464,160 +492,158 @@ - - + - ??? - - + + Could not load bookings! - + Could not load Auswertung! - - + + n/a - + %0h - - + + + - %0: %1 - - + + Balance - - + + Holidays - + Create booking - + Refresh bookings - - - + + + Could not create booking! - + Edit booking - + Delete booking - + Could not edit booking! - + Do you really want to delete the booking? - + Could not delete booking! - + Create time assignment - + Refresh time assignments - - + + Could not create time assignment! - + Edit time assignment - + Delete time assignment - - - + + + Could not edit time assignment! - + Do you really want to delete the time assignment? - + Could not delete time assignment! - - + + Could not open auswertung! - + Could not open default PDF viewer! - - + + Switch - - + + %0 (%1) @@ -702,178 +728,178 @@ StripsWidget - + Loading... - + Missing booking! - + Expected start booking, instead got type %0 Booking ID: %1 - - + + %0: %1 - + Break - - - + + + %0h - - - - - + + + + + HH:mm - + Missing time assignment! - - - + + + Expected %0 but received %1 in time assignment. Time assignment ID: %2 - - + - - + + - + + HH:mm:ss - - + + There is another booking after an unfinished time assignment. Booking ID: %0 Time assignment ID: %1 - - - + + + There is another time assignment after an unfinished time assignment. Time assignment ID: %0 Time assignment ID: %1 - + The last time assignment is finished without end booking Time assignment ID: %0 - + Expected end booking, instead got type %0 Booking ID: %1 - + Missing time assignment! Missing: %0 - + Time assignment time longer than booking time! Time assignment: %0 Booking: %1 - + Assigned time - + Strip rendering aborted due error. Your bookings and time assignments for this day are in an illegal state! - + %0 (%1) - + Monday - + Tuesday - + Wednesday - + Thursday - + Friday - + Saturday - + Sunday - + dd.MM.yyyy - + Invalid - + Open @@ -1031,32 +1057,4 @@ Your bookings and time assignments for this day are in an illegal state! - - UserInfoReply - - - Request error occured: %0 - - - - - Parsing JSON failed: %0 - - - - - JSON document is not an object! - - - - - JSON does not contain evoAppsUser! - - - - - evoAppsUser is not an object! - - - diff --git a/zeiterfassunglib/zeiterfassungapi.cpp b/zeiterfassunglib/zeiterfassungapi.cpp index d723091..84bebfa 100644 --- a/zeiterfassunglib/zeiterfassungapi.cpp +++ b/zeiterfassunglib/zeiterfassungapi.cpp @@ -22,7 +22,7 @@ #include "replies/loginreply.h" #include "replies/updatebookingreply.h" #include "replies/updatetimeassignmentreply.h" -#include "replies/userinforeply.h" +#include "replies/getuserinforeply.h" //add support for pre cpp14 compilers #include "cpp14polyfills.h" @@ -55,6 +55,8 @@ std::unique_ptr ZeiterfassungApi::doLoginPage() auto reply = std::unique_ptr(m_manager->get(request)); + qDebug() << reply->parent(); + return std::make_unique(std::move(reply), this); } @@ -71,14 +73,14 @@ std::unique_ptr ZeiterfassungApi::doLogin(const QString &username, c return std::make_unique(std::move(reply), this); } -std::unique_ptr ZeiterfassungApi::doUserInfo() +std::unique_ptr ZeiterfassungApi::doUserInfo() { QNetworkRequest request(QUrl(m_url % "json/evoAppsUserInfoDialogController/load-EvoAppsUserInfoTO")); request.setRawHeader(QByteArrayLiteral("sisAppName"), QByteArrayLiteral("home")); auto reply = std::unique_ptr(m_manager->get(request)); - return std::make_unique(std::move(reply), this); + return std::make_unique(std::move(reply), this); } std::unique_ptr ZeiterfassungApi::doGetBookings(int userId, const QDate &start, const QDate &end) diff --git a/zeiterfassunglib/zeiterfassungapi.h b/zeiterfassunglib/zeiterfassungapi.h index 19e04e2..ff1f3b7 100644 --- a/zeiterfassunglib/zeiterfassungapi.h +++ b/zeiterfassunglib/zeiterfassungapi.h @@ -14,7 +14,7 @@ class QNetworkAccessManager; class LoginPageReply; class LoginReply; -class UserInfoReply; +class GetUserInfoReply; class GetBookingsReply; class CreateBookingReply; class UpdateBookingReply; @@ -39,54 +39,9 @@ public: QNetworkAccessManager *manager() const; - struct UserInfo - { - int userId; - QString email; - QString longUsername; - QString text; - QString username; - }; - - struct Booking - { - int id; - QDate date; - QTime time; - QTime timespan; - QString type; - QString text; - }; - - struct TimeAssignment - { - int id; - QDate date; - QTime time; - QTime timespan; - QString text; - QString project; - QString subproject; - QString workpackage; - }; - - struct Project - { - QString label; - QString value; - }; - - struct PresenceStatus - { - int userId; - QString firstName; - QString lastName; - QString presence; - }; - std::unique_ptr doLoginPage(); std::unique_ptr doLogin(const QString &username, const QString &password); - std::unique_ptr doUserInfo(); + std::unique_ptr doUserInfo(); std::unique_ptr doGetBookings(int userId, const QDate &start, const QDate &end); std::unique_ptr doCreateBooking(int userId, const QDate &date, const QTime &time, const QTime ×pan, diff --git a/zeiterfassunglib/zeiterfassunglib.pro b/zeiterfassunglib/zeiterfassunglib.pro index 4e5ce59..4b10025 100644 --- a/zeiterfassunglib/zeiterfassunglib.pro +++ b/zeiterfassunglib/zeiterfassunglib.pro @@ -39,8 +39,8 @@ SOURCES += mainwindow.cpp \ replies/loginreply.cpp \ replies/updatebookingreply.cpp \ replies/updatetimeassignmentreply.cpp \ - replies/userinforeply.cpp \ - replies/zeiterfassungreply.cpp + replies/zeiterfassungreply.cpp \ + replies/getuserinforeply.cpp HEADERS += cpp14polyfills.h \ mainwindow.h \ @@ -73,8 +73,8 @@ HEADERS += cpp14polyfills.h \ replies/loginreply.h \ replies/updatebookingreply.h \ replies/updatetimeassignmentreply.h \ - replies/userinforeply.h \ - replies/zeiterfassungreply.h + replies/zeiterfassungreply.h \ + replies/getuserinforeply.h FORMS += mainwindow.ui \ dialogs/updatedialog.ui \ -- 2.50.1 From 7d78f6f41f8692e89385e307721880fc97b6fc9a Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Sun, 17 Dec 2017 16:31:48 +0100 Subject: [PATCH 14/15] Version bumped to 1.4 --- zeiterfassung/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeiterfassung/main.cpp b/zeiterfassung/main.cpp index c4580fa..f06aea9 100755 --- a/zeiterfassung/main.cpp +++ b/zeiterfassung/main.cpp @@ -341,7 +341,7 @@ int main(int argc, char *argv[]) QCoreApplication::setOrganizationDomain(QStringLiteral("brunner.ninja")); QCoreApplication::setOrganizationName(QStringLiteral("db-software")); QCoreApplication::setApplicationName(QStringLiteral("zeiterfassung")); - QCoreApplication::setApplicationVersion(QStringLiteral("1.3.1")); + QCoreApplication::setApplicationVersion(QStringLiteral("1.4")); QSplashScreen splashScreen(QPixmap(QStringLiteral(":/zeiterfassunglib/images/splash.png"))); splashScreen.showMessage(QCoreApplication::translate("main", "Loading settings...")); -- 2.50.1 From 74ed87ad00506bf99e2b03e9771a6b0df2c3d172 Mon Sep 17 00:00:00 2001 From: Daniel Brunner <0xFEEDC0DE64@gmail.com> Date: Sun, 17 Dec 2017 17:03:17 +0100 Subject: [PATCH 15/15] Removed dds imageformat to fix compilation on windows --- zeiterfassung/installs_win32.pri | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zeiterfassung/installs_win32.pri b/zeiterfassung/installs_win32.pri index 4279b20..a953930 100644 --- a/zeiterfassung/installs_win32.pri +++ b/zeiterfassung/installs_win32.pri @@ -17,8 +17,7 @@ copy_libraries.CONFIG += no_link QMAKE_EXTRA_COMPILERS += copy_libraries PRE_TARGETDEPS += compiler_copy_libraries_make_all -IMAGE_FORMATS += $$[QT_INSTALL_PLUGINS]/imageformats/qdds$${DEBUG_SIGN}.dll \ - $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${DEBUG_SIGN}.dll \ +IMAGE_FORMATS += $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${DEBUG_SIGN}.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qicns$${DEBUG_SIGN}.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qico$${DEBUG_SIGN}.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${DEBUG_SIGN}.dll \ -- 2.50.1