kima2/src/gui/mainwindow.h

56 lines
No EOL
1.6 KiB
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "ui_mainwindow.h"
#include <marketplace.h>
#include <QMainWindow>
#include <QtGui/QCloseEvent>
#include <memory>
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
Marketplace* getMarketplace() { return marketplace_.get(); }
private slots:
void onBasketViewSelectionChanged(const QItemSelection& selected,
const QItemSelection& deselected);
void onSalesViewSelectionChanged(const QItemSelection& selected,
const QItemSelection& deselected);
void onCancelArticleButtonClicked(bool checked);
void onCancelSaleButtonClicked(bool checked);
void onPrintSaleReceiptButtonClicked(bool checked);
void onCancelAllArticlesButtonClicked(bool checked);
void onAboutQt();
void onAbout();
virtual bool eventFilter(QObject *target, QEvent *event) override;
protected:
virtual void closeEvent(QCloseEvent* event) override;
private:
void onActionEditSellerTriggered();
void checkSellerNo(bool ctrlPressed = false);
void onPaidButtonTriggered();
void onGivenSpinBoxValueChanged(double value);
void onImportSellerExcelActionTriggered();
void onImportSellerJsonActionTriggered();
void onExportSellerJsonActionTriggered();
void onExportSalesJsonActionTriggered();
void onImportSalesJsonActionTriggered();
void setSaleModel();
void writeGeometry();
void readGeometry();
void updateStatLabel();
Ui::MainWindow ui_;
std::unique_ptr<Marketplace> marketplace_;
};
#endif