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>
|
|
||||||
<widget class="QWidget" name="centralwidget">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="margin">
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<number>0</number>
|
||||||
<item row="0" column="0">
|
</property>
|
||||||
<widget class="QFrame" name="frame_4">
|
<item>
|
||||||
|
<widget class="HeaderFrame" name="headerFrame"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</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>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Forum</string>
|
<string>Forum</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="forumName">
|
<widget class="QLineEdit" name="forumName">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout">
|
<widget class="QLabel" name="subjectLabel">
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Subject</string>
|
<string>Subject</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="forumSubject"/>
|
<widget class="QLineEdit" name="forumSubject"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
|
||||||
</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,23 +201,8 @@
|
|||||||
</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">
|
|
||||||
<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">
|
<property name="title">
|
||||||
<string>Forum Post</string>
|
<string>Forum Post</string>
|
||||||
</property>
|
</property>
|
||||||
@ -244,8 +224,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="hashGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Attach files via drag and drop</string>
|
<string>Attach files via drag and drop</string>
|
||||||
</property>
|
</property>
|
||||||
@ -269,49 +249,25 @@ p, li { white-space: pre-wrap; }
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<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