kima2/src/gui/mainwindow.h

56 lines
1.6 KiB
C
Raw Normal View History

2018-07-14 14:03:35 +02:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
2018-07-16 12:00:17 +02:00
#include "ui_mainwindow.h"
2018-07-14 15:54:29 +02:00
#include <marketplace.h>
2018-07-14 14:03:35 +02:00
#include <QMainWindow>
#include <QtGui/QCloseEvent>
2018-07-14 14:03:35 +02:00
2018-07-14 15:54:29 +02:00
#include <memory>
2018-07-14 14:03:35 +02:00
class MainWindow : public QMainWindow
{
Q_OBJECT
2018-07-20 22:07:42 +02:00
public:
2018-07-14 14:03:35 +02:00
MainWindow();
2018-07-20 22:07:42 +02:00
Marketplace* getMarketplace() { return marketplace_.get(); }
2018-07-14 14:03:35 +02:00
2018-07-23 12:49:19 +02:00
private slots:
void onBasketViewSelectionChanged(const QItemSelection& selected,
2018-07-23 12:59:11 +02:00
const QItemSelection& deselected);
2018-07-27 16:04:01 +02:00
void onSalesViewSelectionChanged(const QItemSelection& selected,
const QItemSelection& deselected);
2018-07-23 13:39:49 +02:00
void onCancelArticleButtonClicked(bool checked);
2018-07-27 16:04:01 +02:00
void onCancelSaleButtonClicked(bool checked);
2018-08-06 16:14:45 +02:00
void onPrintSaleReceiptButtonClicked(bool checked);
2018-07-23 13:39:49 +02:00
void onCancelAllArticlesButtonClicked(bool checked);
2018-07-29 09:56:37 +02:00
void onAboutQt();
2018-07-30 16:39:33 +02:00
void onAbout();
2018-08-08 13:36:49 +02:00
virtual bool eventFilter(QObject *target, QEvent *event) override;
2018-07-23 12:49:19 +02:00
protected:
virtual void closeEvent(QCloseEvent* event) override;
2018-07-23 09:14:43 +02:00
private:
2018-07-27 10:16:07 +02:00
void onActionEditSellerTriggered();
2018-08-08 13:36:49 +02:00
void checkSellerNo(bool ctrlPressed = false);
2018-07-27 10:16:07 +02:00
void onPaidButtonTriggered();
2018-08-08 13:36:49 +02:00
void onGivenSpinBoxValueChanged(double value);
2018-08-02 11:15:15 +02:00
void onImportSellerExcelActionTriggered();
2018-08-02 12:34:56 +02:00
void onImportSellerJsonActionTriggered();
2018-08-02 11:15:15 +02:00
void onExportSellerJsonActionTriggered();
2018-08-02 15:06:35 +02:00
void onExportSalesJsonActionTriggered();
2018-08-02 15:28:35 +02:00
void onImportSalesJsonActionTriggered();
2018-07-30 19:26:10 +02:00
void setSaleModel();
void writeGeometry();
void readGeometry();
void updateStatLabel();
2018-07-16 12:00:17 +02:00
2018-07-20 22:07:42 +02:00
Ui::MainWindow ui_;
std::unique_ptr<Marketplace> marketplace_;
2018-07-14 14:03:35 +02:00
};
#endif