[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kreport/3.0] src/wrtembed: Port the Group dialog widget. Was missed from the Qt5 porting.
From:       Adam Pigg <null () kde ! org>
Date:       2017-05-24 18:40:00
Message-ID: E1dDbCS-0002HN-1X () code ! kde ! org
[Download RAW message or body]

Git commit 1a2bbd68ba70cd68519b2406833663bcd5e4ffe2 by Adam Pigg.
Committed on 24/05/2017 at 18:37.
Pushed by piggz into branch '3.0'.

Port the Group dialog widget.  Was missed from the Qt5 porting.

Summary: Make the group dialog work in Qt5

Test Plan: Build, open kreportexample and add/edit/remove group sections

Reviewers: staniek

Tags: #kreport

Maniphest Tasks: T6182

Differential Revision: https://phabricator.kde.org/D5948

M  +5    -5    src/wrtembed/KReportDetailGroupSectionDialog.cpp
M  +2    -0    src/wrtembed/KReportDetailGroupSectionDialog.h
M  +45   -1    src/wrtembed/KReportDetailGroupSectionDialog.ui

https://commits.kde.org/kreport/1a2bbd68ba70cd68519b2406833663bcd5e4ffe2

diff --git a/src/wrtembed/KReportDetailGroupSectionDialog.cpp \
b/src/wrtembed/KReportDetailGroupSectionDialog.cpp index b3d1072..711ec56 100644
--- a/src/wrtembed/KReportDetailGroupSectionDialog.cpp
+++ b/src/wrtembed/KReportDetailGroupSectionDialog.cpp
@@ -27,12 +27,12 @@
 KReportDetailGroupSectionDialog::KReportDetailGroupSectionDialog(QWidget* parent)
   : QDialog(parent)
 {
-    QWidget *widget = new QWidget(this);
-    setupUi(widget);
-   //! @todo  setMainWidget(widget);
+    setupUi(this);
 
-    //! @todo setButtons(Ok | Cancel);
-    //! @todo setCaption(tr("Group Section Editor"));
+    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+    setWindowTitle(tr("Group Section Editor"));
 }
 
 /*
diff --git a/src/wrtembed/KReportDetailGroupSectionDialog.h \
b/src/wrtembed/KReportDetailGroupSectionDialog.h index ceb7e1d..04385ad 100644
--- a/src/wrtembed/KReportDetailGroupSectionDialog.h
+++ b/src/wrtembed/KReportDetailGroupSectionDialog.h
@@ -20,6 +20,7 @@
 #define DETAILGROUPSECTIONDIALOG_H
 
 #include <QDialog>
+#include <QDialogButtonBox>
 
 #include <ui_KReportDetailGroupSectionDialog.h>
 
@@ -30,6 +31,7 @@ class KReportDetailGroupSectionDialog : public QDialog, public \
Ui::DetailGroupSe  public:
     explicit KReportDetailGroupSectionDialog(QWidget* parent = nullptr);
     ~KReportDetailGroupSectionDialog() override;
+
 };
 
 #endif // DETAILGROUPSECTIONDIALOG_H
diff --git a/src/wrtembed/KReportDetailGroupSectionDialog.ui \
b/src/wrtembed/KReportDetailGroupSectionDialog.ui index 07e7051..2f9b32d 100644
--- a/src/wrtembed/KReportDetailGroupSectionDialog.ui
+++ b/src/wrtembed/KReportDetailGroupSectionDialog.ui
@@ -19,8 +19,25 @@
  * License along with this library.  If not, see \
http://www.gnu.org/licenses/.</comment>  <class>DetailGroupSectionDialog</class>
  <widget class="QWidget" name="DetailGroupSectionDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>269</width>
+    <height>115</height>
+   </rect>
+  </property>
   <layout class="QFormLayout" name="formLayout">
-   <property name="margin">
+   <property name="leftMargin">
+    <number>0</number>
+   </property>
+   <property name="topMargin">
+    <number>0</number>
+   </property>
+   <property name="rightMargin">
+    <number>0</number>
+   </property>
+   <property name="bottomMargin">
     <number>0</number>
    </property>
    <item row="0" column="0">
@@ -105,6 +122,13 @@
      </property>
     </widget>
    </item>
+   <item row="5" column="0" colspan="2">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources/>
@@ -114,12 +138,32 @@
    <signal>toggled(bool)</signal>
    <receiver>breakAfterFooter</receiver>
    <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>20</x>
+     <y>20</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>20</x>
+     <y>20</y>
+    </hint>
+   </hints>
   </connection>
   <connection>
    <sender>cbFoot</sender>
    <signal>toggled(bool)</signal>
    <receiver>breakAfterFooterLabel</receiver>
    <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>20</x>
+     <y>20</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>20</x>
+     <y>20</y>
+    </hint>
+   </hints>
   </connection>
  </connections>
 </ui>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic