Skip to content

Commit

Permalink
Revise Attribute dialog initialization, signals and slots for Qt4.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4657 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Jan 12, 2006
1 parent fd3031a commit a0d6413
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/gui/qgsattributedialog.cpp
Expand Up @@ -14,13 +14,14 @@
* (at your option) any later version. *
* *
***************************************************************************/

/* $Id$ */
#include "qgsattributedialog.h"
#include <QTableWidget>
#include <QTableWidgetItem>

QgsAttributeDialog::QgsAttributeDialog(std::vector<QgsFeatureAttribute>* attributes): QgsAttributeDialogBase()
QgsAttributeDialog::QgsAttributeDialog(std::vector<QgsFeatureAttribute>* attributes)
: QDialog()
{
setupUi(this);
mTable->setRowCount(attributes->size());

int index=0;
Expand All @@ -32,9 +33,6 @@ QgsAttributeDialog::QgsAttributeDialog(std::vector<QgsFeatureAttribute>* attribu
mTable->setItem(index, 1, myValueItem);
++index;
}

QObject::connect((QObject*)mOkButton, SIGNAL(clicked()), this, SLOT(accept()));//why is this cast necessary????
QObject::connect((QObject*)mCancelButton, SIGNAL(clicked()), this, SLOT(reject()));//why is this cast necessary????
}

QgsAttributeDialog::~QgsAttributeDialog()
Expand Down
35 changes: 34 additions & 1 deletion src/ui/qgsattributedialogbase.ui
Expand Up @@ -79,5 +79,38 @@
<layoutdefault spacing="6" margin="11" />
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<resources/>
<connections/>
<connections>
<connection>
<sender>mOkButton</sender>
<signal>clicked()</signal>
<receiver>QgsAttributeDialogBase</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>130</x>
<y>260</y>
</hint>
<hint type="destinationlabel" >
<x>133</x>
<y>142</y>
</hint>
</hints>
</connection>
<connection>
<sender>mCancelButton</sender>
<signal>clicked()</signal>
<receiver>QgsAttributeDialogBase</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>217</x>
<y>260</y>
</hint>
<hint type="destinationlabel" >
<x>133</x>
<y>142</y>
</hint>
</hints>
</connection>
</connections>
</ui>

0 comments on commit a0d6413

Please sign in to comment.