Skip to content
Permalink
Browse files

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
wonder committed Jul 24, 2009
1 parent 974d9e5 commit 53ace62c69e4769b33504528d8a4842bae9c0cab
Showing with 3 additions and 34 deletions.
  1. +3 −33 src/app/qgisapp.cpp
  2. +0 −1 src/app/qgisapp.h
@@ -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);
@@ -1227,6 +1197,7 @@ void QgisApp::createMenus()
mActionEditSeparator3 = mEditMenu->addSeparator();
mEditMenu->addAction( mActionOptions );
mEditMenu->addAction( mActionConfigureShortcuts );
mEditMenu->addAction( mActionStyleManagerV2 );
mEditMenu->addAction( mActionCustomProjection );
}

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

mSettingsMenu->addAction( mActionProjectProperties );
mSettingsMenu->addAction( mActionCustomProjection );
mSettingsMenu->addAction( mActionStyleManagerV2 );
mSettingsMenu->addAction( mActionConfigureShortcuts );
mSettingsMenu->addAction( mActionOptions );
}
@@ -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
@@ -607,7 +607,6 @@ class QgisApp : public QMainWindow
//! Stops rendering of the main map
void stopRendering();

void toggleRendererV2();
void showStyleManagerV2();

signals:

0 comments on commit 53ace62

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