-fixed Lokal Directories hide Button to Checked

-added a Toolbar for New Forum Message
-moved Post Forum Msg/Cancel Button to ToolBar 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@680 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-08-12 21:07:41 +00:00
parent 4db47ef482
commit 31098421b2
7 changed files with 163 additions and 634 deletions

View File

@ -52,6 +52,13 @@
/* Images for TreeWidget */ /* Images for TreeWidget */
#define IMAGE_FOLDER ":/images/folder16.png" #define IMAGE_FOLDER ":/images/folder16.png"
#define IMAGE_FORUM ":/images/konversation16.png" #define IMAGE_FORUM ":/images/konversation16.png"
#define IMAGE_SUBSCRIBE ":/images/accepted16.png"
#define IMAGE_UNSUBSCRIBE ":/images/cancel.png"
#define IMAGE_INFO ":/images/info16.png"
#define IMAGE_NEWFORUM ":/images/new_forum16.png"
/** Constructor */ /** Constructor */
ForumsDialog::ForumsDialog(QWidget *parent) ForumsDialog::ForumsDialog(QWidget *parent)
@ -163,21 +170,22 @@ void ForumsDialog::forumListCustomPopupMenu( QPoint point )
QMenu contextMnu( this ); QMenu contextMnu( this );
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier ); QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
QAction *subForumAct = new QAction(QIcon(IMAGE_MESSAGE), tr( "Subscribe to Forum" ), this ); QAction *subForumAct = new QAction(QIcon(IMAGE_SUBSCRIBE), tr( "Subscribe to Forum" ), this );
connect( subForumAct , SIGNAL( triggered() ), this, SLOT( subscribeToForum() ) ); connect( subForumAct , SIGNAL( triggered() ), this, SLOT( subscribeToForum() ) );
QAction *unsubForumAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr( "Unsubscribe to Forum" ), this ); QAction *unsubForumAct = new QAction(QIcon(IMAGE_UNSUBSCRIBE), tr( "Unsubscribe to Forum" ), this );
connect( unsubForumAct , SIGNAL( triggered() ), this, SLOT( unsubscribeToForum() ) ); connect( unsubForumAct , SIGNAL( triggered() ), this, SLOT( unsubscribeToForum() ) );
QAction *newForumAct = new QAction(QIcon(IMAGE_MESSAGEREMOVE), tr( "New Forum" ), this ); QAction *newForumAct = new QAction(QIcon(IMAGE_NEWFORUM), tr( "New Forum" ), this );
connect( newForumAct , SIGNAL( triggered() ), this, SLOT( newforum() ) ); connect( newForumAct , SIGNAL( triggered() ), this, SLOT( newforum() ) );
QAction *detailsForumAct = new QAction(QIcon(IMAGE_MESSAGEREMOVE), tr( "Show Forum Details" ), this ); QAction *detailsForumAct = new QAction(QIcon(IMAGE_INFO), tr( "Show Forum Details" ), this );
connect( detailsForumAct , SIGNAL( triggered() ), this, SLOT( showForumDetails() ) ); connect( detailsForumAct , SIGNAL( triggered() ), this, SLOT( showForumDetails() ) );
contextMnu.clear(); contextMnu.clear();
contextMnu.addAction( subForumAct ); contextMnu.addAction( subForumAct );
contextMnu.addAction( unsubForumAct ); contextMnu.addAction( unsubForumAct );
contextMnu.addSeparator();
contextMnu.addAction( newForumAct ); contextMnu.addAction( newForumAct );
contextMnu.addAction( detailsForumAct ); contextMnu.addAction( detailsForumAct );
contextMnu.exec( mevent->globalPos() ); contextMnu.exec( mevent->globalPos() );

View File

@ -565,6 +565,9 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
<layout class="QGridLayout" name="_2" > <layout class="QGridLayout" name="_2" >
<property name="spacing" >
<number>0</number>
</property>
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QPushButton" name="frameButton" > <widget class="QPushButton" name="frameButton" >
<property name="minimumSize" > <property name="minimumSize" >
@ -582,15 +585,22 @@ p, li { white-space: pre-wrap; }
<property name="text" > <property name="text" >
<string/> <string/>
</property> </property>
<property name="icon" >
<iconset resource="images.qrc" >
<normaloff>:/images/hide_toolbox_frame.png</normaloff>:/images/hide_toolbox_frame.png</iconset>
</property>
<property name="iconSize" > <property name="iconSize" >
<size> <size>
<width>16</width> <width>14</width>
<height>31</height> <height>31</height>
</size> </size>
</property> </property>
<property name="checkable" > <property name="checkable" >
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="checked" >
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >

View File

@ -22,18 +22,23 @@
#include "CreateForumMsg.h" #include "CreateForumMsg.h"
#include <config/rsharesettings.h>
#include "rsiface/rsforums.h" #include "rsiface/rsforums.h"
/** Constructor */ /** Constructor */
CreateForumMsg::CreateForumMsg(std::string fId, std::string pId) CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
: QWidget(NULL), mForumId(fId), mParentId(pId) : QMainWindow(NULL), mForumId(fId), mParentId(pId)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
RshareSettings config;
config.loadWidgetInformation(this);
// connect up the buttons. // connect up the buttons.
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelMsg( ) ) ); connect( ui.postmessage_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) );
connect( ui.postButton, SIGNAL( clicked ( bool ) ), this, SLOT( createMsg( ) ) ); connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( createMsg( ) ) );
newMsg(); newMsg();
@ -72,5 +77,8 @@ void CreateForumMsg::cancelMsg()
{ {
close(); close();
return; return;
RshareSettings config;
config.saveWidgetInformation(this);
} }

View File

@ -28,7 +28,7 @@
#include "ui_CreateForumMsg.h" #include "ui_CreateForumMsg.h"
class CreateForumMsg : public QWidget class CreateForumMsg : public QMainWindow
{ {
Q_OBJECT Q_OBJECT

View File

@ -1,514 +1,38 @@
<ui version="4.0" > <ui version="4.0" >
<class>CreateForumMsg</class> <class>CreateForumMsg</class>
<widget class="QWidget" name="CreateForumMsg" > <widget class="QMainWindow" name="CreateForumMsg" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>358</width> <width>441</width>
<height>435</height> <height>353</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette" >
<palette>
<active>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>208</red>
<green>208</green>
<blue>208</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>247</red>
<green>247</green>
<blue>247</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>139</red>
<green>139</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>104</red>
<green>104</green>
<blue>104</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="windowTitle" > <property name="windowTitle" >
<string>Post Forum Msg</string> <string>Post Forum Message</string>
</property> </property>
<property name="windowIcon" > <property name="windowIcon" >
<iconset>../msgs</iconset> <iconset resource="../images.qrc" >
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property> </property>
<layout class="QGridLayout" > <property name="toolButtonStyle" >
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<widget class="QWidget" name="centralwidget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>52</y>
<width>441</width>
<height>301</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" name="_2" >
<item> <item>
<widget class="QLabel" name="label_2" > <widget class="QLabel" name="label_2" >
<property name="text" > <property name="text" >
@ -522,7 +46,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" name="_3" >
<item> <item>
<widget class="QLabel" name="label" > <widget class="QLabel" name="label" >
<property name="text" > <property name="text" >
@ -536,7 +60,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" name="_4" >
<item> <item>
<widget class="QLabel" name="label_5" > <widget class="QLabel" name="label_5" >
<property name="text" > <property name="text" >
@ -549,7 +73,7 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0" >
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
@ -569,73 +93,50 @@
<item> <item>
<widget class="QTextEdit" name="forumMessage" /> <widget class="QTextEdit" name="forumMessage" />
</item> </item>
<item> </layout>
<layout class="QHBoxLayout" >
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
<item> </layout>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<string>Cancel Msg</string>
</property>
</widget> </widget>
</item> <widget class="QToolBar" name="toolBar" >
<item> <property name="geometry" >
<spacer> <rect>
<property name="orientation" > <x>0</x>
<enum>Qt::Horizontal</enum> <y>0</y>
<width>441</width>
<height>52</height>
</rect>
</property> </property>
<property name="sizeHint" > <property name="windowTitle" >
<size> <string>toolBar</string>
<width>40</width> </property>
<height>20</height> <attribute name="toolBarArea" >
</size> <enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<bool>false</bool>
</attribute>
<addaction name="postmessage_action" />
<addaction name="close_action" />
</widget>
<action name="postmessage_action" >
<property name="icon" >
<iconset resource="../images.qrc" >
<normaloff>:/images/mail_send24.png</normaloff>:/images/mail_send24.png</iconset>
</property> </property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="postButton" >
<property name="text" > <property name="text" >
<string>Post Forum Msg</string> <string>Post Forum Msg</string>
</property> </property>
<property name="default" > </action>
<bool>true</bool> <action name="close_action" >
<property name="icon" >
<iconset resource="../images.qrc" >
<normaloff>:/images/button_cancel.png</normaloff>:/images/button_cancel.png</iconset>
</property> </property>
<property name="text" >
<string>Close</string>
</property>
</action>
</widget> </widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>postButton</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc" /> <include location="../images.qrc" />
</resources> </resources>

View File

@ -179,6 +179,7 @@
<file>images/mail_reply.png</file> <file>images/mail_reply.png</file>
<file>images/mail_send.png</file> <file>images/mail_send.png</file>
<file>images/mail_new.png</file> <file>images/mail_new.png</file>
<file>images/mail_send24.png</file>
<file>images/message-mail.png</file> <file>images/message-mail.png</file>
<file>images/message-mail-read.png</file>m <file>images/message-mail-read.png</file>m
<file>images/message-news.png</file> <file>images/message-news.png</file>
@ -191,6 +192,7 @@
<file>images/new-account.png</file> <file>images/new-account.png</file>
<file>images/new-contact.png</file> <file>images/new-contact.png</file>
<file>images/new-mail-alert.png</file> <file>images/new-mail-alert.png</file>
<file>images/new_forum16.png</file>
<file>images/nopic.png</file> <file>images/nopic.png</file>
<file>images/package_games1.png</file> <file>images/package_games1.png</file>
<file>images/peerdetails_16x16.png</file> <file>images/peerdetails_16x16.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B