MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrAnnotationColorButton.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef lgrAnnotationColorButton_H_
10 #define lgrAnnotationColorButton_H_
11 
12 #include <lgrAnnotations/lgrAnn.h>
14 
15 #include <QColor>
16 #include <QList>
17 #include <QPushButton>
18 
19 namespace MAKLogger
20 {
25  {
26  Q_OBJECT
27  public:
28  explicit DtLgrAnnotationColorButton(QWidget* parent = 0);
29  virtual ~DtLgrAnnotationColorButton();
30 
32  QColor color() const;
33 
35  void setColor(const QColor& color);
36 
38  virtual QSize sizeHint() const;
39  virtual QSize minimumSizeHint() const;
40 
41  protected:
42  virtual bool event(QEvent* event);
43  virtual void keyPressEvent(QKeyEvent* event);
44  virtual void paintEvent(QPaintEvent* event);
45  virtual void showEvent(QShowEvent* event);
46 
47  private:
49  void showPopup(int focusSlot);
50  void chooseCustomColor();
52  void editPreset(int slot);
54  void refreshAndReopen(int slot);
56  QColor glyphColor() const;
57  QIcon swatchIcon(const QColor& color) const;
58  void updateIcon();
60  void updateDisplay();
61 
62  QColor myColor;
63  QList<DtLgrAnnotationColors::Preset> myPresets;
64  };
65 }
66 
67 #endif
Field-style button that shows an annotation color (swatch + name) and opens DtLgrAnnotationColorPopup...
Definition: lgrAnnotationColorButton.h:24
QList< DtLgrAnnotationColors::Preset > myPresets
Definition: lgrAnnotationColorButton.h:63
Defines INPORT/EXPORT macros for lgrGui library.
Contains MAKLogger::DtLgrAnnotationColors class.
QColor myColor
Definition: lgrAnnotationColorButton.h:62
#define DT_DLL_LGRANN
Definition: lgrAnn.h:19

Document ID: Generated on Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)