Browse Source

- Fixed color when filtering files using right-click menu in torrent properties and torrent addition dialog

adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
d04b9a7f02
  1. 12
      src/properties_imp.cpp
  2. 12
      src/torrentAddition.h

12
src/properties_imp.cpp

@ -228,6 +228,9 @@ void properties::ignoreSelection(){
if(PropListModel->data(index) != QVariant(IGNORED)){ if(PropListModel->data(index) != QVariant(IGNORED)){
PropListModel->setData(index, QVariant(IGNORED)); PropListModel->setData(index, QVariant(IGNORED));
changedFilteredfiles = true; changedFilteredfiles = true;
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("red")), Qt::ForegroundRole);
}
} }
} }
} }
@ -241,6 +244,9 @@ void properties::normalSelection(){
if(PropListModel->data(index) != QVariant(NORMAL)){ if(PropListModel->data(index) != QVariant(NORMAL)){
PropListModel->setData(index, QVariant(NORMAL)); PropListModel->setData(index, QVariant(NORMAL));
changedFilteredfiles = true; changedFilteredfiles = true;
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("green")), Qt::ForegroundRole);
}
} }
} }
} }
@ -254,6 +260,9 @@ void properties::highSelection(){
if(PropListModel->data(index) != QVariant(HIGH)){ if(PropListModel->data(index) != QVariant(HIGH)){
PropListModel->setData(index, QVariant(HIGH)); PropListModel->setData(index, QVariant(HIGH));
changedFilteredfiles = true; changedFilteredfiles = true;
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("green")), Qt::ForegroundRole);
}
} }
} }
} }
@ -267,6 +276,9 @@ void properties::maximumSelection(){
if(PropListModel->data(index) != QVariant(MAXIMUM)){ if(PropListModel->data(index) != QVariant(MAXIMUM)){
PropListModel->setData(index, QVariant(MAXIMUM)); PropListModel->setData(index, QVariant(MAXIMUM));
changedFilteredfiles = true; changedFilteredfiles = true;
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("green")), Qt::ForegroundRole);
}
} }
} }
} }

12
src/torrentAddition.h

@ -200,6 +200,9 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
if(index.column() == PRIORITY){ if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(IGNORED)); PropListModel->setData(index, QVariant(IGNORED));
} }
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("red")), Qt::ForegroundRole);
}
} }
} }
@ -210,6 +213,9 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
if(index.column() == PRIORITY){ if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(NORMAL)); PropListModel->setData(index, QVariant(NORMAL));
} }
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("green")), Qt::ForegroundRole);
}
} }
} }
@ -220,6 +226,9 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
if(index.column() == PRIORITY){ if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(HIGH)); PropListModel->setData(index, QVariant(HIGH));
} }
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("green")), Qt::ForegroundRole);
}
} }
} }
@ -230,6 +239,9 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
if(index.column() == PRIORITY){ if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(MAXIMUM)); PropListModel->setData(index, QVariant(MAXIMUM));
} }
for(int i=0; i<PropListModel->columnCount(); ++i){
PropListModel->setData(PropListModel->index(index.row(), i), QVariant(QColor("green")), Qt::ForegroundRole);
}
} }
} }

Loading…
Cancel
Save