revdesc.h

Go to the documentation of this file.
00001 /*
00002         Author: Marco Costalba (C) 2005-2006
00003 
00004         Copyright: See COPYING file that comes with this distribution
00005 */
00006 #ifndef REVDESC_H
00007 #define REVDESC_H
00008 
00009 #include <qtextbrowser.h>
00010 
00011 class QPopupMenu;
00012 class Domain;
00013 
00014 /*
00015         this is placed by Qt Designer as a custom widget.
00016         we prefer QTextBrowser inheritance above
00017         composition to override createPopupMenu()
00018 */
00019 
00020 class RevDesc: public QTextBrowser {
00021 Q_OBJECT
00022 public:
00023         RevDesc(QWidget* parent, const char* name);
00024         void setDomain(Domain* dm) { d = dm; }
00025 
00026 protected:
00027         virtual QPopupMenu* createPopupMenu(const QPoint& pos);
00028 
00029 private slots:
00030         void on_linkClicked(const QString& link);
00031         void on_highlighted(const QString& link);
00032         void on_linkCopy();
00033 
00034 private:
00035         Domain* d;
00036         QString highlightedLink;
00037 };
00038 
00039 #endif

Generated on Fri Dec 7 21:57:38 2007 for QGit by  doxygen 1.5.3