FlagsViewer.h 597 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef FLAGSVIEWER_H
  2. #define FLAGSVIEWER_H
  3. #include <QFrame>
  4. class QPainter;
  5. class QResizeEvent;
  6. class QPaintEvent;
  7. class QString;
  8. class FlagsViewer : public QFrame
  9. {
  10. Q_OBJECT;
  11. public:
  12. FlagsViewer(QWidget* parent = 0);
  13. QSize sizeHint() const;
  14. public slots:
  15. void setFlags(quint8 newFlags);
  16. private:
  17. void resizeEvent(QResizeEvent* e);
  18. void paintEvent(QPaintEvent* e);
  19. void drawValue(QPainter& p, int x, int y, const QString& str,
  20. const bool changed);
  21. int frameL, frameR, frameT, frameB;
  22. unsigned char flags;
  23. unsigned char flagsChanged;
  24. };
  25. #endif // FLAGSVIEWER_H