added help system to the MainPage class. Each page can now derive its own help string and show it using a two-states help button. To try it, I have implemented it on the NewsFeed page

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6514 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-07-18 19:32:12 +00:00
parent 7c6a7edfde
commit a07e8d889a
8 changed files with 101 additions and 5 deletions

View file

@ -24,17 +24,31 @@
#define _MAINPAGE_H
#include <QWidget>
#include <QTextBrowser>
class UserNotify;
class MainPage : public QWidget
{
public:
/** Default Constructor */
MainPage(QWidget *parent = 0, Qt::WindowFlags flags = 0) : QWidget(parent, flags) {}
Q_OBJECT
virtual void retranslateUi() {}
virtual UserNotify *getUserNotify(QObject */*parent*/) { return NULL; }
public:
/** Default Constructor */
MainPage(QWidget *parent = 0, Qt::WindowFlags flags = 0) ;
virtual void retranslateUi() {}
virtual UserNotify *getUserNotify(QObject */*parent*/) { return NULL; }
// Overload this to add some help info to the page. The way the info is
// shown is handled by showHelp() below;
//
virtual const QString& helpHtmlText() const { static QString s ; return s ; }
public slots:
void showHelp(bool b) ;
private:
QTextBrowser *help_browser ;
};
#endif