date +/-
This commit is contained in:
@@ -53,6 +53,9 @@ cMonthlyView::cMonthlyView(const QDate& date, cMonthlyBookingList* lpMonthlyBook
|
||||
connect(static_cast<cMonthlyItemDelegate*>(ui->m_lpMonthlyList->itemDelegate()), &cMonthlyItemDelegate::timeChanged, this, &cMonthlyView::onTimeChanged);
|
||||
connect(static_cast<cMonthlyItemDelegate*>(ui->m_lpMonthlyList->itemDelegate()), &cMonthlyItemDelegate::textChanged, this, &cMonthlyView::onTextChanged);
|
||||
|
||||
connect(ui->m_lpPrevMonth, &QToolButton::clicked, this, &cMonthlyView::onPrevMonth);
|
||||
connect(ui->m_lpNextMonth, &QToolButton::clicked, this, &cMonthlyView::onNextMonth);
|
||||
|
||||
connect(ui->m_lpMonth, &QDateEdit::dateChanged, this, &cMonthlyView::onDateChanged);
|
||||
connect(ui->m_lpUeberstunden, &QLineEdit::textChanged, this, &cMonthlyView::onUeberstundenChanged);
|
||||
}
|
||||
@@ -214,6 +217,16 @@ cMonthlyView::~cMonthlyView()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cMonthlyView::onPrevMonth()
|
||||
{
|
||||
ui->m_lpMonth->setDate(ui->m_lpMonth->date().addMonths(-1));
|
||||
}
|
||||
|
||||
void cMonthlyView::onNextMonth()
|
||||
{
|
||||
ui->m_lpMonth->setDate(ui->m_lpMonth->date().addMonths(1));
|
||||
}
|
||||
|
||||
void cMonthlyView::onTimeChanged(const int day, const int field, const QTime& time)
|
||||
{
|
||||
QStandardItem* lpItem = m_lpMonthlyListModel->item(day-1, field);
|
||||
|
||||
@@ -48,6 +48,8 @@ private:
|
||||
void displaySummary();
|
||||
|
||||
private slots:
|
||||
void onPrevMonth();
|
||||
void onNextMonth();
|
||||
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);
|
||||
|
||||
+32
-2
@@ -17,7 +17,14 @@
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0">
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_lpPrevMonth">
|
||||
<property name="text">
|
||||
<string><</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDateEdit" name="m_lpMonth">
|
||||
<property name="minimumSize">
|
||||
@@ -57,6 +64,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_lpNextMonth">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
@@ -112,6 +126,12 @@
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLineEdit" name="m_lpGleitzeit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@@ -280,6 +300,12 @@
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUebertrag">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@@ -366,7 +392,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="m_lpUeberstunden"/>
|
||||
<widget class="QLineEdit" name="m_lpUeberstunden">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user