• Main Page
  • Related Pages
  • Classes
  • Files
  • File List

MainColorForm.h

00001 /*
00002  *  Copyright (C) 2008-2010  Lorenzo Bettini, http://www.lorenzobettini.it
00003  *  License: See COPYING file that comes with this distribution
00004  */
00005 
00006 #ifndef MAINCOLORFORM_H
00007 #define MAINCOLORFORM_H
00008 
00009 #include <QtGui/QWidget>
00010 #include <QColor>
00011 
00012 namespace Ui {
00013     class MainColorForm;
00014 }
00015 
00016 namespace srchiliteqt {
00017 
00022 class MainColorForm : public QWidget {
00023     Q_OBJECT
00024     Q_DISABLE_COPY(MainColorForm)
00025 public:
00026     explicit MainColorForm(QWidget *parent = 0);
00027     virtual ~MainColorForm();
00028 
00033     void setColor(const QColor &color);
00034 
00039     void setBackgroundColor(const QColor &color);
00040 
00044     const QColor &getColor() const {
00045         return foreground;
00046     }
00047 
00051     const QColor &getBackgroundColor() const {
00052         return background;
00053     }
00054 
00055 protected:
00056     virtual void changeEvent(QEvent *e);
00057 
00058 private:
00059     Ui::MainColorForm *m_ui;
00060 
00061     QColor foreground;
00062 
00063     QColor background;
00064 
00065 private slots:
00066     void selectBackground();
00067     void selectForeground();
00068 };
00069 
00070 }
00071 
00072 #endif // MAINCOLORFORM_H

Generated on Mon Jul 26 2010 10:44:31 for Source-highlight Qt Library by  doxygen 1.7.1