Skip to content
Permalink
Browse files
Move AddCircularString actions to a tool button
  • Loading branch information
mhugent committed Aug 27, 2015
1 parent 622aaa1 commit e0d5a0b118af9a0820057dfa58d5407b83637bc1
Showing with 13 additions and 6 deletions.
  1. +13 −4 src/app/qgisapp.cpp
  2. +0 −2 src/ui/qgisapp.ui
@@ -1146,7 +1146,7 @@ void QgisApp::readSettings()
QStringList oldRecentProjects = settings.value( "/UI/recentProjectsList" ).toStringList();
settings.remove( "/UI/recentProjectsList" );

Q_FOREACH ( const QString& project, oldRecentProjects )
Q_FOREACH( const QString& project, oldRecentProjects )
{
QgsWelcomePageItemsModel::RecentProjectData data;
data.path = project;
@@ -1158,7 +1158,7 @@ void QgisApp::readSettings()
settings.beginGroup( "/UI/recentProjects" );
QStringList projectKeys = settings.childGroups();

Q_FOREACH ( const QString& key, projectKeys )
Q_FOREACH( const QString& key, projectKeys )
{
QgsWelcomePageItemsModel::RecentProjectData data;
settings.beginGroup( key );
@@ -1801,6 +1801,15 @@ void QgisApp::createToolBars()
newLayerAction->setObjectName( "ActionNewLayer" );
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );

//circular string digitize tool button
QToolButton* tbAddCircularString = new QToolButton( mDigitizeToolBar );
tbAddCircularString->setPopupMode( QToolButton::MenuButtonPopup );
tbAddCircularString->addAction( mActionCircularStringCurvePoint );
tbAddCircularString->addAction( mActionCircularStringRadius );
tbAddCircularString->setDefaultAction( mActionCircularStringCurvePoint );
connect( tbAddCircularString, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
mDigitizeToolBar->insertWidget( mActionMoveFeature, tbAddCircularString );

// Help Toolbar
QAction* actionWhatsThis = QWhatsThis::createAction( this );
actionWhatsThis->setIcon( QgsApplication::getThemeIcon( "/mActionWhatsThis.svg" ) );
@@ -2727,7 +2736,7 @@ void QgisApp::updateRecentProjectPaths()
{
mRecentProjectsMenu->clear();

Q_FOREACH ( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
Q_FOREACH( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
{
QAction* action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title ).arg( recentProject.path ) );
action->setEnabled( QFile::exists(( recentProject.path ) ) );
@@ -2796,7 +2805,7 @@ void QgisApp::saveRecentProjectPath( QString projectPath, bool savePreviewImage
int idx = 0;

// Persist the list
Q_FOREACH ( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
Q_FOREACH( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
{
++idx;
settings.beginGroup( QString( "/UI/recentProjects/%1" ).arg( idx ) );
@@ -356,8 +356,6 @@
<addaction name="mActionToggleEditing"/>
<addaction name="mActionSaveLayerEdits"/>
<addaction name="mActionAddFeature"/>
<addaction name="mActionCircularStringCurvePoint"/>
<addaction name="mActionCircularStringRadius"/>
<addaction name="mActionMoveFeature"/>
<addaction name="mActionNodeTool"/>
<addaction name="mActionDeleteSelected"/>

1 comment on commit e0d5a0b

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids commented on e0d5a0b Aug 27, 2015

good job Marco. For me, here is what is left:

  • keep a rubberband when switching from add feature (after adding some points) to add arc before the first point of the arc is digitized.
  • right-click while digitizing an arc (before 3rd point) should cancel it. If some "standard points" were added before, get back to them.
Please sign in to comment.