VR-Exchange 2.10 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
plotterLegendItemDelegates.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portalApp/dllExport.h>
13 
14 #include <QItemDelegate>
15 #include <QComboBox>
16 
17 namespace MAKVrExchange
18 {
19 
23  {
24  public:
25 
27  DtHeaderItemDelegate( QObject* parent = 0 );
28 
30  virtual ~DtHeaderItemDelegate();
31 
34  virtual QSize sizeHint( const QStyleOptionViewItem& option,
35  const QModelIndex& index ) const;
36 
37  };
38 
42  {
43  public:
44 
46  virtual void setColor( const QColor& color );
47 
49  virtual void paint( QPainter* painter, const QStyleOptionViewItem& option,
50  const QModelIndex& index ) const;
51 
52  protected:
53 
54  QColor myColor;
55 
56  };
57 
61  {
62  public:
63 
65  DtLineStyleComboBox( QWidget* parent = 0 );
66 
68  virtual ~DtLineStyleComboBox();
69 
71  virtual void setColor( const QColor& color );
72 
75  virtual void paintEvent( QPaintEvent* event );
76 
77  protected:
78 
79  QColor myColor;
80 
82 
83  };
84 
88  {
89  public:
90 
92  virtual QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option,
93  const QModelIndex& index ) const;
94 
96  virtual void setEditorData( QWidget* editor, const QModelIndex& index ) const;
97 
99  virtual void setModelData( QWidget* editor, QAbstractItemModel* model,
100  const QModelIndex& index ) const;
101 
103  virtual void paint( QPainter* painter, const QStyleOptionViewItem& option,
104  const QModelIndex& index ) const;
105 
106  };
107 
111  {
112 
116  virtual QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option,
117  const QModelIndex& index ) const;
118 
120  virtual void paint( QPainter* painter, const QStyleOptionViewItem& option,
121  const QModelIndex& index ) const;
122 
125  virtual void doLayoutCenter( const QStyleOptionViewItem& option,
126  QRect& pixmapRect, bool hint ) const;
127 
128  };
129 
130 }
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Draw the line style that was chosen.
QColor myColor
Definition: plotterLegendItemDelegates.h:79
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Populate the editor with the item&#39;s data.
QColor myColor
Definition: plotterLegendItemDelegates.h:54
virtual ~DtHeaderItemDelegate()
Virtual DTOR.
DtLineStylePainterDelegate * myDelegate
Definition: plotterLegendItemDelegates.h:81
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Set the item&#39;s data based on changes to the editor.
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Create the color select dialog.
Item Delegate for picking a line style.
Definition: plotterLegendItemDelegates.h:87
DtHeaderItemDelegate(QObject *parent=0)
CTOR.
virtual void paintEvent(QPaintEvent *event)
Paint method for the combo box.
virtual ~DtLineStyleComboBox()
Virtual DTOR.
Item Delegate for making header sections taller.
Definition: plotterLegendItemDelegates.h:22
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Create and initialize combo box editor.
virtual void doLayoutCenter(const QStyleOptionViewItem &option, QRect &pixmapRect, bool hint) const
Layout the pixmap rect for the color icon.
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Compute the size hint for the item.
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Paint the combo boxes elements as lines.
Item Delegate for selecting a color.
Definition: plotterLegendItemDelegates.h:110
Item Delegate for painting lines in the LineStyleComboBox&#39;s items.
Definition: plotterLegendItemDelegates.h:41
virtual void setColor(const QColor &color)
Set the color used to draw the lines.
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Draw the line style that was chosen.
DtLineStyleComboBox(QWidget *parent=0)
CTOR.
virtual void setColor(const QColor &color)
Set the color used to draw the lines.
Combo Box for choosing line styles.
Definition: plotterLegendItemDelegates.h:60

Document ID: Generated on Mon May 25 18:45:12 EDT 2026 from SVN revision 289111
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)