diff options
author | Arno <am@disconnect.de> | 2013-04-10 21:36:26 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-04-10 21:36:26 +0200 |
commit | a39a1118320c2c2e291f9e771ab75d32549431a7 (patch) | |
tree | a82ae27aa4e0e398e99b1127b51d65da36f1c5b9 /seriestreewidget.h | |
parent | 69791ade746638180a959c190fa5db6519c83a38 (diff) | |
download | SheMov-a39a1118320c2c2e291f9e771ab75d32549431a7.tar.gz SheMov-a39a1118320c2c2e291f9e771ab75d32549431a7.tar.bz2 SheMov-a39a1118320c2c2e291f9e771ab75d32549431a7.zip |
Fix setAlternatignRowColors
Well, what started as a try to simplify QTreeView ended in a mass header
murder...
What happened:
* I searched for a way to let every QTreeView honor the
setAlternatingRowcolors() setting. Unfortunately it isn't enough to just
set the global palette and set it to true. So every QTreeView is now
derived from SmTreeView
* SmTreeView registers itself with SmGlobals, so the property is set
_after_ it's constructed. It's definitely not enough to call it in the
constructor. I guess that's a bug. But it's enough to append the
SmTreeView to a QList<QWidget*> in SmGlobals and call it _after_ the
painting is done.
* As an added Bonus we can add virt. funcs to every SmTreeView at will
While at it I realized that most of the included headers were void, so
remove them. No idea what impact it has on the bin size...
Diffstat (limited to 'seriestreewidget.h')
-rw-r--r-- | seriestreewidget.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/seriestreewidget.h b/seriestreewidget.h index 39de162..9740c02 100644 --- a/seriestreewidget.h +++ b/seriestreewidget.h @@ -9,30 +9,20 @@ #define SERIESTREEWIDGET_H #include <QtWidgets/QWidget> -#include <QtWidgets/QTreeView> #include <QSortFilterProxyModel> #include <QSqlDatabase> -#include <QHash> -#include <QPersistentModelIndex> #include "smdialog.h" +#include "smtreeview.h" -class QLineEdit; -class QPushButton; -class QSortFilterProxyModel; class QComboBox; -class QEvent; -class QLabel; class QCompleter; class QStringListModel; -class QSqlQuery; -class QThread; class QCheckBox; class QSpinBox; class SeriesTreeModel; class SeriesTreeView; class SeriesTreeSortModel; -class HoverWindow; class FilesTreeModel; class AddCoverDialog; class HoverWindow; @@ -87,7 +77,7 @@ class SeriesTreeWidget : public QWidget { QString mOldFilterText; }; -class SeriesTreeView : public QTreeView { +class SeriesTreeView : public SmTreeView { Q_OBJECT public: explicit SeriesTreeView(QWidget *parent = 0); |