mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added CreateGroup Dialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3519 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1352b27e7a
commit
ad9f981ab0
@ -310,7 +310,8 @@ HEADERS += rshare.h \
|
||||
gui/feeds/SubFileItem.h \
|
||||
gui/feeds/SubDestItem.h \
|
||||
gui/feeds/AttachFileItem.h \
|
||||
gui/connect/ConnectFriendWizard.h
|
||||
gui/connect/ConnectFriendWizard.h \
|
||||
gui/groups/CreateGroup.h
|
||||
|
||||
|
||||
FORMS += gui/StartDialog.ui \
|
||||
@ -388,6 +389,7 @@ FORMS += gui/StartDialog.ui \
|
||||
gui/feeds/SubDestItem.ui \
|
||||
gui/feeds/AttachFileItem.ui \
|
||||
gui/im_history/ImHistoryBrowser.ui \
|
||||
gui/groups/CreateGroup.ui
|
||||
|
||||
SOURCES += main.cpp \
|
||||
rshare.cpp \
|
||||
@ -525,7 +527,8 @@ SOURCES += main.cpp \
|
||||
gui/feeds/SubFileItem.cpp \
|
||||
gui/feeds/SubDestItem.cpp \
|
||||
gui/feeds/AttachFileItem.cpp \
|
||||
gui/connect/ConnectFriendWizard.cpp
|
||||
gui/connect/ConnectFriendWizard.cpp \
|
||||
gui/groups/CreateGroup.cpp
|
||||
|
||||
RESOURCES += gui/images.qrc lang/lang.qrc gui/help/content/content.qrc
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "connect/ConnectFriendWizard.h"
|
||||
#include "forums/CreateForum.h"
|
||||
#include "channels/CreateChannel.h"
|
||||
#include "groups/CreateGroup.h"
|
||||
#include "feeds/AttachFileItem.h"
|
||||
#include "im_history/ImHistoryBrowser.h"
|
||||
#include "common/RSTreeWidgetItem.h"
|
||||
@ -189,6 +190,8 @@ PeersDialog::PeersDialog(QWidget *parent)
|
||||
|
||||
QMenu *menu = new QMenu();
|
||||
menu->addAction(ui.actionAdd_Friend);
|
||||
menu->addAction(ui.actionAdd_Group);
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addAction(ui.actionCreate_New_Forum);
|
||||
#ifndef RS_RELEASE_VERSION
|
||||
@ -1712,3 +1715,9 @@ void PeersDialog::on_actionMessageHistory_triggered()
|
||||
ImHistoryBrowser imBrowser(false, historyKeeper, ui.lineEdit, this);
|
||||
imBrowser.exec();
|
||||
}
|
||||
|
||||
void PeersDialog::on_actionAdd_Group_activated()
|
||||
{
|
||||
CreateGroup createGrpDialog (this);
|
||||
createGrpDialog.exec();
|
||||
}
|
||||
|
@ -143,6 +143,7 @@ private slots:
|
||||
void getAvatar();
|
||||
|
||||
void on_actionAdd_Friend_activated();
|
||||
void on_actionAdd_Group_activated();
|
||||
void on_actionCreate_New_Forum_activated();
|
||||
void on_actionCreate_New_Channel_activated();
|
||||
|
||||
|
@ -1497,6 +1497,18 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Hide Status Column</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_Group">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/user/add_group22.png</normaloff>:/images/user/add_group22.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add a new Group</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add a new Group</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
|
38
retroshare-gui/src/gui/groups/CreateGroup.cpp
Normal file
38
retroshare-gui/src/gui/groups/CreateGroup.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2006 - 2010 RetroShare Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#include "CreateGroup.h"
|
||||
|
||||
/** Default constructor */
|
||||
CreateGroup::CreateGroup(QWidget *parent, Qt::WFlags flags)
|
||||
: QDialog(parent, flags)
|
||||
{
|
||||
/* Invoke Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Destructor. */
|
||||
CreateGroup::~CreateGroup()
|
||||
{
|
||||
}
|
||||
|
53
retroshare-gui/src/gui/groups/CreateGroup.h
Normal file
53
retroshare-gui/src/gui/groups/CreateGroup.h
Normal file
@ -0,0 +1,53 @@
|
||||
/****************************************************************
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2006 - 2010 RetroShare Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
||||
#ifndef _CREATEGROUP_H
|
||||
#define _CREATEGROUP_H
|
||||
|
||||
#include "ui_CreateGroup.h"
|
||||
|
||||
|
||||
class CreateGroup : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** Default constructor */
|
||||
CreateGroup(QWidget *parent = 0, Qt::WFlags flags = 0);
|
||||
/** Default destructor */
|
||||
~CreateGroup();
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::CreateGroup ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
202
retroshare-gui/src/gui/groups/CreateGroup.ui
Normal file
202
retroshare-gui/src/gui/groups/CreateGroup.ui
Normal file
@ -0,0 +1,202 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CreateGroup</class>
|
||||
<widget class="QDialog" name="CreateGroup">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>386</width>
|
||||
<height>158</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Create a Group</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame{background-image: url(:/images/connect/connectFriendBanner.png);}
|
||||
</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/user/add_group256.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>18</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:18pt; font-weight:600; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:400; color:#ffffff;">Create a Group</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:9pt;">Group Name</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="groupname">
|
||||
<property name="toolTip">
|
||||
<string>Enter a name for your group</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>208</width>
|
||||
<height>21</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CreateGroup</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>338</x>
|
||||
<y>116</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>192</x>
|
||||
<y>78</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -39,6 +39,8 @@
|
||||
<file>images/add_channel64.png</file>
|
||||
<file>images/add_channel24.png</file>
|
||||
<file>images/add_channel32.png</file>
|
||||
<file>images/user/add_group22.png</file>
|
||||
<file>images/user/add_group256.png</file>
|
||||
<file>images/avatarstatus_bg.png</file>
|
||||
<file>images/avatarstatus_bg_online.png</file>
|
||||
<file>images/avatarstatus_bg_away.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/user/add_group256.png
Normal file
BIN
retroshare-gui/src/gui/images/user/add_group256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
retroshare-gui/src/gui/images/user/add_user256.png
Normal file
BIN
retroshare-gui/src/gui/images/user/add_user256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Loading…
Reference in New Issue
Block a user