FACT++  1.0
void FactGui::SetLedColor ( QPushButton *  button,
LedColor_t  col,
const Time t 
)
inlineprivate

Definition at line 156 of file FactGui.h.

References Time::GetAsStr().

157  {
158  switch (col)
159  {
160  case kLedRed:
161  button->setIcon(QIcon(":/Resources/icons/red circle 1.png"));
162  break;
163 
164  case kLedGreen:
165  button->setIcon(QIcon(":/Resources/icons/green circle 1.png"));
166  break;
167 
168  case kLedGreenBar:
169  button->setIcon(QIcon(":/Resources/icons/green bar.png"));
170  break;
171 
172  case kLedGreenWarn:
173  button->setIcon(QIcon(":/Resources/icons/green warn.png"));
174  break;
175 
176  case kLedGreenCheck:
177  button->setIcon(QIcon(":/Resources/icons/green check.png"));
178  break;
179 
180  case kLedYellow:
181  button->setIcon(QIcon(":/Resources/icons/yellow circle 1.png"));
182  break;
183 
184  case kLedOrange:
185  button->setIcon(QIcon(":/Resources/icons/orange circle 1.png"));
186  break;
187 
188  case kLedGray:
189  button->setIcon(QIcon(":/Resources/icons/gray circle 1.png"));
190  break;
191 
192  case kLedWarnBorder:
193  button->setIcon(QIcon(":/Resources/icons/warning 1.png"));
194  break;
195 
196  case kLedWarn:
197  button->setIcon(QIcon(":/Resources/icons/warning 2.png"));
198  break;
199 
200  case kLedWarnTriangle:
201  button->setIcon(QIcon(":/Resources/icons/warning 3.png"));
202  break;
203 
205  button->setIcon(QIcon(":/Resources/icons/warning 4.png"));
206  break;
207 
208  case kLedInProgress:
209  button->setIcon(QIcon(":/Resources/icons/in progress.png"));
210  break;
211 
212  }
213 
214  //button->setToolTip("Last change: "+QDateTime::currentDateTimeUtc().toString()+" UTC");
215  button->setToolTip(("Last change: "+t.GetAsStr()+" (UTC)").c_str());
216  }
std::string GetAsStr(const char *fmt="%Y-%m-%d %H:%M:%S") const
Definition: Time.cc:240

+ Here is the call graph for this function: