Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removed temporary symbology-ng buttons from the tool bar, style manag…
…er is now accessible from options menu.

git-svn-id: http://svn.osgeo.org/qgis/branches/symbology-ng-branch@11175 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jul 24, 2009
1 parent 974d9e5 commit 53ace62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
36 changes: 3 additions & 33 deletions src/app/qgisapp.cpp
Expand Up @@ -1021,44 +1021,14 @@ void QgisApp::createActions()
mActionAbout->setMenuRole( QAction::AboutRole ); // put in application menu on Mac OS X
connect( mActionAbout, SIGNAL( triggered() ), this, SLOT( about() ) );

// %%%
mActionUseRendererV2 = new QAction( "V2", this );
mActionUseRendererV2->setStatusTip( tr( "Toggles renderer V2 for current layer" ) );
connect( mActionUseRendererV2, SIGNAL( triggered() ), this, SLOT( toggleRendererV2() ) );

// %%%
mActionStyleManagerV2 = new QAction( "MGR", this );
mActionStyleManagerV2 = new QAction( tr("Style manager..."), this );
mActionStyleManagerV2->setStatusTip( tr( "Show style manager V2" ) );
connect( mActionStyleManagerV2, SIGNAL( triggered() ), this, SLOT( showStyleManagerV2() ) );
}

#include "qgsstylev2.h"
#include "qgssymbolv2.h"
#include "qgsrendererv2.h"
#include "qgsrendererv2propertiesdialog.h"
#include "qgsstylev2managerdialog.h"



void QgisApp::toggleRendererV2()
{
QgsMapLayer* layer = activeLayer();
if (layer == NULL || layer->type() != QgsMapLayer::VectorLayer)
{
QMessageBox::information(this, "sorry", "Give me a vector layer!");
return;
}
QgsVectorLayer* vlayer = static_cast<QgsVectorLayer*>(layer);

QgsRendererV2PropertiesDialog dlg(vlayer, QgsStyleV2::defaultStyle(), this);
if (!dlg.exec())
return;

mMapLegend->refreshLayerSymbology( vlayer->getLayerID(), false );

refreshMapCanvas();
}

void QgisApp::showStyleManagerV2()
{
QgsStyleV2ManagerDialog dlg(QgsStyleV2::defaultStyle(), QgsApplication::userStyleV2Path(), this);
Expand Down Expand Up @@ -1227,6 +1197,7 @@ void QgisApp::createMenus()
mActionEditSeparator3 = mEditMenu->addSeparator();
mEditMenu->addAction( mActionOptions );
mEditMenu->addAction( mActionConfigureShortcuts );
mEditMenu->addAction( mActionStyleManagerV2 );
mEditMenu->addAction( mActionCustomProjection );
}

Expand Down Expand Up @@ -1317,6 +1288,7 @@ void QgisApp::createMenus()

mSettingsMenu->addAction( mActionProjectProperties );
mSettingsMenu->addAction( mActionCustomProjection );
mSettingsMenu->addAction( mActionStyleManagerV2 );
mSettingsMenu->addAction( mActionConfigureShortcuts );
mSettingsMenu->addAction( mActionOptions );
}
Expand Down Expand Up @@ -1385,8 +1357,6 @@ void QgisApp::createToolBars()
mFileToolBar->addAction( mActionAddSpatiaLiteLayer );
#endif
mFileToolBar->addAction( mActionAddWmsLayer );
mFileToolBar->addAction( mActionUseRendererV2 );
mFileToolBar->addAction( mActionStyleManagerV2 );
mToolbarMenu->addAction( mFileToolBar->toggleViewAction() );
//
// Layer Toolbar
Expand Down
1 change: 0 additions & 1 deletion src/app/qgisapp.h
Expand Up @@ -607,7 +607,6 @@ class QgisApp : public QMainWindow
//! Stops rendering of the main map
void stopRendering();

void toggleRendererV2();
void showStyleManagerV2();

signals:
Expand Down

0 comments on commit 53ace62

Please sign in to comment.