From e6d2b59ccc7da9870007113a68a06b3be62cfb3e Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 22 Sep 2009 22:47:49 +0000 Subject: [PATCH] added new frame for the Top of Friendslist. added menu button "Add" for Add Friend/Create new Profile actions. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1671 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/PeersDialog.cpp | 30 +++- retroshare-gui/src/gui/PeersDialog.h | 3 + retroshare-gui/src/gui/PeersDialog.ui | 157 +++++++++++++----- retroshare-gui/src/gui/images.qrc | 1 + retroshare-gui/src/gui/images/contact.png | Bin 0 -> 681 bytes retroshare-gui/src/gui/images/contact_new.png | Bin 0 -> 752 bytes 6 files changed, 150 insertions(+), 41 deletions(-) create mode 100644 retroshare-gui/src/gui/images/contact.png create mode 100644 retroshare-gui/src/gui/images/contact_new.png diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp index 167f4f7ad..c95aa0528 100644 --- a/retroshare-gui/src/gui/PeersDialog.cpp +++ b/retroshare-gui/src/gui/PeersDialog.cpp @@ -35,8 +35,8 @@ #include "msgs/ChanMsgDialog.h" #include "connect/ConfCertDialog.h" #include "profile/ProfileView.h" - - +#include "GenCertDialog.h" +#include "gui/connect/ConnectFriendWizard.h" #include "gui/Preferences/rsharesettings.h" #include @@ -164,6 +164,12 @@ PeersDialog::PeersDialog(QWidget *parent) timer->start(500); /* half a second */ ui.peertreeWidget->sortItems( 1, Qt::AscendingOrder ); + + QMenu *menu = new QMenu(); + menu->addAction(ui.actionAdd_Friend); + menu->addSeparator(); + menu->addAction(ui.actionCreate_new_Profile); + ui.menupushButton->setMenu(menu); updateAvatar(); @@ -1240,4 +1246,22 @@ void PeersDialog::changeAvatarClicked() { updateAvatar(); -} \ No newline at end of file +} + +void PeersDialog::on_actionAdd_Friend_activated() +{ + ConnectFriendWizard* connectwiz = new ConnectFriendWizard(this); + + // set widget to be deleted after close + connectwiz->setAttribute( Qt::WA_DeleteOnClose, true); + + + connectwiz->show(); +} + +void PeersDialog::on_actionCreate_new_Profile_activated() +{ + static GenCertDialog *gencertdialog = new GenCertDialog(); + gencertdialog->show(); + +} diff --git a/retroshare-gui/src/gui/PeersDialog.h b/retroshare-gui/src/gui/PeersDialog.h index a7ee4fbd4..974136ae4 100644 --- a/retroshare-gui/src/gui/PeersDialog.h +++ b/retroshare-gui/src/gui/PeersDialog.h @@ -109,6 +109,9 @@ private slots: void changeAvatarClicked(); void updateAvatar(); void getAvatar(); + + void on_actionAdd_Friend_activated(); + void on_actionCreate_new_Profile_activated(); signals: diff --git a/retroshare-gui/src/gui/PeersDialog.ui b/retroshare-gui/src/gui/PeersDialog.ui index 67edcae69..1fc0a2626 100644 --- a/retroshare-gui/src/gui/PeersDialog.ui +++ b/retroshare-gui/src/gui/PeersDialog.ui @@ -7,7 +7,7 @@ 0 0 778 - 517 + 523 @@ -482,58 +482,108 @@ Qt::NoContextMenu - + Qt::Horizontal - + + + 6 + 0 - - - 0 + + + QFrame#frame_2{ +background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 #FEFEFE, stop:1 #E8E8E8); + +border: 1px solid #CCCCCC;} + + - - - - - - - :/images/user/friends24.png - - - - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + + + 0 + + + + + + + + :/images/user/friends24.png + + + + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; font-weight:600;">Friends</span></p></body></html> - - - - + + + + + + + + + Qt::Horizontal + + + + 123 + 13 + + + + + + + + Add + + + + + + + :/images/edit_add24.png:/images/edit_add24.png + + + + 16 + 16 + + + + true + + + + + - - - - Qt::Horizontal - - - - 168 - 20 - - - - - + @@ -559,6 +609,10 @@ p, li { white-space: pre-wrap; } false + + QTreeWidget#peertreeWidget{border: 1px solid #CCCCCC; +background: white;} + false @@ -779,6 +833,10 @@ p, li { white-space: pre-wrap; } Qt::DefaultContextMenu + + QTextEdit#msgText{border: 1px solid #CCCCCC; +background: white;} + false @@ -1013,6 +1071,10 @@ p, li { white-space: pre-wrap; } 0 + + QTextEdit#lineEdit{border: 1px solid #CCCCCC; +} + @@ -1051,9 +1113,28 @@ p, li { white-space: pre-wrap; } Clear Chat History + + + + :/images/user/add_user16.png:/images/user/add_user16.png + + + Add Friend + + + + + + :/images/contact_new.png:/images/contact_new.png + + + Create new Profile + + + diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index 66fb319ae..48061e50f 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -24,6 +24,7 @@ images/copyrslink.png images/contacts24.png images/connection.png + images/contact_new.png images/Client0.png images/Client1.png images/Client2.png diff --git a/retroshare-gui/src/gui/images/contact.png b/retroshare-gui/src/gui/images/contact.png new file mode 100644 index 0000000000000000000000000000000000000000..b86f3501237eca9c5797cbd66389b0b8588a81fc GIT binary patch literal 681 zcmV;a0#^NrP)h-6?CL=X)|O?P7Y-F;tG4k96DXbOs&)ZSHty~NBoNx2iL0Rd9r?0@RJ z^5W&|=eO_Nejp+^5#(^0u(4)Es^oD0;Fn0o9mjH;@rN5;Kt4U#!eF&GoT zG&n~TJe}SQoBgD{c8NF$T1?sRk5Dz{)0oM4!Z1_tb&60!%?N-7580;=G`CA8#TI)z zF{=;nBc@Q5^hP;ObJ8>=ZqzAC#W@(LTJX+cqap35kC6U8tuqT;O5f30zsz#G$uuu0 zE2TFPCbQqvYcT@MvW&9GC72mYD=qBF6I2aT#mqRZMpl%>jle=;m>H%<wYcLpek~Cdv zG@7ewhN@y}j7G!nnZDyz$Q5f^1OH|{o*c%vRU8gq_rx4V6ug`t`4iAWoWkL5l$vmYYT0-A>`oD}CjIF>Hr0u^b; P00000NkvXXu0mjf8#FE3 literal 0 HcmV?d00001 diff --git a/retroshare-gui/src/gui/images/contact_new.png b/retroshare-gui/src/gui/images/contact_new.png new file mode 100644 index 0000000000000000000000000000000000000000..0a915b51b8f026efb463074253015554703a6f77 GIT binary patch literal 752 zcmVh?( zxrujf?#$eb0-85BH=jjpJEl;eKq-X+Kp`Szduv!%>tr047iY)0@I1>~Z`ST@mA6ABw+B2=U+ zuzM7B3SM3muJkHK0g73)0F(k97$(NY$yCHirz^J$C#w>X4 zSTMnZJb^-oLKsb=wXo{JzC@BBH28kV&6-=>tL~<-tcuv<7>jNtomJg%hbIbXF~;t)|l8P$jrW>;OhcQ%gZ>0E=BP;-x6hn zVV0@M9KO~#wvA;e9LJ`zvMS$xXwf?8(?NiUY{3Xd1g!(K0ZSPyK!@N5Ax4BEH%3X) z-I0*X<V%yyxXUj@I#`JAT>I^5}j1^B-2uNfm~ zUwid+CprfD`-hDP#+Ypk4Gs>UZa&o!QK460gYWxmfUok$)C4$y08_w0AiisJ*MRx_ i(J4R!Lwol7f9)rf6F)*Nx-HQF0000