summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2016-11-26 09:36:46 (GMT)
committerPino Toscano <pino@kde.org>2016-11-26 09:36:46 (GMT)
commit42eee1ef450633d87a9699afcb09caab04a7eaf5 (patch)
tree2005d9c2367005cfb2f9f03f7111f7892d5da0fb
parentb1be6c240dfa08bfe9419795f37a876f18d1fac7 (diff)
use QDialogButtonBoxv16.12.0v16.11.90
... instead of manually adding standard buttons
-rw-r--r--kstars/fitsviewer/fitsheaderdialog.ui104
-rw-r--r--kstars/fitsviewer/fitshistogram.cpp2
-rw-r--r--kstars/fitsviewer/fitshistogramui.ui73
3 files changed, 44 insertions, 135 deletions
diff --git a/kstars/fitsviewer/fitsheaderdialog.ui b/kstars/fitsviewer/fitsheaderdialog.ui
index 9a582e1..ddd8877 100644
--- a/kstars/fitsviewer/fitsheaderdialog.ui
+++ b/kstars/fitsviewer/fitsheaderdialog.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>fitsHeaderDialog</class>
- <widget class="QDialog" name="fitsHeaderDialog" >
- <property name="geometry" >
+ <widget class="QDialog" name="fitsHeaderDialog">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,121 +10,80 @@
<height>247</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>FITS Header</string>
</property>
- <property name="sizeGripEnabled" >
+ <property name="sizeGripEnabled">
<bool>true</bool>
</property>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
+ <layout class="QVBoxLayout">
+ <property name="spacing">
<number>6</number>
</property>
- <property name="leftMargin" >
+ <property name="leftMargin">
<number>9</number>
</property>
- <property name="topMargin" >
+ <property name="topMargin">
<number>9</number>
</property>
- <property name="rightMargin" >
+ <property name="rightMargin">
<number>9</number>
</property>
- <property name="bottomMargin" >
+ <property name="bottomMargin">
<number>9</number>
</property>
<item>
- <widget class="QTableWidget" name="tableWidget" >
- <property name="editTriggers" >
+ <widget class="QTableWidget" name="tableWidget">
+ <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
- <property name="alternatingRowColors" >
+ <property name="alternatingRowColors">
<bool>true</bool>
</property>
- <property name="showGrid" >
+ <property name="showGrid">
<bool>true</bool>
</property>
<column>
- <property name="text" >
+ <property name="text">
<string>Keyword</string>
</property>
</column>
<column>
- <property name="text" >
+ <property name="text">
<string>Value</string>
</property>
</column>
<column>
- <property name="text" >
+ <property name="text">
<string>Comment</string>
</property>
</column>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
</property>
- <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>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>300</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="closeB" >
- <property name="text" >
- <string>&amp;Close</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- <property name="default" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
</layout>
</widget>
- <resources/>
+ <resources/>
<connections>
<connection>
- <sender>closeB</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
<receiver>fitsHeaderDialog</receiver>
<slot>reject()</slot>
<hints>
- <hint type="sourcelabel" >
- <x>454</x>
- <y>225</y>
+ <hint type="sourcelabel">
+ <x>466</x>
+ <y>233</y>
</hint>
- <hint type="destinationlabel" >
- <x>322</x>
- <y>220</y>
+ <hint type="destinationlabel">
+ <x>436</x>
+ <y>243</y>
</hint>
</hints>
</connection>
diff --git a/kstars/fitsviewer/fitshistogram.cpp b/kstars/fitsviewer/fitshistogram.cpp
index 86fec89..98702e8 100644
--- a/kstars/fitsviewer/fitshistogram.cpp
+++ b/kstars/fitsviewer/fitshistogram.cpp
@@ -82,7 +82,7 @@ FITSHistogram::FITSHistogram(QWidget *parent) : QDialog(parent)
r_graph->setPen(QPen(Qt::red));
//r_graph->setLineStyle(QCPGraph::lsImpulse);
- connect(ui->applyB, SIGNAL(clicked()), this, SLOT(applyScale()));
+ connect(ui->buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(applyScale()));
connect(customPlot, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(updateValues(QMouseEvent*)));
diff --git a/kstars/fitsviewer/fitshistogramui.ui b/kstars/fitsviewer/fitshistogramui.ui
index 0e0b81a..baf8f58 100644
--- a/kstars/fitsviewer/fitshistogramui.ui
+++ b/kstars/fitsviewer/fitshistogramui.ui
@@ -184,7 +184,7 @@
<item>
<widget class="QRadioButton" name="linearR">
<property name="text">
- <string>Linear</string>
+ <string>L&amp;inear</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -217,62 +217,11 @@
</layout>
</item>
<item>
- <layout class="QHBoxLayout">
- <property name="spacing">
- <number>6</number>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Apply|QDialogButtonBox::Close</set>
</property>
- <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>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>270</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="applyB">
- <property name="text">
- <string>&amp;Apply</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="cancelB">
- <property name="text">
- <string>&amp;Close</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
+ </widget>
</item>
</layout>
</widget>
@@ -287,18 +236,18 @@
<resources/>
<connections>
<connection>
- <sender>cancelB</sender>
- <signal>clicked()</signal>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
<receiver>FITSHistogramUI</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
- <x>592</x>
- <y>303</y>
+ <x>589</x>
+ <y>336</y>
</hint>
<hint type="destinationlabel">
- <x>591</x>
- <y>316</y>
+ <x>579</x>
+ <y>357</y>
</hint>
</hints>
</connection>