Skip to content
Permalink
Browse files
Change QgsIdentifyResults and QgsMeasure from a QWidget tool window t…
…o 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
  • Loading branch information
telwertowski committed May 16, 2006
1 parent c5361b9 commit d665c4f2d0e4e599ba50556fac8379dba682a9a3
Showing with 11 additions and 16 deletions.
  1. +1 −1 src/gui/qgsidentifyresults.cpp
  2. +2 −6 src/gui/qgsidentifyresults.h
  3. +4 −3 src/gui/qgsmeasure.cpp
  4. +2 −4 src/gui/qgsmeasure.h
  5. +1 −1 src/ui/qgsidentifyresultsbase.ui
  6. +1 −1 src/ui/qgsmeasurebase.ui
@@ -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);
@@ -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 */
@@ -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()));
@@ -143,7 +143,8 @@ void QgsMeasure::mousePress(QgsPoint &point)
addPoint(point);
this->show();
}

raise();

mouseMove(point);
}

@@ -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();

@@ -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>
@@ -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>

0 comments on commit d665c4f

Please sign in to comment.