added Comment button to Comment Dialog

added comment button to CommentDialog
This commit is contained in:
defnax 2019-10-09 19:26:43 +02:00
parent 969ad81913
commit 55d26b400b
2 changed files with 28 additions and 0 deletions

View File

@ -19,6 +19,7 @@
*******************************************************************************/ *******************************************************************************/
#include "gui/gxs/GxsCommentDialog.h" #include "gui/gxs/GxsCommentDialog.h"
#include "gui/gxs/GxsCommentTreeWidget.h"
#include "ui_GxsCommentDialog.h" #include "ui_GxsCommentDialog.h"
#include <iostream> #include <iostream>
@ -50,6 +51,7 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int ))); connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady())); connect(ui->idChooser, SIGNAL(idsLoaded()), this, SLOT(idChooserReady()));
connect(ui->commentButton, SIGNAL(clicked()), ui->treeWidget, SLOT(makeComment()));
connect(ui->sortBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortComments(int))); connect(ui->sortBox, SIGNAL(currentIndexChanged(int)), this, SLOT(sortComments(int)));
// default sort method "HOT". // default sort method "HOT".

View File

@ -40,6 +40,32 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="toolBarHLayout"> <layout class="QHBoxLayout" name="toolBarHLayout">
<item>
<widget class="QToolButton" name="commentButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Comment</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/comment.png</normaloff>:/icons/png/comment.png</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item> <item>
<widget class="QComboBox" name="sortBox"> <widget class="QComboBox" name="sortBox">
<property name="toolTip"> <property name="toolTip">