Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/addon/doxywizard/helplabel.h

Source at commit 1406 created 12 years 10 months ago.
By meklort, Revert drivers.c so that kexts are only loaded when OSBundleRequired is set and that value is not safe mode. Added some comments about it too.
1#ifndef HELPLABEL_H
2#define HELPLABEL_H
3
4#include <QLabel>
5#include <QMenu>
6
7class HelpLabel : public QLabel
8{
9 Q_OBJECT
10 public:
11 HelpLabel(const QString &text) : QLabel(text)
12 { setContextMenuPolicy(Qt::CustomContextMenu);
13 connect(this,SIGNAL(customContextMenuRequested(const QPoint&)),
14 this,SLOT(showMenu(const QPoint&)));
15 }
16 signals:
17 void enter();
18 void reset();
19 private slots:
20 void showMenu(const QPoint &p)
21 {
22 QMenu menu(this);
23 QAction *a = menu.addAction(tr("Reset to default"));
24 if (menu.exec(mapToGlobal(p))==a)
25 {
26 reset();
27 }
28 }
29 protected:
30 void enterEvent( QEvent * event ) { enter(); QLabel::enterEvent(event); }
31};
32
33#endif
34

Archive Download this file

Revision: 1406