Skip to content

Commit

Permalink
[StyleManager] fix labels
Browse files Browse the repository at this point in the history
  • Loading branch information
SebDieBln committed Jan 6, 2016
1 parent 95e571c commit 0243201
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ QgsStyleV2ExportImportDialog::QgsStyleV2ExportImportDialog( QgsStyleV2* style, Q

if ( mDialogMode == Import )
{
setWindowTitle( tr( "Import style(s)" ) );
setWindowTitle( tr( "Import symbol(s)" ) );
// populate the import types
importTypeCombo->addItem( tr( "file specified below" ), QVariant( "file" ) );
// importTypeCombo->addItem( "official QGIS repo online", QVariant( "official" ) );
Expand All @@ -85,7 +85,7 @@ QgsStyleV2ExportImportDialog::QgsStyleV2ExportImportDialog( QgsStyleV2* style, Q
}
else
{
setWindowTitle( tr( "Export style(s)" ) );
setWindowTitle( tr( "Export symbol(s)" ) );
// hide import specific controls when exporting
btnBrowse->setHidden( true );
fromLabel->setHidden( true );
Expand Down
34 changes: 17 additions & 17 deletions src/gui/symbology-ng/qgsstylev2managerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ QgsStyleV2ManagerDialog::QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* pa
connect( btnEditItem, SIGNAL( clicked() ), this, SLOT( editItem() ) );
connect( btnRemoveItem, SIGNAL( clicked() ), this, SLOT( removeItem() ) );

QMenu *shareMenu = new QMenu( tr( "Share Menu" ), this );
QAction *exportAsPNGAction = shareMenu->addAction( tr( "Export as PNG" ) );
QAction *exportAsSVGAction = shareMenu->addAction( tr( "Export as SVG" ) );
QAction *exportAction = shareMenu->addAction( tr( "Export" ) );
QAction *importAction = shareMenu->addAction( tr( "Import" ) );
QMenu *shareMenu = new QMenu( tr( "Share menu" ), this );
QAction *exportAsPNGAction = shareMenu->addAction( tr( "Export selected symbols as PNG" ) );
QAction *exportAsSVGAction = shareMenu->addAction( tr( "Export selected symbols as SVG" ) );
QAction *exportAction = shareMenu->addAction( tr( "Export..." ) );
QAction *importAction = shareMenu->addAction( tr( "Import..." ) );
exportAsPNGAction->setIcon( QIcon( QgsApplication::iconPath( "mActionSharingExport.svg" ) ) );
exportAsSVGAction->setIcon( QIcon( QgsApplication::iconPath( "mActionSharingExport.svg" ) ) );
exportAction->setIcon( QIcon( QgsApplication::iconPath( "mActionSharingExport.svg" ) ) );
Expand Down Expand Up @@ -101,9 +101,9 @@ QgsStyleV2ManagerDialog::QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* pa
connect( groupModel, SIGNAL( itemChanged( QStandardItem* ) ),
this, SLOT( groupRenamed( QStandardItem* ) ) );

QMenu *groupMenu = new QMenu( tr( "Group Actions" ), this );
QAction *groupSymbols = groupMenu->addAction( tr( "Group Symbols" ) );
QAction *editSmartgroup = groupMenu->addAction( tr( "Edit Smart Group" ) );
QMenu *groupMenu = new QMenu( tr( "Group actions" ), this );
QAction *groupSymbols = groupMenu->addAction( tr( "Group symbols" ) );
QAction *editSmartgroup = groupMenu->addAction( tr( "Edit smart group" ) );
btnManageGroups->setMenu( groupMenu );
connect( groupSymbols, SIGNAL( triggered() ), this, SLOT( groupSymbolsAction() ) );
connect( editSmartgroup, SIGNAL( triggered() ), this, SLOT( editSmartgroupAction() ) );
Expand Down Expand Up @@ -1057,7 +1057,7 @@ void QgsStyleV2ManagerDialog::groupSymbolsAction()
if ( mGrouppingMode )
{
mGrouppingMode = false;
senderAction->setText( tr( "Group Symbols" ) );
senderAction->setText( tr( "Group symbols" ) );
// disconnect slot which handles regrouping
disconnect( model, SIGNAL( itemChanged( QStandardItem* ) ),
this, SLOT( regrouped( QStandardItem* ) ) );
Expand Down Expand Up @@ -1094,7 +1094,7 @@ void QgsStyleV2ManagerDialog::groupSymbolsAction()

mGrouppingMode = true;
// Change the text menu
senderAction->setText( tr( "Finish Grouping" ) );
senderAction->setText( tr( "Finish grouping" ) );
// Remove all Symbol editing functionalities
disconnect( treeModel, SIGNAL( itemChanged( QStandardItem* ) ),
this, SLOT( groupRenamed( QStandardItem* ) ) );
Expand Down Expand Up @@ -1296,29 +1296,29 @@ void QgsStyleV2ManagerDialog::grouptreeContextMenu( const QPoint& point )
{
if ( index.parent().data( Qt::UserRole + 1 ).toString() == "smartgroups" )
{
groupMenu.addAction( tr( "Edit Group" ) );
groupMenu.addAction( tr( "Edit smart group" ) );
}
else
{
groupMenu.addAction( tr( "Add Group" ) );
groupMenu.addAction( tr( "Add group" ) );
}
groupMenu.addAction( tr( "Remove Group" ) );
groupMenu.addAction( tr( "Remove group" ) );
}
else if ( index.data( Qt::UserRole + 1 ) == "groups" || index.data( Qt::UserRole + 1 ) == "smartgroups" )
{
groupMenu.addAction( tr( "Add Group" ) );
groupMenu.addAction( tr( "Add group" ) );
}


QAction* selectedItem = groupMenu.exec( globalPos );

if ( selectedItem )
{
if ( selectedItem->text() == tr( "Add Group" ) )
if ( selectedItem->text() == tr( "Add group" ) )
addGroup();
else if ( selectedItem->text() == tr( "Remove Group" ) )
else if ( selectedItem->text() == tr( "Remove group" ) )
removeGroup();
else if ( selectedItem->text() == tr( "Edit Group" ) )
else if ( selectedItem->text() == tr( "Edit smart group" ) )
editSmartgroupAction();
}
}
Expand Down

0 comments on commit 0243201

Please sign in to comment.