diff options
author | Arno Moeller <am@mindwerk.de> | 2010-06-17 17:59:39 +0200 |
---|---|---|
committer | Arno Moeller <am@mindwerk.de> | 2010-06-17 17:59:39 +0200 |
commit | a4e40f771e7f6df9dc8d7e63c5460761eb0e33c0 (patch) | |
tree | 2c4585a84ba9179aea8309960e6824bb7f6ec6b4 /seriestreewidget.h | |
parent | b503c9e9a29c41b4e0d5e6c43af42b6dc135b9c8 (diff) | |
download | SheMov-a4e40f771e7f6df9dc8d7e63c5460761eb0e33c0.tar.gz SheMov-a4e40f771e7f6df9dc8d7e63c5460761eb0e33c0.tar.bz2 SheMov-a4e40f771e7f6df9dc8d7e63c5460761eb0e33c0.zip |
Partial implementation of adding new Series
Adding an item to the TreeView works, but it doesn't get focus after
inserting. Also the data is not shown. And setting the title of the new
item should make the database puke.
Diffstat (limited to 'seriestreewidget.h')
-rw-r--r-- | seriestreewidget.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/seriestreewidget.h b/seriestreewidget.h index fa84419..6e949b2 100644 --- a/seriestreewidget.h +++ b/seriestreewidget.h @@ -13,13 +13,18 @@ class QLineEdit; class QPushButton; -class QTreeView; class QSortFilterProxyModel; +class SeriesTreeModel; +class SeriesTreeView; class SeriesTreeWidget : public QWidget { Q_OBJECT public: explicit SeriesTreeWidget(QWidget *parent = 0); + SeriesTreeView *seriesTree() { return mView; } + + public slots: + void newSeries(); private slots: void filter(); @@ -28,14 +33,18 @@ class SeriesTreeWidget : public QWidget { private: QLineEdit *mFilterEdit; QPushButton *mFilter; - QTreeView *mView; + SeriesTreeView *mView; QSortFilterProxyModel *mProxy; + SeriesTreeModel *mModel; }; class SeriesTreeView : public QTreeView { Q_OBJECT public: explicit SeriesTreeView(QWidget *parent = 0); + + protected: + virtual void contextMenuEvent(QContextMenuEvent *e); }; #endif |