Changeset 335 in pacpusframework for branches


Ignore:
Timestamp:
12/08/14 13:45:22 (10 years ago)
Author:
phudelai
Message:

manage the color of monitored component

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.1.x/src/PacpusSensor/src/ui/pacpusmainwindow.cpp

    r162 r335  
    147147        QPalette palette = b->palette();
    148148
    149         switch(state) {
     149        switch (state) {
    150150        case ComponentBase::STOPPED :
    151             palette.setColor(QPalette::Base, Qt::white);
     151            palette.setColor(QPalette::Foreground, Qt::gray);
    152152            b->setPalette(palette);
    153153            //qDebug() << "STOPPED";
     
    155155
    156156        case ComponentBase::NOT_MONITORED :
    157             palette.setColor(QPalette::Base, Qt::gray);
     157            palette.setColor(QPalette::Foreground, Qt::black);
    158158            b->setPalette(palette);
    159159            //qDebug() << "NOT_MONITORED";
     
    161161
    162162        case ComponentBase::MONITOR_OK :
    163             palette.setColor(QPalette::Base, Qt::green);
     163            palette.setColor(QPalette::Foreground, Qt::green);
    164164            b->setPalette(palette);
    165165            //qDebug() << "MONITOR_OK";
     
    167167
    168168        case ComponentBase::MONITOR_NOK :
    169             palette.setColor(QPalette::Base, Qt::red);
     169            palette.setColor(QPalette::Foreground, Qt::red);
    170170            b->setPalette(palette);
    171171            //qDebug() << "MONITOR_NOK";
Note: See TracChangeset for help on using the changeset viewer.