diff options
author | Arno <am@disconnect.de> | 2010-12-22 16:59:12 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-12-26 20:49:27 +0100 |
commit | 7bb7295a9033c0a6729b301e7c9b76393539e29a (patch) | |
tree | df92ec2f09e1cf6797fde07dc495efb051c94b74 /filestreemodel.cpp | |
parent | 832d48d3b9249db178f649d00c5c7134bea2becb (diff) | |
download | SheMov-7bb7295a9033c0a6729b301e7c9b76393539e29a.tar.gz SheMov-7bb7295a9033c0a6729b301e7c9b76393539e29a.tar.bz2 SheMov-7bb7295a9033c0a6729b301e7c9b76393539e29a.zip |
Made colors configurable
Added a tab to ConfigurationDialog to make some colors configurable. It
works somehow. The font color isn't evaluated yet, since I'm not
convinced that it is a good idea.
But one problem is that calling qApp->setPalette() doesn't propagate to
non visible child dialogs. Dunno if it's worth fixing.
Diffstat (limited to 'filestreemodel.cpp')
-rw-r--r-- | filestreemodel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/filestreemodel.cpp b/filestreemodel.cpp index f81711d..1a8b959 100644 --- a/filestreemodel.cpp +++ b/filestreemodel.cpp @@ -17,6 +17,7 @@ #include <QDesktopServices> #include <QDir> #include <QFont> +#include <QSettings> #include "filestreemodel.h" #include "smtreeitem.h" @@ -201,7 +202,7 @@ QVariant FilesTreeModel::data(const QModelIndex &index, int role) const{ } if(index.column() == FileName){ if(item->data(DvdNo) == -1){ - return QColor(Qt::darkBlue); + return mLocalColor; } } } @@ -522,6 +523,12 @@ void FilesTreeModel::writeCache(){ } } +void FilesTreeModel::readSettings(){ + QSettings s; + QVariant local = s.value("ui/localcolor", Qt::darkBlue); + mLocalColor = local.value<QColor>(); +} + void FilesTreeModel::populate(QSqlQuery &filesQuery){ SmTreeItem *root = new SmTreeItem(15); SmTreeItem *files = new SmTreeItem(15, root); |