added view button

let left toolbar moveable to right side.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1144 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-04-29 17:07:28 +00:00
parent 1cc8639305
commit 88fa2715d5
4 changed files with 104 additions and 44 deletions

View File

@ -1052,7 +1052,7 @@
<string>toolBar_2</string> <string>toolBar_2</string>
</property> </property>
<property name="allowedAreas" > <property name="allowedAreas" >
<set>Qt::LeftToolBarArea</set> <set>Qt::LeftToolBarArea|Qt::RightToolBarArea</set>
</property> </property>
<attribute name="toolBarArea" > <attribute name="toolBarArea" >
<enum>LeftToolBarArea</enum> <enum>LeftToolBarArea</enum>

View File

@ -103,7 +103,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
QTreeWidgetItem * headerItem = ui.connecttreeWidget->headerItem(); QTreeWidgetItem * headerItem = ui.connecttreeWidget->headerItem();
headerItem->setTextAlignment(0, Qt::AlignHCenter | Qt::AlignVCenter); headerItem->setTextAlignment(0, Qt::AlignHCenter | Qt::AlignVCenter);
headerItem->setTextAlignment(1, Qt::AlignHCenter | Qt::AlignVCenter); headerItem->setTextAlignment(1, Qt::AlignHCenter | Qt::AlignVCenter);
headerItem->setTextAlignment(2, Qt::AlignHCenter | Qt::AlignVCenter); headerItem->setTextAlignment(2, Qt::AlignHCenter | Qt::AlignVCenter);
headerItem->setTextAlignment(3, Qt::AlignHCenter | Qt::AlignVCenter); headerItem->setTextAlignment(3, Qt::AlignHCenter | Qt::AlignVCenter);
headerItem->setTextAlignment(4, Qt::AlignHCenter | Qt::AlignVCenter); headerItem->setTextAlignment(4, Qt::AlignHCenter | Qt::AlignVCenter);
headerItem->setTextAlignment(5, Qt::AlignHCenter | Qt::AlignVCenter); headerItem->setTextAlignment(5, Qt::AlignHCenter | Qt::AlignVCenter);
@ -126,6 +126,13 @@ NetworkDialog::NetworkDialog(QWidget *parent)
setLogInfo(tr("Welcome to RetroShare."), QString::fromUtf8("blue")); setLogInfo(tr("Welcome to RetroShare."), QString::fromUtf8("blue"));
QMenu *menu = new QMenu("View");
menu->addAction(ui.actionTabsright);
menu->addAction(ui.actionTabswest);
menu->addAction(ui.actionTabssouth);
menu->addAction(ui.actionTabsnorth);
ui.viewButton->setMenu(menu);
/* Hide platform specific features */ /* Hide platform specific features */
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
@ -583,3 +590,23 @@ void NetworkDialog::displayInfoLogMenu(const QPoint& pos) {
// XXX: Why mapToGlobal() is not enough? // XXX: Why mapToGlobal() is not enough?
myLogMenu.exec(mapToGlobal(pos)+QPoint(0,320)); myLogMenu.exec(mapToGlobal(pos)+QPoint(0,320));
} }
void NetworkDialog::on_actionTabsright_activated()
{
ui.networkTab->setTabPosition(QTabWidget::East);
}
void NetworkDialog::on_actionTabsnorth_activated()
{
ui.networkTab->setTabPosition(QTabWidget::North);
}
void NetworkDialog::on_actionTabssouth_activated()
{
ui.networkTab->setTabPosition(QTabWidget::South);
}
void NetworkDialog::on_actionTabswest_activated()
{
ui.networkTab->setTabPosition(QTabWidget::West);
}

View File

@ -17,30 +17,30 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#ifndef _CONNECTIONSDIALOG_H #ifndef _CONNECTIONSDIALOG_H
#define _CONNECTIONSDIALOG_H #define _CONNECTIONSDIALOG_H
#include <QFileDialog> #include <QFileDialog>
//#include <config/rsharesettings.h> //#include <config/rsharesettings.h>
#include "mainpage.h" #include "mainpage.h"
#include "ui_NetworkDialog.h" #include "ui_NetworkDialog.h"
#include "connect/ConnectDialog.h" #include "connect/ConnectDialog.h"
class NetworkDialog : public MainPage class NetworkDialog : public MainPage
{ {
Q_OBJECT Q_OBJECT
public: public:
/** Default Constructor */ /** Default Constructor */
NetworkDialog(QWidget *parent = 0); NetworkDialog(QWidget *parent = 0);
/** Default Destructor */ /** Default Destructor */
void showpeerdetails(std::string id); void showpeerdetails(std::string id);
@ -48,52 +48,58 @@ public slots:
void insertConnect(); void insertConnect();
std::string loadneighbour(); std::string loadneighbour();
/* void loadneighbour(); */ /* void loadneighbour(); */
void setLogInfo(QString info, QColor color=QApplication::palette().color(QPalette::WindowText)); void setLogInfo(QString info, QColor color=QApplication::palette().color(QPalette::WindowText));
private slots: private slots:
void makeFriend() ; void makeFriend() ;
void denyFriend() ; void denyFriend() ;
void deleteCert() ; void deleteCert() ;
void peerdetails(); void peerdetails();
/** Create the context popup menu and it's submenus */ /** Create the context popup menu and it's submenus */
void connecttreeWidgetCostumPopupMenu( QPoint point ); void connecttreeWidgetCostumPopupMenu( QPoint point );
/** Called when user clicks "Load Cert" to choose location of a Cert file */ /** Called when user clicks "Load Cert" to choose location of a Cert file */
void loadcert(); void loadcert();
void authneighbour(); void authneighbour();
void addneighbour(); void addneighbour();
void on_actionClearLog_triggered(); void on_actionClearLog_triggered();
void displayInfoLogMenu(const QPoint& pos); void displayInfoLogMenu(const QPoint& pos);
void on_actionTabsright_activated();
void on_actionTabsnorth_activated();
void on_actionTabssouth_activated();
void on_actionTabswest_activated();
private: private:
QTreeWidgetItem *getCurrentNeighbour(); QTreeWidgetItem *getCurrentNeighbour();
/** Define the popup menus for the Context menu */ /** Define the popup menus for the Context menu */
QMenu* contextMnu; QMenu* contextMnu;
/** Defines the actions for the context menu */ /** Defines the actions for the context menu */
QAction* peerdetailsAct; QAction* peerdetailsAct;
QAction* denyFriendAct; QAction* denyFriendAct;
QAction* deleteCertAct; QAction* deleteCertAct;
QAction* makefriendAct; QAction* makefriendAct;
QAction* authAct; QAction* authAct;
QAction* loadcertAct; QAction* loadcertAct;
/* connection dialog */ /* connection dialog */
ConnectDialog *connectdialog; ConnectDialog *connectdialog;
QTreeWidget *connecttreeWidget; QTreeWidget *connecttreeWidget;
class NetworkView *networkview; class NetworkView *networkview;
/** Qt Designer generated object */ /** Qt Designer generated object */
Ui::NetworkDialog ui; Ui::NetworkDialog ui;
}; };
#endif #endif

View File

@ -85,6 +85,13 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="3" >
<widget class="QPushButton" name="viewButton" >
<property name="text" >
<string>View</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
@ -231,6 +238,26 @@ p, li { white-space: pre-wrap; }
<string>Clear</string> <string>Clear</string>
</property> </property>
</action> </action>
<action name="actionTabsright" >
<property name="text" >
<string>Set Tabs Right</string>
</property>
</action>
<action name="actionTabsnorth" >
<property name="text" >
<string>Set Tabs North</string>
</property>
</action>
<action name="actionTabssouth" >
<property name="text" >
<string>Set Tabs South</string>
</property>
</action>
<action name="actionTabswest" >
<property name="text" >
<string>Set Tabs Left</string>
</property>
</action>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>