From dbae30781008da1d43764daa23a02a18a873f24c Mon Sep 17 00:00:00 2001 From: defnax Date: Mon, 31 Mar 2008 13:00:00 +0000 Subject: [PATCH] moved SMPlayer,Messenger, About/Help to the left SideBar git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@446 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/HelpDialog.cpp | 4 +++- retroshare-gui/src/gui/HelpDialog.h | 4 ++-- retroshare-gui/src/gui/HelpDialog.ui | 2 +- retroshare-gui/src/gui/MainWindow.cpp | 25 +++++++++++++------------ retroshare-gui/src/gui/MainWindow.h | 2 ++ retroshare-gui/src/gui/MainWindow.ui | 27 +++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 16 deletions(-) diff --git a/retroshare-gui/src/gui/HelpDialog.cpp b/retroshare-gui/src/gui/HelpDialog.cpp index 2c386fe4e..42d76ca33 100644 --- a/retroshare-gui/src/gui/HelpDialog.cpp +++ b/retroshare-gui/src/gui/HelpDialog.cpp @@ -41,7 +41,7 @@ /** Constructor */ HelpDialog::HelpDialog(QWidget *parent) -: MainPage(parent) +:QDialog(parent) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); @@ -62,6 +62,8 @@ HelpDialog::HelpDialog(QWidget *parent) QTextStream in(&thanksFile); ui.thanks->setText(in.readAll()); } + + ui.label_4->setMinimumWidth(20); /* Hide platform specific features */ diff --git a/retroshare-gui/src/gui/HelpDialog.h b/retroshare-gui/src/gui/HelpDialog.h index 831992da6..3c3a007f7 100644 --- a/retroshare-gui/src/gui/HelpDialog.h +++ b/retroshare-gui/src/gui/HelpDialog.h @@ -25,12 +25,12 @@ #include -#include "mainpage.h" +//#include "mainpage.h" #include "ui_HelpDialog.h" #include "rsiface/rstypes.h" -class HelpDialog : public MainPage +class HelpDialog : public QDialog { Q_OBJECT diff --git a/retroshare-gui/src/gui/HelpDialog.ui b/retroshare-gui/src/gui/HelpDialog.ui index 013416111..b3b5877d3 100644 --- a/retroshare-gui/src/gui/HelpDialog.ui +++ b/retroshare-gui/src/gui/HelpDialog.ui @@ -1,6 +1,6 @@ HelpDialog - + 0 diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 0cdd7e124..c4d557561 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -118,11 +118,14 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) applicationWindow = new ApplicationWindow(); applicationWindow->hide(); - /** General ToolBox**/ + /** Left Side ToolBar**/ connect(ui.actionAdd_Friend, SIGNAL(triggered() ), this , SLOT( addFriend() ) ); connect(ui.actionInvite_Friend, SIGNAL(triggered() ), this , SLOT( inviteFriend() ) ); connect(ui.actionAdd_Share, SIGNAL(triggered() ), this , SLOT( addSharedDirectory() ) ); connect(ui.actionOptions, SIGNAL(triggered()), this, SLOT( showPreferencesWindow()) ); + connect(ui.actionMessenger, SIGNAL(triggered()), this, SLOT( showMessengerWindow()) ); + connect(ui.actionSMPlayer, SIGNAL(triggered()), this, SLOT( showsmplayer()) ); + connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT( showabout()) ); connect(ui.actionColor, SIGNAL(triggered()), this, SLOT( setStyle()) ); @@ -133,7 +136,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) /** adjusted quit behaviour: trigger a warning that can be switched off in the saved config file RetroShare.conf */ - //ui.actionQuit->setToolTip(tr("Quit")); connect(ui.actionQuit, SIGNAL(triggered()), this, SLOT(doQuit())); /* load the StyleSheet*/ @@ -176,8 +178,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) // createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp)); #endif - ui.stackPages->add(new HelpDialog(ui.stackPages), - createPageAction(QIcon(IMAGE_ABOUT), tr("About/Help"), grp)); + //ui.stackPages->add(new HelpDialog(ui.stackPages), + // createPageAction(QIcon(IMAGE_ABOUT), tr("About/Help"), grp)); //ui.stackPages->add(groupsDialog = new GroupsDialog(ui.stackPages), // createPageAction(QIcon(), tr("Groups"), grp)); @@ -193,14 +195,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) ui.toolBar->addActions(grp->actions()); ui.toolBar->addSeparator(); connect(grp, SIGNAL(triggered(QAction *)), ui.stackPages, SLOT(showPage(QAction *))); - - - /* Create and bind the messenger button */ - addAction(new QAction(QIcon(IMAGE_RSM32), tr("Messenger"), ui.toolBar), SLOT(showMessengerWindow())); - - - //addAction(new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), ui.toolBar), SLOT(showsmplayer())); - + @@ -659,6 +654,12 @@ void MainWindow::showsmplayer() } +void MainWindow::showabout() +{ + static HelpDialog *helpdlg = new HelpDialog(this); + helpdlg->show(); +} + void MainWindow::setStyle() { QString standardSheet = "{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 , stop:1 );}"; diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index 750fe8da2..ca5c02d61 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -124,6 +124,8 @@ private slots: void showMessengerWindow(); void showApplWindow(); void showsmplayer(); + void showabout(); + void showSettings(); void setStyle(); diff --git a/retroshare-gui/src/gui/MainWindow.ui b/retroshare-gui/src/gui/MainWindow.ui index ab4383848..6e154abcd 100644 --- a/retroshare-gui/src/gui/MainWindow.ui +++ b/retroshare-gui/src/gui/MainWindow.ui @@ -1080,8 +1080,11 @@ + + + @@ -1133,6 +1136,30 @@ Color + + + :/images/smplayer_icon32.png + + + SMPlayer + + + + + :/images/kdmconfig.png + + + Messenger + + + + + :/images/informations_24x24.png + + + About + +