Devel #56

Merged
0xFEEDC0DE64 merged 84 commits from devel into master 2017-12-29 13:34:28 +01:00
223 changed files with 5215 additions and 3048 deletions
Showing only changes of commit 40323d19f7 - Show all commits

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AbsenceDialog</class>
<widget class="ZeiterfassungDialog" name="AbsenceDialog">
<widget class="QDialog" name="AbsenceDialog">
<property name="geometry">
<rect>
<x>0</x>

View File

@@ -22,7 +22,7 @@
#include "models/timeassignmentsmodel.h"
AdvancedViewDialog::AdvancedViewDialog(StripsWidget &stripsWidget, QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::AdvancedViewDialog),
m_stripsWidget(stripsWidget),
m_bookingsModel(new BookingsModel(stripsWidget, this)),
@@ -30,12 +30,6 @@ AdvancedViewDialog::AdvancedViewDialog(StripsWidget &stripsWidget, QWidget *pare
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
ui->bookingsView->setModel(m_bookingsModel);
ui->bookingsView->setEnabled(m_bookingsModel->enabled());
connect(m_bookingsModel, &BookingsModel::enabledChanged, ui->bookingsView, &QWidget::setEnabled);

View File

@@ -1,13 +1,13 @@
#pragma once
#include <QDialog>
#include "zeiterfassungdialog.h"
namespace Ui { class AdvancedViewDialog; }
class StripsWidget;
class BookingsModel;
class TimeAssignmentsModel;
class AdvancedViewDialog : public QDialog
class AdvancedViewDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -2,16 +2,10 @@
#include "ui_bookingdialog.h"
BookingDialog::BookingDialog(QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::BookingDialog)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
}
BookingDialog::~BookingDialog()

View File

@@ -1,11 +1,12 @@
#pragma once
#include <QDialog>
#include <QTime>
#include "zeiterfassungdialog.h"
namespace Ui { class BookingDialog; }
class BookingDialog : public QDialog
class BookingDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -9,17 +9,11 @@
TimeAssignmentDialog::TimeAssignmentDialog(const QMap<QString, QString> &projects, const ZeiterfassungSettings &settings,
QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::TimeAssignmentDialog)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
{
for(const auto &preferedProject : settings.projects())
{

View File

@@ -1,15 +1,16 @@
#pragma once
#include <QDialog>
#include <QTime>
#include "zeiterfassungdialog.h"
template <class Key, class T> class QMap;
class ZeiterfassungSettings;
namespace Ui { class TimeAssignmentDialog; }
class TimeAssignmentDialog : public QDialog
class TimeAssignmentDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -2,16 +2,10 @@
#include "ui_logdialog.h"
LogDialog::LogDialog(QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::LogDialog)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
}
LogDialog::~LogDialog()

View File

@@ -1,12 +1,12 @@
#pragma once
#include <QDialog>
#include "zeiterfassungdialog.h"
class QAbstractItemModel;
namespace Ui { class LogDialog; }
class LogDialog : public QDialog
class LogDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -4,17 +4,11 @@
#include <QDate>
LunchMealDialog::LunchMealDialog(const QDate &date, const QString &content, QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::LunchMealDialog)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
ui->labelTitle->setText(tr("Lunch meal for %0").arg(date.toString(tr("dd.MM.yyyy"))));
ui->labelLunchMeal->setText(content);
}

View File

@@ -1,6 +1,6 @@
#pragma once
#include <QDialog>
#include "zeiterfassungdialog.h"
class QDate;
@@ -8,7 +8,7 @@ class StripsWidget;
namespace Ui { class LunchMealDialog; }
class LunchMealDialog : public QDialog
class LunchMealDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -2,17 +2,11 @@
#include "ui_profiledialog.h"
ProfileDialog::ProfileDialog(const GetUserInfoReply::UserInfo &userInfo, QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::ProfileDialog)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
ui->spinBoxUserId->setValue(userInfo.userId);
ui->lineEditEmail->setText(userInfo.email);
ui->lineEditLongUsername->setText(userInfo.longUsername);

View File

@@ -1,12 +1,11 @@
#pragma once
#include <QDialog>
#include "zeiterfassungdialog.h"
#include "replies/getuserinforeply.h"
namespace Ui { class ProfileDialog; }
class ProfileDialog : public QDialog
class ProfileDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -19,18 +19,12 @@
#include "zeiterfassungapi.h"
UpdaterDialog::UpdaterDialog(MainWindow &mainWindow) :
QDialog(&mainWindow),
ZeiterfassungDialog(&mainWindow),
ui(new Ui::UpdaterDialog),
m_mainWindow(mainWindow)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
setAttribute(Qt::WA_DeleteOnClose);
connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &UpdaterDialog::acceptedSlot);

View File

@@ -1,14 +1,15 @@
#pragma once
#include <QDialog>
#include <QUrl>
#include "zeiterfassungdialog.h"
class QNetworkReply;
namespace Ui { class UpdaterDialog; }
class MainWindow;
class UpdaterDialog : public QDialog
class UpdaterDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -5,18 +5,12 @@
#include "zeiterfassungsettings.h"
WebRadioDialog::WebRadioDialog(MainWindow &mainWindow) :
QDialog(&mainWindow),
ZeiterfassungDialog(&mainWindow),
ui(new Ui::WebRadioDialog),
m_mainWindow(mainWindow)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
m_player = new QMediaPlayer(this);
connect(m_player, &QMediaPlayer::stateChanged, this, &WebRadioDialog::stateChanged);
connect(m_player, &QMediaPlayer::stateChanged, this, &WebRadioDialog::updateWidgets);

View File

@@ -1,13 +1,14 @@
#pragma once
#include <QDialog>
#include <QMediaPlayer>
#include "zeiterfassungdialog.h"
class MainWindow;
namespace Ui { class WebRadioDialog; }
class WebRadioDialog : public QDialog
class WebRadioDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -2,16 +2,10 @@
#include "ui_authenticationdialog.h"
AuthenticationDialog::AuthenticationDialog(QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::AuthenticationDialog)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
}
AuthenticationDialog::~AuthenticationDialog()

View File

@@ -1,12 +1,11 @@
#pragma once
#include <QDialog>
#include "zeiterfassungguilib_global.h"
#include "zeiterfassungdialog.h"
namespace Ui { class AuthenticationDialog; }
class ZEITERFASSUNGGUILIBSHARED_EXPORT AuthenticationDialog : public QDialog
class ZEITERFASSUNGGUILIBSHARED_EXPORT AuthenticationDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -2,17 +2,11 @@
#include "ui_languageselectiondialog.h"
LanguageSelectionDialog::LanguageSelectionDialog(QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::LanguageSelectionDialog)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
ui->comboBoxLanguage->addItem(tr("English"), QLocale::English);
ui->comboBoxLanguage->addItem(tr("German"), QLocale::German);
}

View File

@@ -1,13 +1,13 @@
#pragma once
#include <QDialog>
#include <QLocale>
#include "zeiterfassungguilib_global.h"
#include "zeiterfassungdialog.h"
namespace Ui { class LanguageSelectionDialog; }
class ZEITERFASSUNGGUILIBSHARED_EXPORT LanguageSelectionDialog : public QDialog
class ZEITERFASSUNGGUILIBSHARED_EXPORT LanguageSelectionDialog : public ZeiterfassungDialog
{
Q_OBJECT

View File

@@ -11,18 +11,12 @@
#include "zeiterfassungsettings.h"
SettingsDialog::SettingsDialog(ZeiterfassungSettings &settings, QWidget *parent) :
QDialog(parent),
ZeiterfassungDialog(parent),
ui(new Ui::SettingsDialog),
m_settings(settings)
{
ui->setupUi(this);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
#else
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
#endif
ui->comboBoxLanguage->addItem(tr("English"), QLocale::English);
ui->comboBoxLanguage->addItem(tr("German"), QLocale::German);

View File

@@ -1,13 +1,12 @@
#pragma once
#include <QDialog>
#include "zeiterfassungguilib_global.h"
#include "zeiterfassungdialog.h"
class ZeiterfassungSettings;
namespace Ui { class SettingsDialog; }
class ZEITERFASSUNGGUILIBSHARED_EXPORT SettingsDialog : public QDialog
class ZEITERFASSUNGGUILIBSHARED_EXPORT SettingsDialog : public ZeiterfassungDialog
{
Q_OBJECT