iisiconlabel.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *   Copyright: http://www.ii-system.com                                   *
00004  *   License:   LGPL                                                       *
00005  *                                                                         *
00006  ***************************************************************************/
00007 
00008 #ifndef IISICONLABEL_H
00009 #define IISICONLABEL_H
00010 
00011 #include <QtGui>
00012 
00013 #include "iistaskpanel_global.h"
00014 
00015 struct iisIconLabelScheme;
00016 
00017 class IISTASKPANEL_EXPORT iisIconLabel : public QWidget
00018 {
00019         Q_OBJECT
00020 
00021 public:
00022         iisIconLabel(const QIcon &icon, const QString &title, QWidget *parent = 0);
00023         virtual ~iisIconLabel();
00024 
00025         void setColors(const QColor &color, const QColor &colorOver, const QColor &colorOff);
00026         void setFont(const QFont &font);
00027         void setFocusPen(const QPen &pen);
00028 
00029         void setSchemePointer(iisIconLabelScheme **pointer);
00030 
00031         virtual QSize sizeHint() const;
00032         virtual QSize minimumSizeHint() const;
00033 
00034 Q_SIGNALS:
00035         void pressed();
00036         void released();
00037         void clicked();
00038         void activated();
00039         void contextMenu();
00040 
00041 protected:
00042         virtual void paintEvent ( QPaintEvent * event );
00043         virtual void enterEvent ( QEvent * event );
00044         virtual void leaveEvent ( QEvent * event );
00045 
00046         virtual void mousePressEvent ( QMouseEvent * event );
00047         virtual void mouseReleaseEvent ( QMouseEvent * event );
00048         virtual void keyPressEvent ( QKeyEvent * event );
00049 
00050         QIcon myPixmap;
00051         QString myText;
00052 
00053         QColor myColor, myColorOver, myColorDisabled;
00054         QFont myFont;
00055         QPen myPen;
00056 
00057         iisIconLabelScheme **mySchemePointer;
00058 
00059         bool m_over, m_pressed;
00060 
00061         bool m_changeCursorOver, m_underlineOver;
00062 };
00063 
00064 #endif // IISICONLABEL_H

Generated on Wed Nov 23 19:00:18 2011 for FreeCAD by  doxygen 1.6.1