random_color.h
Go to the documentation of this file.
1 #ifndef RANDOM_COLOR_H
2 #define RANDOM_COLOR_H
3 
4 #include <QColor>
5 
6 inline QColor randomColorHint()
7 {
8  static int index = 0;
9  QColor color;
10  switch( index%9 )
11  {
12  case 0: color = QColor(Qt::blue); break;
13  case 1: color = QColor(Qt::darkGreen); break;
14  case 2: color = QColor(Qt::red); break;
15  case 3: color = QColor(Qt::magenta); break;
16  case 4: color = QColor(Qt::darkBlue); break;
17  case 5: color = QColor(Qt::darkCyan); break;
18  case 6: color = QColor(Qt::gray); break;
19  case 7: color = QColor(Qt::darkYellow); break;
20  case 8: color = QColor(Qt::darkRed); break;
21  }
22  index++;
23  return color;
24 }
25 
26 #endif // RANDOM_COLOR_H
QColor randomColorHint()
Definition: random_color.h:6


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18