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
This commit is contained in:
defnax 2009-09-22 22:47:49 +00:00
parent d46e0c4299
commit e6d2b59ccc
6 changed files with 150 additions and 41 deletions

View File

@ -35,8 +35,8 @@
#include "msgs/ChanMsgDialog.h" #include "msgs/ChanMsgDialog.h"
#include "connect/ConfCertDialog.h" #include "connect/ConfCertDialog.h"
#include "profile/ProfileView.h" #include "profile/ProfileView.h"
#include "GenCertDialog.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "gui/Preferences/rsharesettings.h" #include "gui/Preferences/rsharesettings.h"
#include <iostream> #include <iostream>
@ -165,6 +165,12 @@ PeersDialog::PeersDialog(QWidget *parent)
ui.peertreeWidget->sortItems( 1, Qt::AscendingOrder ); 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(); updateAvatar();
@ -1241,3 +1247,21 @@ void PeersDialog::changeAvatarClicked()
updateAvatar(); updateAvatar();
} }
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();
}

View File

@ -110,6 +110,9 @@ private slots:
void updateAvatar(); void updateAvatar();
void getAvatar(); void getAvatar();
void on_actionAdd_Friend_activated();
void on_actionCreate_new_Profile_activated();
signals: signals:
void friendsUpdated() ; void friendsUpdated() ;

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>778</width> <width>778</width>
<height>517</height> <height>523</height>
</rect> </rect>
</property> </property>
<property name="palette"> <property name="palette">
@ -482,58 +482,108 @@
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QSplitter" name="splitter"> <widget class="QSplitter" name="splitter">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_4">
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout"> <widget class="QFrame" name="frame_2">
<property name="verticalSpacing"> <property name="styleSheet">
<number>0</number> <string notr="true"> QFrame#frame_2{
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #FEFEFE, stop:1 #E8E8E8);
border: 1px solid #CCCCCC;}
</string>
</property> </property>
<item row="0" column="0"> <property name="frameShape">
<widget class="QLabel" name="label"> <enum>QFrame::StyledPanel</enum>
<property name="text"> </property>
<string/> <property name="frameShadow">
</property> <enum>QFrame::Raised</enum>
<property name="pixmap"> </property>
<pixmap resource="images.qrc">:/images/user/friends24.png</pixmap> <layout class="QGridLayout" name="gridLayout_2">
</property> <property name="margin">
</widget> <number>2</number>
</item> </property>
<item row="0" column="1"> <item row="0" column="0">
<widget class="QLabel" name="label_2"> <layout class="QGridLayout">
<property name="text"> <property name="verticalSpacing">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; <number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="images.qrc">:/images/user/friends24.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; font-weight:600;&quot;&gt;Friends&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; font-weight:600;&quot;&gt;Friends&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
<item row="0" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>123</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="menupushButton">
<property name="toolTip">
<string>Add</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item row="0" column="1"> <item row="1" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>168</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<widget class="QTreeWidget" name="peertreeWidget"> <widget class="QTreeWidget" name="peertreeWidget">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
@ -559,6 +609,10 @@ p, li { white-space: pre-wrap; }
<property name="acceptDrops"> <property name="acceptDrops">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet">
<string notr="true">QTreeWidget#peertreeWidget{border: 1px solid #CCCCCC;
background: white;}</string>
</property>
<property name="autoScroll"> <property name="autoScroll">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -779,6 +833,10 @@ p, li { white-space: pre-wrap; }
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum> <enum>Qt::DefaultContextMenu</enum>
</property> </property>
<property name="styleSheet">
<string notr="true">QTextEdit#msgText{border: 1px solid #CCCCCC;
background: white;}</string>
</property>
<property name="undoRedoEnabled"> <property name="undoRedoEnabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -1013,6 +1071,10 @@ p, li { white-space: pre-wrap; }
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QTextEdit#lineEdit{border: 1px solid #CCCCCC;
}</string>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -1051,9 +1113,28 @@ p, li { white-space: pre-wrap; }
<string>Clear Chat History</string> <string>Clear Chat History</string>
</property> </property>
</action> </action>
<action name="actionAdd_Friend">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/user/add_user16.png</normaloff>:/images/user/add_user16.png</iconset>
</property>
<property name="text">
<string>Add Friend</string>
</property>
</action>
<action name="actionCreate_new_Profile">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/contact_new.png</normaloff>:/images/contact_new.png</iconset>
</property>
<property name="text">
<string>Create new Profile</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>
<include location="images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -24,6 +24,7 @@
<file>images/copyrslink.png</file> <file>images/copyrslink.png</file>
<file>images/contacts24.png</file> <file>images/contacts24.png</file>
<file>images/connection.png</file> <file>images/connection.png</file>
<file>images/contact_new.png</file>
<file>images/Client0.png</file> <file>images/Client0.png</file>
<file>images/Client1.png</file> <file>images/Client1.png</file>
<file>images/Client2.png</file> <file>images/Client2.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B