mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
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:
parent
7c6a7edfde
commit
a07e8d889a
8 changed files with 101 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue