added a Help Dialog to can make translated html Help/Faq/ pages for RetroShare for each language a own html page.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@662 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-08-05 18:36:07 +00:00
parent 4c840b5c7e
commit e92080789a
28 changed files with 2080 additions and 146 deletions

View file

@ -89,7 +89,7 @@
#define IMAGE_UNFINISHED ":/images/underconstruction.png"
#define IMAGE_MINIMIZE ":/images/window_nofullscreen.png"
#define IMAGE_MAXIMIZE ":/images/window_fullscreen.png"
#define IMG_HELP ":/images/help.png"
/* Keys for UI Preferences */
#define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit"
@ -297,6 +297,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
#endif
menu->addAction(_prefsAct);
menu->addAction(_smplayerAct);
menu->addAction(_helpAct);
menu->addSeparator();
menu->addAction(QIcon(IMAGE_MINIMIZE), tr("Minimize"), this, SLOT(showMinimized()));
menu->addAction(QIcon(IMAGE_MAXIMIZE), tr("Maximize"), this, SLOT(showMaximized()));
@ -519,6 +520,9 @@ void MainWindow::createActions()
_smplayerAct = new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), this);
connect(_smplayerAct, SIGNAL(triggered()),this, SLOT(showsmplayer()));
_helpAct = new QAction(QIcon(IMG_HELP), tr("Help"), this);
connect(_helpAct, SIGNAL(triggered()), this, SLOT(showHelpDialog()));
//connect(ui.btntoggletoolbox, SIGNAL(toggled(bool)), this, SLOT(showToolboxFrame(bool)));
@ -711,6 +715,23 @@ void MainWindow::showabout()
helpdlg->show();
}
/** Displays the help browser and displays the most recently viewed help
* topic. */
void MainWindow::showHelpDialog()
{
showHelpDialog(QString());
}
/**< Shows the help browser and displays the given help <b>topic</b>. */
void MainWindow::showHelpDialog(const QString &topic)
{
static HelpBrowser *helpBrowser = 0;
if (!helpBrowser)
helpBrowser = new HelpBrowser(this);
helpBrowser->showWindow(topic);
}
void MainWindow::setStyle()
{
QString standardSheet = "{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 <color1>, stop:1 <color2>);}";