Skip to content

Commit b215209

Browse files
author
macho
committed
ui cleanup in identifyresults - jef can you look if everything is correct?
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12066 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1dacefb commit b215209

File tree

3 files changed

+31
-49
lines changed

3 files changed

+31
-49
lines changed

src/app/qgsidentifyresults.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ QgsIdentifyResults::QgsIdentifyResults( QgsMapCanvas *canvas, QWidget *parent, Q
9191
mDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
9292
mDock->setWidget( this );
9393
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mDock );
94-
buttonCancel->hide();
9594
}
9695
lstResults->setColumnCount( 2 );
9796
setColumnText( 0, tr( "Feature" ) );
9897
setColumnText( 1, tr( "Value" ) );
9998

100-
connect( buttonCancel, SIGNAL( clicked() ),
101-
this, SLOT( close() ) );
99+
connect( buttonBox,SIGNAL( helpRequested() ), this, SLOT( helpClicked() ) );
100+
101+
connect( buttonBox, SIGNAL( clicked() ), this, SLOT( close() ) );
102102

103103
connect( lstResults, SIGNAL( itemExpanded( QTreeWidgetItem* ) ),
104104
this, SLOT( itemExpanded( QTreeWidgetItem* ) ) );
@@ -644,8 +644,8 @@ QTreeWidgetItem *QgsIdentifyResults::retrieveAttributes( QTreeWidgetItem *item,
644644

645645
return featItem;
646646
}
647-
648-
void QgsIdentifyResults::on_buttonHelp_clicked()
647+
// Slot for showing help
648+
void QgsIdentifyResults::helpClicked()
649649
{
650650
QgsContextHelp::run( context_id );
651651
}

src/app/qgsidentifyresults.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
8484
void featureDeleted( int fid );
8585

8686
//! Context help
87-
void on_buttonHelp_clicked();
87+
void helpClicked();
8888

8989
/* Called when an item is expanded so that we can ensure that the
9090
column width if expanded to show it */

src/ui/qgsidentifyresultsbase.ui

Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
</column>
3939
</widget>
4040
</item>
41+
<item>
42+
<widget class="QDialogButtonBox" name="buttonBox">
43+
<property name="standardButtons">
44+
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
45+
</property>
46+
</widget>
47+
</item>
4148
<item>
4249
<layout class="QHBoxLayout">
4350
<property name="spacing">
@@ -46,53 +53,28 @@
4653
<property name="margin">
4754
<number>0</number>
4855
</property>
49-
<item>
50-
<widget class="QPushButton" name="buttonHelp">
51-
<property name="text">
52-
<string>Help</string>
53-
</property>
54-
<property name="shortcut">
55-
<string>F1</string>
56-
</property>
57-
<property name="autoDefault">
58-
<bool>true</bool>
59-
</property>
60-
</widget>
61-
</item>
62-
<item>
63-
<spacer>
64-
<property name="orientation">
65-
<enum>Qt::Horizontal</enum>
66-
</property>
67-
<property name="sizeType">
68-
<enum>QSizePolicy::Expanding</enum>
69-
</property>
70-
<property name="sizeHint" stdset="0">
71-
<size>
72-
<width>20</width>
73-
<height>0</height>
74-
</size>
75-
</property>
76-
</spacer>
77-
</item>
78-
<item>
79-
<widget class="QPushButton" name="buttonCancel">
80-
<property name="text">
81-
<string>Close</string>
82-
</property>
83-
<property name="shortcut">
84-
<string/>
85-
</property>
86-
<property name="autoDefault">
87-
<bool>true</bool>
88-
</property>
89-
</widget>
90-
</item>
9156
</layout>
9257
</item>
9358
</layout>
9459
</widget>
9560
<layoutdefault spacing="6" margin="11"/>
9661
<resources/>
97-
<connections/>
62+
<connections>
63+
<connection>
64+
<sender>buttonBox</sender>
65+
<signal>rejected()</signal>
66+
<receiver>QgsIdentifyResultsBase</receiver>
67+
<slot>reject()</slot>
68+
<hints>
69+
<hint type="sourcelabel">
70+
<x>261</x>
71+
<y>298</y>
72+
</hint>
73+
<hint type="destinationlabel">
74+
<x>204</x>
75+
<y>313</y>
76+
</hint>
77+
</hints>
78+
</connection>
79+
</connections>
9880
</ui>

0 commit comments

Comments
 (0)