Added ZeiterfassungDialog
This commit is contained in:
@@ -8,17 +8,11 @@
|
|||||||
#include "absencesmodel.h"
|
#include "absencesmodel.h"
|
||||||
|
|
||||||
AbsenceDialog::AbsenceDialog(int userId, const QDate &date, ZeiterfassungApi &erfassung, QWidget *parent) :
|
AbsenceDialog::AbsenceDialog(int userId, const QDate &date, ZeiterfassungApi &erfassung, QWidget *parent) :
|
||||||
QDialog(parent),
|
ZeiterfassungDialog(parent),
|
||||||
ui(new Ui::AbsenceDialog)
|
ui(new Ui::AbsenceDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
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("Absences for %0").arg(date.toString(tr("dd.MM.yyyy"))));
|
ui->labelTitle->setText(tr("Absences for %0").arg(date.toString(tr("dd.MM.yyyy"))));
|
||||||
|
|
||||||
m_model = new AbsencesModel(userId, date, erfassung, this);
|
m_model = new AbsencesModel(userId, date, erfassung, this);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDialog>
|
#include "zeiterfassungdialog.h"
|
||||||
|
|
||||||
class QDate;
|
class QDate;
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ class ZeiterfassungApi;
|
|||||||
class AbsencesModel;
|
class AbsencesModel;
|
||||||
namespace Ui { class AbsenceDialog; }
|
namespace Ui { class AbsenceDialog; }
|
||||||
|
|
||||||
class AbsenceDialog : public QDialog
|
class AbsenceDialog : public ZeiterfassungDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>AbsenceDialog</class>
|
<class>AbsenceDialog</class>
|
||||||
<widget class="QDialog" name="AbsenceDialog">
|
<widget class="ZeiterfassungDialog" name="AbsenceDialog">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
|
13
zeiterfassungguilib/zeiterfassungdialog.cpp
Normal file
13
zeiterfassungguilib/zeiterfassungdialog.cpp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#include "zeiterfassungdialog.h"
|
||||||
|
|
||||||
|
#include <qnamespace.h>
|
||||||
|
|
||||||
|
ZeiterfassungDialog::ZeiterfassungDialog(QWidget *parent) :
|
||||||
|
QDialog(parent)
|
||||||
|
{
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
|
||||||
|
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
|
#else
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
#endif
|
||||||
|
}
|
13
zeiterfassungguilib/zeiterfassungdialog.h
Normal file
13
zeiterfassungguilib/zeiterfassungdialog.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
#include "zeiterfassungguilib_global.h"
|
||||||
|
|
||||||
|
class ZEITERFASSUNGGUILIBSHARED_EXPORT ZeiterfassungDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit ZeiterfassungDialog(QWidget *parent = Q_NULLPTR);
|
||||||
|
};
|
@@ -20,6 +20,7 @@ DEFINES += ZEITERFASSUNGGUILIB_LIBRARY
|
|||||||
SOURCES += mainwindow.cpp \
|
SOURCES += mainwindow.cpp \
|
||||||
stripfactory.cpp \
|
stripfactory.cpp \
|
||||||
stripswidget.cpp \
|
stripswidget.cpp \
|
||||||
|
zeiterfassungdialog.cpp \
|
||||||
zeiterfassungplugin.cpp \
|
zeiterfassungplugin.cpp \
|
||||||
dialogs/authenticationdialog.cpp \
|
dialogs/authenticationdialog.cpp \
|
||||||
dialogs/languageselectiondialog.cpp \
|
dialogs/languageselectiondialog.cpp \
|
||||||
@@ -29,6 +30,7 @@ HEADERS += mainwindow.h \
|
|||||||
stripfactory.h \
|
stripfactory.h \
|
||||||
stripswidget.h \
|
stripswidget.h \
|
||||||
zeiterfassungguilib_global.h \
|
zeiterfassungguilib_global.h \
|
||||||
|
zeiterfassungdialog.h \
|
||||||
zeiterfassungplugin.h \
|
zeiterfassungplugin.h \
|
||||||
dialogs/authenticationdialog.h \
|
dialogs/authenticationdialog.h \
|
||||||
dialogs/languageselectiondialog.h \
|
dialogs/languageselectiondialog.h \
|
||||||
|
Reference in New Issue
Block a user