mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Changed window CreateForumMsg from QMainWindow to QDialog.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5659 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b67f9f88fe
commit
091cab4d10
@ -1474,7 +1474,6 @@ void ForumsDialog::createthread()
|
|||||||
}
|
}
|
||||||
|
|
||||||
CreateForumMsg *cfm = new CreateForumMsg(mCurrForumId, "");
|
CreateForumMsg *cfm = new CreateForumMsg(mCurrForumId, "");
|
||||||
cfm->setWindowTitle(tr("Start New Thread"));
|
|
||||||
cfm->show();
|
cfm->show();
|
||||||
|
|
||||||
/* window will destroy itself! */
|
/* window will destroy itself! */
|
||||||
|
@ -41,13 +41,19 @@
|
|||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
|
CreateForumMsg::CreateForumMsg(const std::string &fId, const std::string &pId)
|
||||||
: QMainWindow(NULL), mForumId(fId), mParentId(pId)
|
: QDialog(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);
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
|
||||||
|
QString text = pId.empty() ? tr("Start New Thread") : tr("Post Forum Message");
|
||||||
|
setWindowTitle(text);
|
||||||
|
|
||||||
|
ui.headerFrame->setHeaderImage(QPixmap(":/images/konversation64.png"));
|
||||||
|
ui.headerFrame->setHeaderText(text);
|
||||||
|
|
||||||
Settings->loadWidgetInformation(this);
|
Settings->loadWidgetInformation(this);
|
||||||
|
|
||||||
connect( ui.forumMessage, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( forumMessageCostumPopupMenu( QPoint ) ) );
|
connect( ui.forumMessage, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( forumMessageCostumPopupMenu( QPoint ) ) );
|
||||||
@ -55,8 +61,8 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
|
|||||||
connect(ui.hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
connect(ui.hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
||||||
|
|
||||||
// connect up the buttons.
|
// connect up the buttons.
|
||||||
connect( ui.postmessage_action, SIGNAL( triggered (bool) ), this, SLOT( createMsg( ) ) );
|
connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createMsg()));
|
||||||
connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) );
|
connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||||
connect( ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums()));
|
connect( ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums()));
|
||||||
connect( ui.attachFileButton, SIGNAL(clicked() ), this , SLOT(addFile()));
|
connect( ui.attachFileButton, SIGNAL(clicked() ), this , SLOT(addFile()));
|
||||||
connect( ui.pastersButton, SIGNAL(clicked() ), this , SLOT(pasteLink()));
|
connect( ui.pastersButton, SIGNAL(clicked() ), this , SLOT(pasteLink()));
|
||||||
@ -189,11 +195,6 @@ void CreateForumMsg::closeEvent (QCloseEvent * /*event*/)
|
|||||||
Settings->saveWidgetInformation(this);
|
Settings->saveWidgetInformation(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateForumMsg::cancelMsg()
|
|
||||||
{
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CreateForumMsg::smileyWidgetForums()
|
void CreateForumMsg::smileyWidgetForums()
|
||||||
{
|
{
|
||||||
Emoticons::showSmileyWidget(this, ui.emoticonButton, SLOT(addSmileys()), false);
|
Emoticons::showSmileyWidget(this, ui.emoticonButton, SLOT(addSmileys()), false);
|
||||||
|
@ -25,12 +25,12 @@
|
|||||||
|
|
||||||
#include "ui_CreateForumMsg.h"
|
#include "ui_CreateForumMsg.h"
|
||||||
|
|
||||||
class CreateForumMsg : public QMainWindow
|
class CreateForumMsg : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CreateForumMsg(std::string fId, std::string pId);
|
CreateForumMsg(const std::string &fId, const std::string &pId);
|
||||||
|
|
||||||
void newMsg(); /* cleanup */
|
void newMsg(); /* cleanup */
|
||||||
|
|
||||||
@ -41,7 +41,6 @@ private slots:
|
|||||||
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
||||||
/* actions to take.... */
|
/* actions to take.... */
|
||||||
void createMsg();
|
void createMsg();
|
||||||
void cancelMsg();
|
|
||||||
void pasteLink();
|
void pasteLink();
|
||||||
void pasteLinkFull();
|
void pasteLinkFull();
|
||||||
void pasteOwnCertificateLink();
|
void pasteOwnCertificateLink();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>CreateForumMsg</class>
|
<class>CreateForumMsg</class>
|
||||||
<widget class="QMainWindow" name="CreateForumMsg">
|
<widget class="QDialog" name="CreateForumMsg">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@ -17,21 +17,27 @@
|
|||||||
<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="toolButtonStyle">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
<property name="spacing">
|
||||||
</property>
|
<number>0</number>
|
||||||
<widget class="QWidget" name="centralwidget">
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<property name="margin">
|
||||||
<property name="margin">
|
<number>0</number>
|
||||||
<number>0</number>
|
</property>
|
||||||
</property>
|
<item>
|
||||||
<property name="spacing">
|
<widget class="HeaderFrame" name="headerFrame"/>
|
||||||
<number>0</number>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
<item row="0" column="0">
|
<widget class="QFrame" name="frame">
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<property name="frameShape">
|
||||||
<item row="0" column="0">
|
<enum>QFrame::StyledPanel</enum>
|
||||||
<widget class="QFrame" name="frame_4">
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="subjectFrame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -39,48 +45,37 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<property name="topMargin">
|
<property name="margin">
|
||||||
<number>6</number>
|
<number>0</number>
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout">
|
<widget class="QLabel" name="forumLabel">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QLabel" name="label_2">
|
<string>Forum</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Forum</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="0" column="1">
|
||||||
</item>
|
<widget class="QLineEdit" name="forumName">
|
||||||
<item>
|
<property name="enabled">
|
||||||
<widget class="QLineEdit" name="forumName">
|
<bool>false</bool>
|
||||||
<property name="enabled">
|
</property>
|
||||||
<bool>false</bool>
|
</widget>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout">
|
<widget class="QLabel" name="subjectLabel">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QLabel" name="label">
|
<string>Subject</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Subject</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="1" column="1">
|
||||||
</item>
|
<widget class="QLineEdit" name="forumSubject"/>
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="forumSubject"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
<widget class="QFrame" name="toolBarFrame">
|
<widget class="QFrame" name="toolBarFrame">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -206,112 +201,73 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item>
|
||||||
<widget class="QFrame" name="frame_3">
|
<widget class="QGroupBox" name="messageGroupBox">
|
||||||
<property name="frameShape">
|
<property name="title">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<string>Forum Post</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<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">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QTextEdit" name="forumMessage">
|
||||||
<property name="title">
|
<property name="contextMenuPolicy">
|
||||||
<string>Forum Post</string>
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<property name="html">
|
||||||
<item row="0" column="0">
|
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<widget class="QTextEdit" name="forumMessage">
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="html">
|
|
||||||
<string notr="true"><!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">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
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;">
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>Attach files via drag and drop</string>
|
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_7">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="HashBox" name="hashBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>You can attach files via drag and drop here in this window</string>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="hashGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Attach files via drag and drop</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_7">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="HashBox" name="hashBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>You can attach files via drag and drop here in this window</string>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
</widget>
|
</layout>
|
||||||
<widget class="QToolBar" name="toolBar">
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string notr="true">toolBar</string>
|
|
||||||
</property>
|
|
||||||
<property name="movable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="toolBarArea">
|
|
||||||
<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 name="text">
|
|
||||||
<string>Post Forum Msg</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="close_action">
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/button_cancel.png</normaloff>:/images/button_cancel.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Close</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>HeaderFrame</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>gui/common/HeaderFrame.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>HashBox</class>
|
<class>HashBox</class>
|
||||||
<extends>QScrollArea</extends>
|
<extends>QScrollArea</extends>
|
||||||
|
Loading…
Reference in New Issue
Block a user