added correction field
This commit is contained in:
+9
-2
@@ -165,7 +165,7 @@ qint32 cBooking::pauseSecs()
|
||||
return(p1);
|
||||
}
|
||||
|
||||
if(w < 21600)
|
||||
if(w <= 21600)
|
||||
return(0);
|
||||
|
||||
if(p < 1800)
|
||||
@@ -519,6 +519,7 @@ void cBookingList::recalculate(const QDate& date)
|
||||
bFirst = true;
|
||||
|
||||
qint32 ueberstunden = 0;
|
||||
qint32 correction = 0;
|
||||
|
||||
for(;i != end(); i++)
|
||||
{
|
||||
@@ -534,14 +535,20 @@ void cBookingList::recalculate(const QDate& date)
|
||||
(*i)->setPrevDiff(0);
|
||||
}
|
||||
else
|
||||
(*i)->setPrevDiff((*(i-1))->currentDiff()-ueberstunden);
|
||||
(*i)->setPrevDiff((*(i-1))->currentDiff()-ueberstunden+correction);
|
||||
|
||||
cMonthlyBooking* lpMonthlyBooking = m_lpMonthlyBookingList->find((*i)->date());
|
||||
|
||||
if(lpMonthlyBooking)
|
||||
{
|
||||
correction = lpMonthlyBooking->correction();
|
||||
ueberstunden = lpMonthlyBooking->ueberstunden();
|
||||
}
|
||||
else
|
||||
{
|
||||
correction = 0;
|
||||
ueberstunden = 0;
|
||||
}
|
||||
|
||||
oldVacation = (*i)->vacation();
|
||||
|
||||
|
||||
@@ -180,6 +180,7 @@ void cMainWindow::openDB()
|
||||
query.prepare("CREATE TABLE monthlyBooking "
|
||||
"( "
|
||||
" datum DATE PRIMARY KEY UNIQUE, "
|
||||
" correction INTEGER, "
|
||||
" ueberstunden INTEGER, "
|
||||
" salery BLOB, "
|
||||
" timesheet BLOB "
|
||||
|
||||
+18
-1
@@ -8,6 +8,7 @@
|
||||
cMonthlyBooking::cMonthlyBooking(const QDate& date, QObject *parent) :
|
||||
QObject(parent),
|
||||
m_date(date),
|
||||
m_correction(0),
|
||||
m_ueberstunden(0)
|
||||
{
|
||||
}
|
||||
@@ -17,6 +18,16 @@ QDate cMonthlyBooking::date()
|
||||
return(m_date);
|
||||
}
|
||||
|
||||
void cMonthlyBooking::setCorrection(qint32 correction)
|
||||
{
|
||||
m_correction = correction;
|
||||
}
|
||||
|
||||
qint32 cMonthlyBooking::correction()
|
||||
{
|
||||
return(m_correction);
|
||||
}
|
||||
|
||||
void cMonthlyBooking::setUeberstunden(qint32 ueberstunden)
|
||||
{
|
||||
m_ueberstunden = ueberstunden;
|
||||
@@ -62,13 +73,15 @@ bool cMonthlyBooking::save()
|
||||
|
||||
if(query.next())
|
||||
query.prepare("UPDATE monthlyBooking "
|
||||
"SET ueberstunden=:ueberstunden, "
|
||||
"SET correction=:correction,"
|
||||
" ueberstunden=:ueberstunden, "
|
||||
" salery=:salery, "
|
||||
" timesheet=:timesheet "
|
||||
"WHERE datum=:datum;");
|
||||
else
|
||||
query.prepare("INSERT INTO monthlyBooking ( "
|
||||
" datum, "
|
||||
" correction, "
|
||||
" ueberstunden, "
|
||||
" salery, "
|
||||
" timesheet "
|
||||
@@ -76,12 +89,14 @@ bool cMonthlyBooking::save()
|
||||
"VALUES "
|
||||
" ( "
|
||||
" :datum, "
|
||||
" :correction, "
|
||||
" :ueberstunden, "
|
||||
" :salery, "
|
||||
" :timesheet "
|
||||
" );");
|
||||
|
||||
query.bindValue(":datum", date());
|
||||
query.bindValue(":correction", correction());
|
||||
query.bindValue(":ueberstunden", ueberstunden());
|
||||
query.bindValue(":salery", salery());
|
||||
query.bindValue(":timesheet", timesheet());
|
||||
@@ -101,6 +116,7 @@ bool cMonthlyBookingList::load()
|
||||
QSqlQuery query;
|
||||
|
||||
query.prepare("SELECT datum, "
|
||||
" correction, "
|
||||
" ueberstunden, "
|
||||
" salery, "
|
||||
" timesheet "
|
||||
@@ -119,6 +135,7 @@ bool cMonthlyBookingList::load()
|
||||
|
||||
if(lpBooking)
|
||||
{
|
||||
lpBooking->setCorrection(query.value("correction").toInt());
|
||||
lpBooking->setUeberstunden(query.value("ueberstunden").toInt());
|
||||
lpBooking->setSalery(query.value("salery").toByteArray());
|
||||
lpBooking->setTimesheet(query.value("timesheet").toByteArray());
|
||||
|
||||
@@ -19,6 +19,9 @@ public:
|
||||
|
||||
QDate date();
|
||||
|
||||
void setCorrection(qint32 correction);
|
||||
qint32 correction();
|
||||
|
||||
void setUeberstunden(qint32 ueberstunden);
|
||||
qint32 ueberstunden();
|
||||
|
||||
@@ -32,6 +35,7 @@ public:
|
||||
|
||||
private:
|
||||
QDate m_date;
|
||||
qint32 m_correction;
|
||||
qint32 m_ueberstunden;
|
||||
QByteArray m_salery;
|
||||
QByteArray m_timesheet;
|
||||
|
||||
+18
-1
@@ -28,8 +28,11 @@ cMonthlyView::cMonthlyView(const QDate& date, const QMap<QString, QString> code,
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QRegExp rxNeg("-?(?:\\d\\d\\d):(?:[0-5]\\d):(?:[0-5]\\d)");
|
||||
QRegExp rx("(?:\\d\\d\\d):(?:[0-5]\\d):(?:[0-5]\\d)");
|
||||
m_lpValidator = new QRegExpValidator(rx, this);
|
||||
m_lpValidatorNeg = new QRegExpValidator(rxNeg, this);
|
||||
ui->m_lpCorrection->setValidator(m_lpValidatorNeg);
|
||||
ui->m_lpUeberstunden->setValidator(m_lpValidator);
|
||||
|
||||
m_lpMonthlyListModel = new QStandardItemModel(0, 1);
|
||||
@@ -58,6 +61,7 @@ cMonthlyView::cMonthlyView(const QDate& date, const QMap<QString, QString> code,
|
||||
connect(ui->m_lpNextMonth, &QToolButton::clicked, this, &cMonthlyView::onNextMonth);
|
||||
|
||||
connect(ui->m_lpMonth, &QDateEdit::dateChanged, this, &cMonthlyView::onDateChanged);
|
||||
connect(ui->m_lpCorrection, &QLineEdit::textChanged, this, &cMonthlyView::onCorrectionChanged);
|
||||
connect(ui->m_lpUeberstunden, &QLineEdit::textChanged, this, &cMonthlyView::onUeberstundenChanged);
|
||||
|
||||
connect(ui->m_lpTimesheetView, &QPushButton::clicked, this, &cMonthlyView::onTimesheetView);
|
||||
@@ -215,6 +219,7 @@ void cMonthlyView::setDate(const QDate& date)
|
||||
ui->m_lpShouldLabel->setText(QString(tr("SOLL Arbeitszeit (%1):")).arg(date.toString("MMMM yyyy")));
|
||||
ui->m_lpIsLabel->setText(QString(tr("IST Arbeitszeit (%1):")).arg(date.toString("MMMM yyyy")));
|
||||
ui->m_lpResturlaubLabel->setText(QString(tr("Resturlaub %1:")).arg(date.addMonths(-1).toString("MMMM yyyy")));
|
||||
ui->m_lpCorrection->setText(secs2String(m_lpMonthlyBooking->correction(), 3));
|
||||
ui->m_lpUeberstunden->setText(secs2String(m_lpMonthlyBooking->ueberstunden(), 3));
|
||||
|
||||
updatePDF();
|
||||
@@ -341,11 +346,23 @@ void cMonthlyView::onDateChanged(const QDate& date)
|
||||
setDate(date);
|
||||
}
|
||||
|
||||
void cMonthlyView::onCorrectionChanged(const QString& string)
|
||||
{
|
||||
m_lpMonthlyBooking->setCorrection(string2Secs(string));
|
||||
m_lpMonthlyBooking->save();
|
||||
|
||||
m_lpBookingList->recalculate();
|
||||
|
||||
displaySummary();
|
||||
}
|
||||
|
||||
void cMonthlyView::onUeberstundenChanged(const QString& string)
|
||||
{
|
||||
m_lpMonthlyBooking->setUeberstunden(string2Secs(string));
|
||||
m_lpMonthlyBooking->save();
|
||||
|
||||
m_lpBookingList->recalculate();
|
||||
|
||||
displaySummary();
|
||||
}
|
||||
|
||||
@@ -600,7 +617,7 @@ void cMonthlyView::displaySummary()
|
||||
ui->m_lpShould->setText(secs2String(soll));
|
||||
ui->m_lpIs->setText(secs2String(ist));
|
||||
ui->m_lpSaldo->setText(secs2String(ist-soll));
|
||||
ui->m_lpUebertragNaechsterMonat->setText(secs2String(lpFirstBooking->prevDiff()+ist-soll-m_lpMonthlyBooking->ueberstunden()));
|
||||
ui->m_lpUebertragNaechsterMonat->setText(secs2String(lpFirstBooking->prevDiff()+ist-soll-m_lpMonthlyBooking->ueberstunden()+m_lpMonthlyBooking->correction()));
|
||||
ui->m_lpResturlaub->setText(QString::number(lpFirstBooking->vacation()));
|
||||
ui->m_lpUebertragUrlaub->setText(QString::number(lpFirstBooking->vacation()-u));
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ private:
|
||||
QDate m_date;
|
||||
cMonthlyBooking* m_lpMonthlyBooking;
|
||||
QRegExpValidator* m_lpValidator;
|
||||
QRegExpValidator* m_lpValidatorNeg;
|
||||
QStringList m_temporaryFileList;
|
||||
|
||||
void setBackground(const int day, const QString& code);
|
||||
@@ -55,6 +56,7 @@ private slots:
|
||||
void onTimeChanged(const int day, const int field, const QTime& time);
|
||||
void onTextChanged(const int day, const int field, const QString& text);
|
||||
void onDateChanged(const QDate& date);
|
||||
void onCorrectionChanged(const QString& string);
|
||||
void onUeberstundenChanged(const QString& string);
|
||||
void onTimesheetView();
|
||||
void onTimesheetDownload();
|
||||
|
||||
+179
-162
@@ -97,7 +97,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>861</width>
|
||||
<height>263</height>
|
||||
<height>237</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
@@ -117,26 +117,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="10,1,1,5,1,1,100,0">
|
||||
<item row="4" column="4">
|
||||
<widget class="QLineEdit" name="m_lpTraining">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="m_lpKrank">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="m_lpShouldLabel">
|
||||
<property name="text">
|
||||
@@ -147,23 +127,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QLabel" name="m_lpKrankLabel">
|
||||
<property name="text">
|
||||
<string>Krank</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLineEdit" name="m_lpResturlaub">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="m_lpGleitzeitLabel">
|
||||
<property name="text">
|
||||
@@ -171,16 +134,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="m_lpResturlaubLabel">
|
||||
<property name="text">
|
||||
<string>Resturlaub:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLineEdit" name="m_lpGleitzeit">
|
||||
<property name="minimumSize">
|
||||
@@ -197,8 +150,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QLineEdit" name="m_lpSonderurlaub">
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="m_lpKrank">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@@ -207,23 +160,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="m_lpUeberstundenLabel">
|
||||
<property name="text">
|
||||
<string>ausbezahlte Überstunden:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="m_lpIs">
|
||||
<property name="alignment">
|
||||
@@ -234,7 +170,95 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7" rowspan="8">
|
||||
<item row="2" column="4">
|
||||
<widget class="QLineEdit" name="m_lpUrlaub">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUebertragUrlaub">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="m_lpShould">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="m_lpUebertragLabel">
|
||||
<property name="text">
|
||||
<string>Übertrag:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLineEdit" name="m_lpCorrection">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUeberstunden">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QLineEdit" name="m_lpResturlaub">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QLabel" name="m_lpUrlaubLabel">
|
||||
<property name="text">
|
||||
<string>Urlaub</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUebertragNaechsterMonat">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QLabel" name="m_lpKrankLabel">
|
||||
<property name="text">
|
||||
<string>Krank</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7" rowspan="9">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
@@ -333,7 +357,17 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="m_lpUebertragNaechsterMonatLabel">
|
||||
<property name="text">
|
||||
<string>Übertrag nächster Monat:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="m_lpSaldoLabel">
|
||||
<property name="text">
|
||||
<string>Saldo:</string>
|
||||
@@ -343,8 +377,15 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QLineEdit" name="m_lpUrlaub">
|
||||
<item row="4" column="5">
|
||||
<widget class="QLabel" name="m_lpSonderurlaubLabel">
|
||||
<property name="text">
|
||||
<string>Sonderurlaub</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QLineEdit" name="m_lpSonderurlaub">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@@ -353,13 +394,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<widget class="QLabel" name="m_lpTrainingLabel">
|
||||
<property name="text">
|
||||
<string>Training</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
@@ -367,13 +401,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QLabel" name="m_lpUrlaubLabel">
|
||||
<property name="text">
|
||||
<string>Urlaub</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUebertrag">
|
||||
<property name="minimumSize">
|
||||
@@ -390,7 +417,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<item row="1" column="6">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="m_lpSaldo">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@@ -400,74 +440,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="5">
|
||||
<widget class="QLabel" name="m_lpSonderurlaubLabel">
|
||||
<property name="text">
|
||||
<string>Sonderurlaub</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUeberstunden">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUebertragNaechsterMonat">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="m_lpShould">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="m_lpUebertragNaechsterMonatLabel">
|
||||
<widget class="QLabel" name="m_lpUeberstundenLabel">
|
||||
<property name="text">
|
||||
<string>Übertrag nächster Monat:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="m_lpUebertragLabel">
|
||||
<property name="text">
|
||||
<string>Übertrag:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUebertragUrlaub">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="m_lpUebertragUrlaubLabel">
|
||||
<property name="text">
|
||||
<string>Übertrag Urlaub:</string>
|
||||
<string>ausbezahlte Überstunden:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@@ -484,18 +460,59 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<item row="5" column="5">
|
||||
<widget class="QLabel" name="m_lpTrainingLabel">
|
||||
<property name="text">
|
||||
<string>Training</string>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</spacer>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QLineEdit" name="m_lpTraining">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="m_lpResturlaubLabel">
|
||||
<property name="text">
|
||||
<string>Resturlaub:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="m_lpUebertragUrlaubLabel">
|
||||
<property name="text">
|
||||
<string>Übertrag Urlaub:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="m_lpCorrectionLabel">
|
||||
<property name="text">
|
||||
<string>Correction:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
||||
+8
-1
@@ -28,11 +28,18 @@ QString secs2String(const qint32& secs, qint8 leading)
|
||||
|
||||
qint32 string2Secs(const QString& string)
|
||||
{
|
||||
qint32 secs;
|
||||
QStringList list = string.split(":");
|
||||
qint32 h = list[0].toInt();
|
||||
qint32 m = list[1].toInt();
|
||||
qint32 s = list[2].toInt();
|
||||
return(h*3600+m*60+s);
|
||||
|
||||
secs = h*3600+m*60+s;
|
||||
|
||||
if(string[0] == "-")
|
||||
secs = -secs;
|
||||
|
||||
return(secs);
|
||||
}
|
||||
|
||||
qint32 time2Secs(const QTime& time)
|
||||
|
||||
Reference in New Issue
Block a user