marker: Store color as int.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace olive {
|
||||
|
||||
Marker::Marker(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
marker_color_(Qt::green)
|
||||
marker_color_(7) //green FIXME: add default color to config
|
||||
{
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
setMinimumSize(20, 20);
|
||||
@@ -62,7 +62,7 @@ void Marker::paintEvent(QPaintEvent *event)
|
||||
|
||||
QPainter p(this);
|
||||
p.setPen(Qt::black);
|
||||
p.setBrush(marker_color_);
|
||||
p.setBrush(ColorCoding::GetColor(marker_color_).toQColor());
|
||||
|
||||
p.setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
@@ -92,7 +92,7 @@ void Marker::ShowContextMenu() {
|
||||
|
||||
void Marker::SetColor(int c)
|
||||
{
|
||||
marker_color_ = ColorCoding::GetColor(c).toQColor();
|
||||
marker_color_ = c;
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class Marker : public QWidget {
|
||||
private:
|
||||
ColorLabelMenu* color_coding_menu_;
|
||||
|
||||
QColor marker_color_;
|
||||
int marker_color_;
|
||||
|
||||
private slots:
|
||||
void ShowContextMenu();
|
||||
|
||||
Reference in New Issue
Block a user