2011-06-28 21:41:56 +02:00
|
|
|
#ifndef TRANSACTIONVIEW_H
|
|
|
|
#define TRANSACTIONVIEW_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class TransactionTableModel;
|
|
|
|
class TransactionFilterProxy;
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QTableView;
|
|
|
|
class QComboBox;
|
|
|
|
class QLineEdit;
|
2011-06-30 21:34:00 +02:00
|
|
|
class QModelIndex;
|
2011-06-28 21:41:56 +02:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
class TransactionView : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit TransactionView(QWidget *parent = 0);
|
|
|
|
|
|
|
|
void setModel(TransactionTableModel *model);
|
|
|
|
|
|
|
|
enum DateEnum
|
|
|
|
{
|
|
|
|
All,
|
|
|
|
Today,
|
|
|
|
ThisWeek,
|
|
|
|
ThisMonth,
|
2011-07-01 20:28:11 +02:00
|
|
|
LastMonth,
|
2011-06-28 21:41:56 +02:00
|
|
|
ThisYear,
|
|
|
|
Range
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
TransactionTableModel *model;
|
|
|
|
TransactionFilterProxy *transactionProxyModel;
|
|
|
|
QTableView *transactionView;
|
|
|
|
|
|
|
|
QComboBox *dateWidget;
|
|
|
|
QComboBox *typeWidget;
|
|
|
|
QLineEdit *addressWidget;
|
|
|
|
QLineEdit *amountWidget;
|
|
|
|
|
|
|
|
signals:
|
2011-06-30 21:34:00 +02:00
|
|
|
void doubleClicked(const QModelIndex&);
|
2011-06-28 21:41:56 +02:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void chooseDate(int idx);
|
|
|
|
void chooseType(int idx);
|
|
|
|
void changedPrefix(const QString &prefix);
|
|
|
|
void changedAmount(const QString &amount);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TRANSACTIONVIEW_H
|