diff options
author | Arno <arno@disconnect.de> | 2018-02-03 08:02:05 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-02-03 08:02:05 +0100 |
commit | 8512ed1a06888a98f71367f4ac3da3f6edc945c3 (patch) | |
tree | cd9504d630e25ab1e1db9cb64c01d73dc6877d81 /configurationwidget.h | |
parent | cbb1974ae94858b101ba1bf92047236dcfa2e5fa (diff) | |
download | ShemovCleaner-8512ed1a06888a98f71367f4ac3da3f6edc945c3.tar.gz ShemovCleaner-8512ed1a06888a98f71367f4ac3da3f6edc945c3.tar.bz2 ShemovCleaner-8512ed1a06888a98f71367f4ac3da3f6edc945c3.zip |
Implement alternating row colors
Once again, surprisingly difficult, as you can see on the number of
changed files.
Coding the configuration options wasn't that difficult, but actually
using them was. As it turned out, the default style on Windows doesn't
use QApplication::palette() at all, though it does honor
setAlternatingRowColors(). It just doesn't use the palette colors, but
style sheets. Took me a while to figure out.
So, there's always another layer of indirection: First, add all
QTreeViews to Globals::views, then create a helper to set the style
sheet.
Diffstat (limited to 'configurationwidget.h')
-rw-r--r-- | configurationwidget.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configurationwidget.h b/configurationwidget.h index 08488cc..8e7bb19 100644 --- a/configurationwidget.h +++ b/configurationwidget.h @@ -2,9 +2,13 @@ #define CONFIGURATIONWIDGET_H #include <QDialog> +#include <QVector> +#include <QColor> class QLineEdit; class ItemSelectionWidget; +class QLabel; +class QCheckBox; class ConfigurationWidget : public QDialog { Q_OBJECT @@ -19,6 +23,7 @@ class ConfigurationWidget : public QDialog { private: void readSettings(); + void chooseColor(QLabel *l, int colorIndex); QLineEdit *mDbHost; QLineEdit *mDbUser; QLineEdit *mDbPass; @@ -26,9 +31,13 @@ class ConfigurationWidget : public QDialog { QLineEdit *mFfProbe; QLineEdit *mFfMpeg; QLineEdit *mMkvInfo; + QLabel *mBaseColorL; + QLabel *mAltColorL; + QCheckBox *mUseAltColors; ItemSelectionWidget *mCopyDirW; ItemSelectionWidget *mFavDirW; ItemSelectionWidget *mMimeTypeW; + QVector<QColor> mColors; }; #endif // CONFIGURATIONWIDGET_H |