mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 17:36:19 -05:00
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:
parent
d46e0c4299
commit
e6d2b59ccc
@ -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 <iostream>
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
}
|
||||
|
@ -109,6 +109,9 @@ private slots:
|
||||
void changeAvatarClicked();
|
||||
void updateAvatar();
|
||||
void getAvatar();
|
||||
|
||||
void on_actionAdd_Friend_activated();
|
||||
void on_actionCreate_new_Profile_activated();
|
||||
|
||||
|
||||
signals:
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>778</width>
|
||||
<height>517</height>
|
||||
<height>523</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="palette">
|
||||
@ -482,58 +482,108 @@
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<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">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="styleSheet">
|
||||
<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>
|
||||
<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><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="margin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="verticalSpacing">
|
||||
<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><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></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</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 row="0" column="1">
|
||||
<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">
|
||||
<item row="1" column="0">
|
||||
<widget class="QTreeWidget" name="peertreeWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
@ -559,6 +609,10 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QTreeWidget#peertreeWidget{border: 1px solid #CCCCCC;
|
||||
background: white;}</string>
|
||||
</property>
|
||||
<property name="autoScroll">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -779,6 +833,10 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::DefaultContextMenu</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QTextEdit#msgText{border: 1px solid #CCCCCC;
|
||||
background: white;}</string>
|
||||
</property>
|
||||
<property name="undoRedoEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -1013,6 +1071,10 @@ p, li { white-space: pre-wrap; }
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QTextEdit#lineEdit{border: 1px solid #CCCCCC;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -1051,9 +1113,28 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Clear Chat History</string>
|
||||
</property>
|
||||
</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>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -24,6 +24,7 @@
|
||||
<file>images/copyrslink.png</file>
|
||||
<file>images/contacts24.png</file>
|
||||
<file>images/connection.png</file>
|
||||
<file>images/contact_new.png</file>
|
||||
<file>images/Client0.png</file>
|
||||
<file>images/Client1.png</file>
|
||||
<file>images/Client2.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/contact.png
Normal file
BIN
retroshare-gui/src/gui/images/contact.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 681 B |
BIN
retroshare-gui/src/gui/images/contact_new.png
Normal file
BIN
retroshare-gui/src/gui/images/contact_new.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 752 B |
Loading…
Reference in New Issue
Block a user