Skip to content

Commit

Permalink
Change QgsIdentifyResults and QgsMeasure from a QWidget tool window t…
Browse files Browse the repository at this point in the history
…o a QDialogso that the window remains visible when QGIS is not the active application.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5462 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed May 16, 2006
1 parent e7a9f4e commit e1c9ab1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/gui/qgsidentifyresults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

QgsIdentifyResults::QgsIdentifyResults(const QgsAttributeAction& actions,
QWidget *parent, Qt::WFlags f)
: QWidget(parent, f),
: QDialog(parent, f),
mActions(actions), mClickedOnValue(0), mActionPopup(0)
{
setupUi(this);
Expand Down
8 changes: 2 additions & 6 deletions src/gui/qgsidentifyresults.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ class Q3PopupMenu;
*@author Gary E.Sherman
*/

class QgsIdentifyResults: public QWidget, private Ui::QgsIdentifyResultsBase
class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
{
Q_OBJECT;
public:

//! Constructor - takes it own copy of the QgsAttributeAction so
// that it is independent of whoever created it.
//QgsIdentifyResults(const QgsAttributeAction& actions, QWidget *parent = 0,
// Qt::WFlags f = Qt::Tool | Qt::MSWindowsFixedSizeDialogHint |Qt::WindowTitleHint);

QgsIdentifyResults(const QgsAttributeAction& actions, QWidget *parent = 0,
Qt::WFlags f = Qt::Dialog );
QgsIdentifyResults(const QgsAttributeAction& actions, QWidget *parent = 0, Qt::WFlags f = 0);

~QgsIdentifyResults();
/** Add an attribute to the feature display node */
Expand Down
7 changes: 4 additions & 3 deletions src/gui/qgsmeasure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include <iostream>


QgsMeasure::QgsMeasure(bool measureArea, QgsMapCanvas *mc, const char * name, Qt::WFlags f)
: QWidget(mc->topLevelWidget(), name, f), QgsMapTool(mc)
QgsMeasure::QgsMeasure(bool measureArea, QgsMapCanvas *mc, Qt::WFlags f)
: QDialog(mc->topLevelWidget(), f), QgsMapTool(mc)
{
setupUi(this);
connect(mRestartButton, SIGNAL(clicked()), this, SLOT(restart()));
Expand Down Expand Up @@ -143,7 +143,8 @@ void QgsMeasure::mousePress(QgsPoint &point)
addPoint(point);
this->show();
}

raise();

mouseMove(point);
}

Expand Down
6 changes: 2 additions & 4 deletions src/gui/qgsmeasure.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ class QgsRubberBand;
class QCloseEvent;


class QgsMeasure:public QWidget, public QgsMapTool, private Ui::QgsMeasureBase
class QgsMeasure:public QDialog, public QgsMapTool, private Ui::QgsMeasureBase
{
Q_OBJECT;
public:

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

~QgsMeasure();

Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsidentifyresultsbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<comment></comment>
<exportmacro></exportmacro>
<class>QgsIdentifyResultsBase</class>
<widget class="QWidget" name="QgsIdentifyResultsBase" >
<widget class="QDialog" name="QgsIdentifyResultsBase" >
<property name="geometry" >
<rect>
<x>0</x>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsmeasurebase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<comment></comment>
<exportmacro></exportmacro>
<class>QgsMeasureBase</class>
<widget class="QWidget" name="QgsMeasureBase" >
<widget class="QDialog" name="QgsMeasureBase" >
<property name="geometry" >
<rect>
<x>0</x>
Expand Down

0 comments on commit e1c9ab1

Please sign in to comment.