closes #4: Allowed to multiselect items on voucher and delete them via context menu or Ctrl+Del shortcut.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <QList>
|
||||
#include <QScopedPointer>
|
||||
#include <QMenu>
|
||||
#include "data/shop-data.h"
|
||||
#include <autotablemodel.h>
|
||||
#include "settings/shopsettings.h"
|
||||
@@ -50,12 +52,18 @@ private slots:
|
||||
|
||||
void on_commoditySearch_returnPressed();
|
||||
|
||||
void on_actionDelete_items_triggered();
|
||||
|
||||
void on_actualReceipt_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
|
||||
private:
|
||||
Ui::ShopForm *ui;
|
||||
QSharedPointer<Voucher> m_voucher;
|
||||
AutoTableModel<VoucherItem> *m_itemsModel;
|
||||
AutoTableModel<ShopItem> *m_commodityModel;
|
||||
bool m_itemFound;
|
||||
QScopedPointer<QMenu> m_itemCtxMenu;
|
||||
|
||||
void loadLast();
|
||||
void loadButtons(const ShopSettingsPtr& settings);
|
||||
@@ -67,6 +75,8 @@ private:
|
||||
void createEmptyVoucher();
|
||||
void addItem(QSharedPointer<IShopItem> item, int count);
|
||||
void setTotalText();
|
||||
void recalculate();
|
||||
void updateItemCount(VoucherItem *item, int oldCount);
|
||||
};
|
||||
|
||||
#endif // SHOPFORM_H
|
||||
|
||||
Reference in New Issue
Block a user