Compare commits

..

3 commits

5 changed files with 40 additions and 6 deletions

BIN
manual/Benutzerhandbuch.odt Normal file

Binary file not shown.

BIN
manual/Benutzerhandbuch.pdf Normal file

Binary file not shown.

View file

@ -76,6 +76,8 @@ MainWindow::MainWindow()
&MainWindow::onExportSalesJsonActionTriggered); &MainWindow::onExportSalesJsonActionTriggered);
connect(ui_.importSalesJsonAction, &QAction::triggered, this, connect(ui_.importSalesJsonAction, &QAction::triggered, this,
&MainWindow::onImportSalesJsonActionTriggered); &MainWindow::onImportSalesJsonActionTriggered);
readGeometry();
} }
void MainWindow::onActionEditSellerTriggered() void MainWindow::onActionEditSellerTriggered()
@ -353,3 +355,29 @@ void MainWindow::onImportSalesJsonActionTriggered()
} }
setSaleModel(); setSaleModel();
} }
void MainWindow::writeGeometry()
{
QSettings settings;
settings.beginGroup("mainwindow");
settings.setValue("size", size());
settings.setValue("pos", pos());
settings.endGroup();
}
void MainWindow::readGeometry()
{
QSettings settings;
settings.beginGroup("mainwindow");
resize(settings.value("size", QSize(800, 600)).toSize());
move(settings.value("pos", QPoint(200, 200)).toPoint());
settings.endGroup();
}
void MainWindow::closeEvent(QCloseEvent* event)
{
writeGeometry();
event->accept();
}

View file

@ -6,6 +6,7 @@
#include <marketplace.h> #include <marketplace.h>
#include <QMainWindow> #include <QMainWindow>
#include <QtGui/QCloseEvent>
#include <memory> #include <memory>
@ -29,6 +30,9 @@ class MainWindow : public QMainWindow
void onAboutQt(); void onAboutQt();
void onAbout(); void onAbout();
protected:
virtual void closeEvent(QCloseEvent* event) override;
private: private:
void onActionEditSellerTriggered(); void onActionEditSellerTriggered();
void onSellerNoEditCheckSellerNo(); void onSellerNoEditCheckSellerNo();
@ -39,6 +43,8 @@ class MainWindow : public QMainWindow
void onExportSalesJsonActionTriggered(); void onExportSalesJsonActionTriggered();
void onImportSalesJsonActionTriggered(); void onImportSalesJsonActionTriggered();
void setSaleModel(); void setSaleModel();
void writeGeometry();
void readGeometry();
Ui::MainWindow ui_; Ui::MainWindow ui_;
std::unique_ptr<Marketplace> marketplace_; std::unique_ptr<Marketplace> marketplace_;

View file

@ -62,7 +62,7 @@
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Geben Sie hier die Verkäufernummer ein</string> <string>Geben Sie hier die Verkäufernummer ein.</string>
</property> </property>
<property name="statusTip"> <property name="statusTip">
<string>Geben Sie hier die Verkäufernummer ein</string> <string>Geben Sie hier die Verkäufernummer ein</string>
@ -471,27 +471,27 @@ drucken</string>
</action> </action>
<action name="exportSellerJsonAction"> <action name="exportSellerJsonAction">
<property name="text"> <property name="text">
<string>Exportieren (JSON)</string> <string>Exportieren für andere Kasse (JSON)</string>
</property> </property>
</action> </action>
<action name="importSellerExcelAction"> <action name="importSellerExcelAction">
<property name="text"> <property name="text">
<string>Aus Excel-Datei</string> <string>Aus Excel-Datei (initial)</string>
</property> </property>
</action> </action>
<action name="importSellerJsonAction"> <action name="importSellerJsonAction">
<property name="text"> <property name="text">
<string>Aus JSON-Datei</string> <string>Aus JSON-Datei (von anderer Kasse)</string>
</property> </property>
</action> </action>
<action name="exportSalesJsonAction"> <action name="exportSalesJsonAction">
<property name="text"> <property name="text">
<string>Exportieren (JSON)</string> <string>Exportieren für andere Kasse (JSON)</string>
</property> </property>
</action> </action>
<action name="importSalesJsonAction"> <action name="importSalesJsonAction">
<property name="text"> <property name="text">
<string>Importieren (JSON)</string> <string>Importieren von anderer Kasse (JSON)</string>
</property> </property>
</action> </action>
</widget> </widget>