Source-highlight Qt Library
ColorDialog.h
1 /*
2  * Copyright (C) 2008-2010 Lorenzo Bettini, http://www.lorenzobettini.it
3  * License: See COPYING file that comes with this distribution
4  */
5 
6 #ifndef COLORDIALOG_H
7 #define COLORDIALOG_H
8 
9 #include <QtGui/QDialog>
10 #include <QMap>
11 
12 #include "MainColorForm.h"
13 #include "Qt4SyntaxHighlighter.h"
14 
15 namespace Ui {
16  class ColorDialog;
17 }
18 
19 namespace srchiliteqt {
20 
21 class LanguageElemColorForm;
22 
44 class ColorDialog : public QDialog {
45  Q_OBJECT
46  Q_DISABLE_COPY(ColorDialog)
47 
48 
50 public:
54  explicit ColorDialog(srchiliteqt::Qt4SyntaxHighlighter *highlighter_, QWidget *parent = 0);
55  virtual ~ColorDialog();
56 
61  void addColorForm(QWidget *form);
62 
69  void syncFormatters();
70 
71 protected:
72  virtual void changeEvent(QEvent *e);
73 
74  MainColorForm *mainColorForm;
75 
76 private:
77  Ui::ColorDialog *m_ui;
78 
79  QMap<QString, LanguageElemColorForm *> colorFormMap;
80 };
81 
82 }
83 
84 #endif // COLORDIALOG_H
Definition: ColorDialog.cpp:12
void addColorForm(QWidget *form)
Addss a color form to this dialog.
Definition: ColorDialog.cpp:64
Definition: ColorDialog.h:15
A form that can be used to select the style of a language element to highlight (for instance...
Definition: LanguageElemColorForm.h:21
A dialog to change the colors of the foreground and background of an editor and of the font propertie...
Definition: ColorDialog.h:44
A form that can be used to select the color of the main font of the editor.
Definition: MainColorForm.h:22
srchiliteqt::Qt4SyntaxHighlighter * highlighter
the highlighter object
Definition: ColorDialog.h:49
void syncFormatters()
Updates the text formatter of the highlighter using the colors and font properties of the language el...
Definition: ColorDialog.cpp:69
An implementation of QSyntaxHighlighter using GNU Source-highlight library (by relying on GNUSyntaxHi...
Definition: Qt4SyntaxHighlighter.h:38