Added LunchMealDialog
This commit is contained in:
17
plugins/lunchmealplugin/lunchmealdialog.cpp
Normal file
17
plugins/lunchmealplugin/lunchmealdialog.cpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#include "lunchmealdialog.h"
|
||||||
|
#include "ui_lunchmealdialog.h"
|
||||||
|
|
||||||
|
#include "stripswidget.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
LunchMealDialog::LunchMealDialog(StripsWidget &stripsWidget) :
|
||||||
|
QDialog(&stripsWidget.mainWindow()),
|
||||||
|
ui(new Ui::LunchMealDialog)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
LunchMealDialog::~LunchMealDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
22
plugins/lunchmealplugin/lunchmealdialog.h
Normal file
22
plugins/lunchmealplugin/lunchmealdialog.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef LUNCHMEALDIALOG_H
|
||||||
|
#define LUNCHMEALDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
class StripsWidget;
|
||||||
|
|
||||||
|
namespace Ui { class LunchMealDialog; }
|
||||||
|
|
||||||
|
class LunchMealDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit LunchMealDialog(StripsWidget &stripsWidget);
|
||||||
|
~LunchMealDialog();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::LunchMealDialog *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // LUNCHMEALDIALOG_H
|
88
plugins/lunchmealplugin/lunchmealdialog.ui
Normal file
88
plugins/lunchmealplugin/lunchmealdialog.ui
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>LunchMealDialog</class>
|
||||||
|
<widget class="QDialog" name="LunchMealDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelTitle">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">Lunch meal for</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelLunchMeal">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">TextLabel</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Close</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>LunchMealDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>LunchMealDialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@@ -15,12 +15,15 @@ DEPENDPATH += $$PWD/../../zeiterfassunglib
|
|||||||
DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT
|
DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT
|
||||||
|
|
||||||
HEADERS += lunchmealplugin.h \
|
HEADERS += lunchmealplugin.h \
|
||||||
lunchmealwidget.h
|
lunchmealwidget.h \
|
||||||
|
lunchmealdialog.h
|
||||||
|
|
||||||
SOURCES += lunchmealplugin.cpp \
|
SOURCES += lunchmealplugin.cpp \
|
||||||
lunchmealwidget.cpp
|
lunchmealwidget.cpp \
|
||||||
|
lunchmealdialog.cpp
|
||||||
|
|
||||||
FORMS +=
|
FORMS += \
|
||||||
|
lunchmealdialog.ui
|
||||||
|
|
||||||
RESOURCES += lunchmealplugin_resources.qrc
|
RESOURCES += lunchmealplugin_resources.qrc
|
||||||
|
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "zeiterfassungapi.h"
|
#include "zeiterfassungapi.h"
|
||||||
|
|
||||||
|
#include "lunchmealdialog.h"
|
||||||
|
|
||||||
LunchMealWidget::LunchMealWidget(StripsWidget &stripsWidget) :
|
LunchMealWidget::LunchMealWidget(StripsWidget &stripsWidget) :
|
||||||
QToolButton(&stripsWidget),
|
QToolButton(&stripsWidget),
|
||||||
m_stripsWidget(stripsWidget)
|
m_stripsWidget(stripsWidget)
|
||||||
@@ -18,5 +20,6 @@ LunchMealWidget::LunchMealWidget(StripsWidget &stripsWidget) :
|
|||||||
|
|
||||||
void LunchMealWidget::pressedSlot()
|
void LunchMealWidget::pressedSlot()
|
||||||
{
|
{
|
||||||
|
LunchMealDialog dialog(m_stripsWidget);
|
||||||
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user