Changed the default thumbnail image for channel msg item

Added for Friends add menu few more useful actions
Little redesign of Create Forum Message with stylesheets 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2060 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-01-17 01:36:50 +00:00
parent 3afd4442c9
commit 59e44e2fbe
15 changed files with 322 additions and 133 deletions

View File

@ -40,6 +40,7 @@
#include "GenCertDialog.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "gui/forums/CreateForum.h"
#include <sstream>
@ -100,7 +101,9 @@ PeersDialog::PeersDialog(QWidget *parent)
connect( ui.avatartoolButton, SIGNAL(clicked()), SLOT(getAvatar()));
connect( ui.mypersonalstatuslabel, SIGNAL(clicked()), SLOT(statusmessage()));
connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar()));
connect( ui.actionSet_your_Personal_Message, SIGNAL(triggered()), this, SLOT(statusmessage()));
ui.peertabWidget->addTab(new ProfileWidget(),QString(tr("Profile")));
ui.peertreeWidget->setColumnCount(4);
@ -177,6 +180,12 @@ PeersDialog::PeersDialog(QWidget *parent)
menu->addAction(ui.actionAdd_Friend);
menu->addSeparator();
menu->addAction(ui.actionCreate_new_Profile);
menu->addSeparator();
menu->addAction(ui.actionCreate_New_Forum);
menu->addAction(ui.actionCreate_New_Channel);
menu->addAction(ui.actionSet_your_Avatar);
menu->addAction(ui.actionSet_your_Personal_Message);
ui.menupushButton->setMenu(menu);
@ -1380,6 +1389,26 @@ void PeersDialog::on_actionCreate_new_Profile_activated()
}
void PeersDialog::on_actionCreate_New_Forum_activated()
{
static CreateForum *cf = new CreateForum(this);
cf->show();
}
void PeersDialog::on_actionCreate_New_Channel_activated()
{
CreateForum *cf = new CreateForum(NULL, false);
cf->setWindowTitle(tr("Create a new Channel"));
cf->ui.labelicon->setPixmap(QPixmap(":/images/add_channel64.png"));
QString titleStr("<span style=\"font-size:24pt; font-weight:500;"
"color:#32CD32;\">%1</span>");
cf->ui.textlabelcreatforums->setText( titleStr.arg( tr("New Channel") ) ) ;
cf->show();
}
/** Loads own personal status */
void PeersDialog::loadmypersonalstatus()
{

View File

@ -123,7 +123,9 @@ class PeersDialog : public RsAutoUpdatePage
void getAvatar();
void on_actionAdd_Friend_activated();
void on_actionCreate_new_Profile_activated();
void on_actionCreate_new_Profile_activated();
void on_actionCreate_New_Forum_activated();
void on_actionCreate_New_Channel_activated();
void loadmypersonalstatus();

View File

@ -661,9 +661,6 @@ background: white;}</string>
<attribute name="headerDefaultSectionSize">
<number>200</number>
</attribute>
<attribute name="headerDefaultSectionSize">
<number>200</number>
</attribute>
<column>
<property name="text">
<string>Person</string>
@ -1150,6 +1147,60 @@ background: white;}</string>
<string>Create new Profile</string>
</property>
</action>
<action name="actionCreate_New_Forum">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/new_forum16.png</normaloff>:/images/new_forum16.png</iconset>
</property>
<property name="text">
<string>Create New Forum</string>
</property>
<property name="toolTip">
<string>Create new Forum</string>
</property>
<property name="shortcut">
<string>F</string>
</property>
</action>
<action name="actionCreate_New_Channel">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/add_channel24.png</normaloff>:/images/add_channel24.png</iconset>
</property>
<property name="text">
<string>Create New Channel</string>
</property>
<property name="toolTip">
<string>Create new Channel</string>
</property>
<property name="shortcut">
<string>C</string>
</property>
</action>
<action name="actionSet_your_Avatar">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
</property>
<property name="text">
<string>Add your Avatar Picture</string>
</property>
<property name="shortcut">
<string>A</string>
</property>
</action>
<action name="actionSet_your_Personal_Message">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/message-news.png</normaloff>:/images/message-news.png</iconset>
</property>
<property name="text">
<string>Set your Personal Message</string>
</property>
<property name="toolTip">
<string>Set your Personal Message</string>
</property>
</action>
</widget>
<resources>
<include location="images.qrc"/>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>435</width>
<height>205</height>
<width>515</width>
<height>207</height>
</rect>
</property>
<property name="windowTitle">
@ -65,15 +65,18 @@ border-radius: 10px;}</string>
<widget class="QLabel" name="label">
<property name="maximumSize">
<size>
<width>120</width>
<height>90</height>
<width>156</width>
<height>107</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/no-preview.png</pixmap>
<pixmap resource="../images.qrc">:/images/thumb-default-video.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
@ -277,6 +280,7 @@ p, li { white-space: pre-wrap; }
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -323,7 +323,7 @@ void CreateForumMsg::addAttachment(std::string filePath) {
SubFileItem *file = new SubFileItem(filePath);
//file->
ui.vboxLayout->addWidget(file, 1, 0);
ui.verticalLayout->addWidget(file, 1, 0);
//when the file is local or is finished hashing, call the fileHashingFinished method to send a chat message
if (file->getState() == SFI_STATE_LOCAL) {

View File

@ -2,12 +2,15 @@
<ui version="4.0">
<class>CreateForumMsg</class>
<widget class="QMainWindow" name="CreateForumMsg">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>353</height>
<width>482</width>
<height>406</height>
</rect>
</property>
<property name="windowTitle">
@ -17,135 +20,234 @@
<iconset resource="../images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property>
<property name="styleSheet">
<string notr="true">QToolBar#toolBar{background-image: url(:/images/connect/connectFriendBanner.png)}</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout">
<layout class="QGridLayout" name="gridLayout_5">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QVBoxLayout">
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Forum</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="forumName">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QFrame" name="frame_4">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="topMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Forum</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="forumName">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Forum Post Subject</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="forumSubject"/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Forum Post Subject</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="forumSubject"/>
</item>
</layout>
<item row="1" column="0">
<widget class="QFrame" name="frame_2">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>48</height>
</size>
</property>
<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>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="attachFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="emoticonButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/smileys/smile.png</normaloff>:/smileys/smile.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="signBox">
<property name="text">
<string>Sign Message</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/pgp.png</normaloff>:/images/pgp.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>15</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Forum Post</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="signBox">
<property name="text">
<string>Sign Message</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="attachFileButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="emoticonButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/smileys/smile.png</normaloff>:/smileys/smile.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTextEdit" name="forumMessage"/>
<item row="2" column="0">
<widget class="QFrame" name="frame_3">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="topMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Forum Post</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTextEdit" name="forumMessage"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>460</width>
<height>60</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<property name="margin">
<number>0</number>
</property>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout"/>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QFrame" name="frame">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout"/>
</widget>
</item>
</layout>
</widget>
<widget class="QToolBar" name="toolBar">

View File

@ -1,6 +1,6 @@
<RCC>
<qresource prefix="/" >
<file>images/no-preview.png</file>
<file>images/pgp.png</file>
<file>images/rs_wizard.png</file>
<file>images/about.png</file>
<file>images/irkick.png</file>
@ -365,6 +365,7 @@
<file>images/toaster/toaster-background.png</file>
<file>images/toaster/toaster-backrs3.png</file>
<file>images/toaster/toaster-backrs4.png</file>
<file>images/thumb-default-video.png</file>
<file>images/user/add_user24.png</file>
<file>images/user/friends24.png</file>
<file>images/user/identity16.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB