/
CEditStyleToolkit.h
86 lines (71 loc) · 2.85 KB
/
CEditStyleToolkit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
////////////////////////////////////////////////////////////////////////////////
/// @file CEditStyleToolkit.h
///
/// @author Kyle Owen
///
/// @compiler Windows: MinGW / Linux: GNU G++
///
/// @project GNAT
///
/// @description This file contains the definitions of the CEditStyleToolkit
/// class which is a dialog box accessed by the end user through
/// Settings -> Preferences. The class functions as a interface
/// between the end user and the CStyleToolkit singleton instance
/// allowing the user to change various parameters that effect
/// how nodes, edges and so on are displayed.
/// Qt Version: 4.1.0 Open Source
///
////////////////////////////////////////////////////////////////////////////////
#ifndef _CEDITSTYLETOOLKIT_H_
#define _CEDITSTYLETOOLKIT_H_
#include <QtGui>
#include <QLabel>
#include <QDialog>
#include "CStyleToolkit.h"
#include "CEditStyleToolkit.h"
////////////////////////////////////////////////////////////////////////////////
/// CEditStyleToolkit
///
/// @description This class encapsulates a dialog box accessed by the end user
/// through Settings -> Preferences. The class functions as an
/// interface between the end user and the CStyleToolkit singleton
/// instance allowing the user to change various parameters that
/// effect how nodes, edges and so on are displayed.
///
/// @limitations None
///
////////////////////////////////////////////////////////////////////////////////
class CEditStyleToolkit : public QDialog
{
Q_OBJECT
public:
CEditStyleToolkit (QWidget *parent);
~CEditStyleToolkit(void);
static int refCount(void)
{ return m_refCount; }
private slots:
void standardColorClicked(); // Button actions...
void createColorClicked(); // ...
void changeFontClicked(); // ...
void applyClicked(); // ...
void okClicked(); // ...
void defaultsClicked(); // ...
private:
void initialize (void); // Create widgets
void getStyleToolkit(void); // Sync widgets to CStyleToolkit values
int m_iNodeRadius; // Node radius
int m_iLineWidth; // Node / edge width
int m_iBoldWidth; // Node bold width
QColor m_cStandardColor; // Current node / edge / text color
QColor m_cCreateColor; // Current edge creation value
QFont m_fFont; // Current font
QSpinBox *m_sbNodeRadius; // Widgets...
QSpinBox *m_sbLineWidth; // ...
QSpinBox *m_sbBoldWidth; // ...
QFrame *m_fStandardColor; // ...
QFrame *m_fCreateColor; // ...
QLabel *m_lFontSample; // ...
// This is used to track the number of class instances
static int m_refCount;
}; //--------------------------------------------------------------------------//
#endif // _CEDITSTYLETOOLKIT_H