this, SLOT(updateDisplay()));
connect(reloadPB, SIGNAL(clicked()), this, SLOT(reload()));
connect(ignorePB, SIGNAL(clicked()), this, SLOT(ignore()));
- QPalette const & pal = notificationFrame->palette();
- QPalette newpal(pal.color(QPalette::Active, QPalette::HighlightedText),
- pal.color(QPalette::Active, QPalette::Highlight));
- notificationFrame->setPalette(newpal);
+ setMessageColour({notificationFrame}, {reloadPB, ignorePB});
updateDisplay();
}
#include "support/PathChanger.h"
#include "support/Systemcall.h"
+#include <QApplication>
#include <QCheckBox>
#include <QComboBox>
#include <QLineEdit>
}
+void setMessageColour(list<QWidget *> highlighted, list<QWidget *> plain)
+{
+ QPalette pal = QApplication::palette();
+ QPalette newpal(pal.color(QPalette::Active, QPalette::HighlightedText),
+ pal.color(QPalette::Active, QPalette::Highlight));
+ for (QWidget * w : highlighted)
+ w->setPalette(newpal);
+ for (QWidget * w : plain)
+ w->setPalette(pal);
+}
+
+
/// wrapper to hide the change of method name to setSectionResizeMode
void setSectionResizeMode(QHeaderView * view,
int logicalIndex, QHeaderView::ResizeMode mode) {
// set focus and highlight the current item if there is no selection already
void focusAndHighlight(QAbstractItemView * w);
+// Sets all widget in highlighted in highlighted colour, and their children in
+// plain in standard colours.
+void setMessageColour(std::list<QWidget *> highlighted,
+ std::list<QWidget *> plain);
+
/// Qt5 changed setSectionMode to setSectionResizeMode
/// These wrappers work for Qt4 and Qt5
void setSectionResizeMode(QHeaderView * view,