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 "GenCertDialog.h"
#include "gui/connect/ConnectFriendWizard.h" #include "gui/connect/ConnectFriendWizard.h"
#include "gui/forums/CreateForum.h"
#include <sstream> #include <sstream>
@ -100,6 +101,8 @@ PeersDialog::PeersDialog(QWidget *parent)
connect( ui.avatartoolButton, SIGNAL(clicked()), SLOT(getAvatar())); connect( ui.avatartoolButton, SIGNAL(clicked()), SLOT(getAvatar()));
connect( ui.mypersonalstatuslabel, SIGNAL(clicked()), SLOT(statusmessage())); 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.peertabWidget->addTab(new ProfileWidget(),QString(tr("Profile")));
@ -177,6 +180,12 @@ PeersDialog::PeersDialog(QWidget *parent)
menu->addAction(ui.actionAdd_Friend); menu->addAction(ui.actionAdd_Friend);
menu->addSeparator(); menu->addSeparator();
menu->addAction(ui.actionCreate_new_Profile); 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); 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 */ /** Loads own personal status */
void PeersDialog::loadmypersonalstatus() void PeersDialog::loadmypersonalstatus()
{ {

View File

@ -124,6 +124,8 @@ class PeersDialog : public RsAutoUpdatePage
void on_actionAdd_Friend_activated(); 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(); void loadmypersonalstatus();

View File

@ -661,9 +661,6 @@ background: white;}</string>
<attribute name="headerDefaultSectionSize"> <attribute name="headerDefaultSectionSize">
<number>200</number> <number>200</number>
</attribute> </attribute>
<attribute name="headerDefaultSectionSize">
<number>200</number>
</attribute>
<column> <column>
<property name="text"> <property name="text">
<string>Person</string> <string>Person</string>
@ -1150,6 +1147,60 @@ background: white;}</string>
<string>Create new Profile</string> <string>Create new Profile</string>
</property> </property>
</action> </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> </widget>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>435</width> <width>515</width>
<height>205</height> <height>207</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -65,15 +65,18 @@ border-radius: 10px;}</string>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>120</width> <width>156</width>
<height>90</height> <height>107</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="pixmap"> <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> </property>
</widget> </widget>
</item> </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"/>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -323,7 +323,7 @@ void CreateForumMsg::addAttachment(std::string filePath) {
SubFileItem *file = new SubFileItem(filePath); SubFileItem *file = new SubFileItem(filePath);
//file-> //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 //when the file is local or is finished hashing, call the fileHashingFinished method to send a chat message
if (file->getState() == SFI_STATE_LOCAL) { if (file->getState() == SFI_STATE_LOCAL) {

View File

@ -2,12 +2,15 @@
<ui version="4.0"> <ui version="4.0">
<class>CreateForumMsg</class> <class>CreateForumMsg</class>
<widget class="QMainWindow" name="CreateForumMsg"> <widget class="QMainWindow" name="CreateForumMsg">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>441</width> <width>482</width>
<height>353</height> <height>406</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,14 +20,38 @@
<iconset resource="../images.qrc"> <iconset resource="../images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset> <normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property> </property>
<property name="styleSheet">
<string notr="true">QToolBar#toolBar{background-image: url(:/images/connect/connectFriendBanner.png)}</string>
</property>
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum> <enum>Qt::ToolButtonTextUnderIcon</enum>
</property> </property>
<widget class="QWidget" name="centralwidget"> <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="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"> <item row="0" column="0">
<layout class="QVBoxLayout">
<item>
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
@ -42,7 +69,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="1" column="0">
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
@ -56,38 +83,31 @@
</item> </item>
</layout> </layout>
</item> </item>
<item> </layout>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Forum Post</string>
</property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="0">
<spacer> <widget class="QFrame" name="frame_2">
<property name="orientation"> <property name="maximumSize">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>16777215</width>
<height>20</height> <height>48</height>
</size> </size>
</property> </property>
</spacer> <property name="styleSheet">
</item> <string notr="true">QFrame#frame_2{
<item> background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
<widget class="QCheckBox" name="signBox"> stop:0 #FEFEFE, stop:1 #E8E8E8);
<property name="text">
<string>Sign Message</string> border: 1px solid #CCCCCC;}</string>
</property> </property>
<property name="checked"> <property name="frameShadow">
<bool>true</bool> <enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout">
<property name="margin">
<number>6</number>
</property> </property>
</widget>
</item>
<item> <item>
<widget class="QPushButton" name="attachFileButton"> <widget class="QPushButton" name="attachFileButton">
<property name="text"> <property name="text">
@ -122,30 +142,112 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</item>
<item> <item>
<widget class="QTextEdit" name="forumMessage"/> <widget class="QCheckBox" name="signBox">
</item> <property name="text">
</layout> <string>Sign Message</string>
</item> </property>
<item row="1" column="0"> <property name="icon">
<widget class="QFrame" name="frame"> <iconset resource="../images.qrc">
<property name="maximumSize"> <normaloff>:/images/pgp.png</normaloff>:/images/pgp.png</iconset>
</property>
<property name="iconSize">
<size> <size>
<width>16777215</width> <width>24</width>
<height>0</height> <height>24</height>
</size> </size>
</property> </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 row="2" column="0">
<widget class="QFrame" name="frame_3">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"/> <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> </widget>
</item> </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>
</layout> </layout>
</widget> </widget>
<widget class="QToolBar" name="toolBar"> <widget class="QToolBar" name="toolBar">

View File

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