Skip to content
Permalink
Browse files

last ui cleanups from my list -> buttonbox

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12080 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
macho
macho committed Nov 10, 2009
1 parent 307c869 commit a14f6fefed126b8598ff1eb1f39509b2303aadf0
Showing with 170 additions and 195 deletions.
  1. +12 −5 src/app/qgswmssourceselect.cpp
  2. +6 −2 src/app/qgswmssourceselect.h
  3. +152 −188 src/ui/qgswmssourceselectbase.ui
@@ -56,9 +56,16 @@ QgsWMSSourceSelect::QgsWMSSourceSelect( QWidget * parent, Qt::WFlags fl )
mWmsProvider( 0 )
{
setupUi( this );
mAddButton = new QPushButton( tr( "&Add" ) );
buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );
connect( mAddButton,SIGNAL( clicked() ), this, SLOT( addClicked() ) );
connect( buttonBox,SIGNAL( helpRequested() ), this, SLOT( helpClicked() ) );

mLayerUpButton->setIcon( QgisApp::getThemeIcon( "/mActionArrowUp.png" ) );
mLayerDownButton->setIcon( QgisApp::getThemeIcon( "/mActionArrowDown.png" ) );
connect( btnCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

mAddButton->setEnabled( false );
populateConnectionList();

// Qt Designer 4.1 doesn't let us use a QButtonGroup, so it has to
// be done manually... Unless I'm missing something, it's a whole
@@ -201,7 +208,7 @@ void QgsWMSSourceSelect::on_btnDelete_clicked()
}
}

void QgsWMSSourceSelect::on_btnHelp_clicked()
void QgsWMSSourceSelect::helpClicked()
{

QgsContextHelp::run( context_id );
@@ -283,7 +290,7 @@ bool QgsWMSSourceSelect::populateLayerList( QgsWmsProvider *wmsProvider )
// If we got some layers, let the user add them to the map
if ( lstLayers->topLevelItemCount() > 0 )
{
btnAdd->setEnabled( TRUE );
mAddButton->setEnabled( TRUE );

if ( lstLayers->topLevelItemCount() == 1 )
{
@@ -292,7 +299,7 @@ bool QgsWMSSourceSelect::populateLayerList( QgsWmsProvider *wmsProvider )
}
else
{
btnAdd->setEnabled( FALSE );
mAddButton->setEnabled( FALSE );
}

return TRUE;
@@ -427,7 +434,7 @@ void QgsWMSSourceSelect::on_btnConnect_clicked()

}

void QgsWMSSourceSelect::on_btnAdd_clicked()
void QgsWMSSourceSelect::addClicked()
{
if ( selectedLayers().empty() == TRUE )
{
@@ -22,6 +22,7 @@
#include "qgisgui.h"

#include <QStringList>
#include <QPushButton>

class QgisApp;
class QgsWmsProvider;
@@ -103,13 +104,14 @@ class QgsWMSSourceSelect : public QDialog, private Ui::QgsWMSSourceSelectBase
void on_btnConnect_clicked();

//! Determines the layers the user selected
void on_btnAdd_clicked();
void addClicked();


//! Opens the Spatial Reference System dialog.
void on_btnChangeSpatialRefSys_clicked();

//! Opens help application
void on_btnHelp_clicked();
void helpClicked();

//! Signaled when a layer selection is changed. Ensures that only one style is selected per layer.
void on_lstLayers_itemSelectionChanged();
@@ -182,6 +184,8 @@ class QgsWMSSourceSelect : public QDialog, private Ui::QgsWMSSourceSelectBase
QButtonGroup* m_imageFormatGroup;
QHBoxLayout* m_imageFormatLayout;

QPushButton * mAddButton;

//! The WMS provider that retrieves information for this dialog
QgsWmsProvider * mWmsProvider;

0 comments on commit a14f6fe

Please sign in to comment.
You can’t perform that action at this time.