Skip to content

Commit d665c4f

Browse files
author
telwertowski
committedMay 16, 2006
Change QgsIdentifyResults and QgsMeasure from a QWidget tool window to a QDialogso that the window remains visible when QGIS is not the active application.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5462 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c5361b9 commit d665c4f

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed
 

‎src/gui/qgsidentifyresults.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
QgsIdentifyResults::QgsIdentifyResults(const QgsAttributeAction& actions,
3131
QWidget *parent, Qt::WFlags f)
32-
: QWidget(parent, f),
32+
: QDialog(parent, f),
3333
mActions(actions), mClickedOnValue(0), mActionPopup(0)
3434
{
3535
setupUi(this);

‎src/gui/qgsidentifyresults.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,14 @@ class Q3PopupMenu;
3232
*@author Gary E.Sherman
3333
*/
3434

35-
class QgsIdentifyResults: public QWidget, private Ui::QgsIdentifyResultsBase
35+
class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
3636
{
3737
Q_OBJECT;
3838
public:
3939

4040
//! Constructor - takes it own copy of the QgsAttributeAction so
4141
// that it is independent of whoever created it.
42-
//QgsIdentifyResults(const QgsAttributeAction& actions, QWidget *parent = 0,
43-
// Qt::WFlags f = Qt::Tool | Qt::MSWindowsFixedSizeDialogHint |Qt::WindowTitleHint);
44-
45-
QgsIdentifyResults(const QgsAttributeAction& actions, QWidget *parent = 0,
46-
Qt::WFlags f = Qt::Dialog );
42+
QgsIdentifyResults(const QgsAttributeAction& actions, QWidget *parent = 0, Qt::WFlags f = 0);
4743

4844
~QgsIdentifyResults();
4945
/** Add an attribute to the feature display node */

‎src/gui/qgsmeasure.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include <iostream>
2828

2929

30-
QgsMeasure::QgsMeasure(bool measureArea, QgsMapCanvas *mc, const char * name, Qt::WFlags f)
31-
: QWidget(mc->topLevelWidget(), name, f), QgsMapTool(mc)
30+
QgsMeasure::QgsMeasure(bool measureArea, QgsMapCanvas *mc, Qt::WFlags f)
31+
: QDialog(mc->topLevelWidget(), f), QgsMapTool(mc)
3232
{
3333
setupUi(this);
3434
connect(mRestartButton, SIGNAL(clicked()), this, SLOT(restart()));
@@ -143,7 +143,8 @@ void QgsMeasure::mousePress(QgsPoint &point)
143143
addPoint(point);
144144
this->show();
145145
}
146-
146+
raise();
147+
147148
mouseMove(point);
148149
}
149150

‎src/gui/qgsmeasure.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ class QgsRubberBand;
2929
class QCloseEvent;
3030

3131

32-
class QgsMeasure:public QWidget, public QgsMapTool, private Ui::QgsMeasureBase
32+
class QgsMeasure:public QDialog, public QgsMapTool, private Ui::QgsMeasureBase
3333
{
3434
Q_OBJECT;
3535
public:
3636

3737
//! Constructor
38-
QgsMeasure(bool measureArea, QgsMapCanvas *, const char * name = 0,
39-
Qt::WFlags f = Qt::WStyle_Customize | Qt::WStyle_DialogBorder |
40-
Qt::WStyle_Title | Qt::WType_Dialog | Qt::WStyle_Tool );
38+
QgsMeasure(bool measureArea, QgsMapCanvas *mc, Qt::WFlags f = 0);
4139

4240
~QgsMeasure();
4341

‎src/ui/qgsidentifyresultsbase.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<comment></comment>
44
<exportmacro></exportmacro>
55
<class>QgsIdentifyResultsBase</class>
6-
<widget class="QWidget" name="QgsIdentifyResultsBase" >
6+
<widget class="QDialog" name="QgsIdentifyResultsBase" >
77
<property name="geometry" >
88
<rect>
99
<x>0</x>

‎src/ui/qgsmeasurebase.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<comment></comment>
44
<exportmacro></exportmacro>
55
<class>QgsMeasureBase</class>
6-
<widget class="QWidget" name="QgsMeasureBase" >
6+
<widget class="QDialog" name="QgsMeasureBase" >
77
<property name="geometry" >
88
<rect>
99
<x>0</x>

0 commit comments

Comments
 (0)
Please sign in to comment.