Skip to content
Permalink
Browse files

Dox++, deprecate method

  • Loading branch information
nyalldawson committed Jan 14, 2019
1 parent 46c13e1 commit d5cedfe9f5ee03901d048905e2d46ecd87b8d693
@@ -40,6 +40,7 @@ Opens the add color ramp dialog, returning the new color ramp's name if the ramp

public slots:


void activate();
%Docstring
Raises, unminimizes and activates this window
@@ -48,32 +49,80 @@ Raises, unminimizes and activates this window
%End

void addItem();
%Docstring
Triggers the dialog for adding a new item, based on the currently
selected item type tab.
%End

void editItem();
%Docstring
Triggers the dialog for editing the current item.
%End

void removeItem();
%Docstring
Removes the current selected item.
%End

void exportItemsSVG();
%Docstring
Triggers the dialog to export selected items as SVG files.

.. seealso:: :py:func:`exportItemsPNG`

.. seealso:: :py:func:`exportSelectedItemsImages`
%End

void exportItemsPNG();
%Docstring
Triggers the dialog to export selected items as PNG files.

.. seealso:: :py:func:`exportItemsSVG`

.. seealso:: :py:func:`exportSelectedItemsImages`
%End

void exportSelectedItemsImages( const QString &dir, const QString &format, QSize size );
%Docstring
Triggers the dialog to export selected items as images of the specified ``format`` and ``size``.

.. seealso:: :py:func:`exportItemsSVG`

.. seealso:: :py:func:`exportItemsPNG`
%End

void exportItems();
%Docstring
Triggers the dialog to export items.

.. seealso:: :py:func:`importItems`
%End

void importItems();
%Docstring
Triggers the dialog to import items.

.. seealso:: :py:func:`exportItems`
%End

void populateList();
%Docstring
adds symbols of some type to list
Refreshes the list of items.
%End

void onFinished();
%Docstring
called when the dialog is going to be closed
Called when the dialog is going to be closed.
%End

void onClose();
%Docstring
Close the dialog
Closes the dialog
%End

void showHelp();
%Docstring
Open the associated help
Opens the associated help
%End

void itemChanged( QStandardItem *item ) /Deprecated/;
@@ -83,38 +132,49 @@ Open the associated help
%End

void groupChanged( const QModelIndex & );
void groupRenamed( QStandardItem * );
%Docstring
Trigerred when the current group (or tag) is changed.
%End

void groupRenamed( QStandardItem *item );
%Docstring
Triggered when a group ``item`` is renamed.
%End

int addTag();
%Docstring
add a tag
Triggers the dialog to add a new tag.
%End

int addSmartgroup();
%Docstring
add a smartgroup
Triggers the dialog to add a new smart group.
%End

void removeGroup();
%Docstring
remove a tag or smartgroup
Removes the selected tag or smartgroup.
%End

void tagSymbolsAction();
%Docstring
carry out symbol tagging using check boxes
Toggles the interactive item tagging mode.
%End

void editSmartgroupAction();
%Docstring
edit the selected smart group
Triggers the dialog for editing the selected smart group.
%End

void regrouped( QStandardItem * );
void regrouped( QStandardItem * ) /Deprecated/;
%Docstring
symbol changed from one group

.. deprecated:: in QGIS 3.6 - has no effect and will be removed in QGIS 4.0
%End

void filterSymbols( const QString & );
void filterSymbols( const QString &filter );
%Docstring
filter the symbols based on input search term
Sets the ``filter`` string to filter symbols by.
%End

void symbolSelected( const QModelIndex & );
@@ -208,7 +208,6 @@ QgsStyleManagerDialog::QgsStyleManagerDialog( QgsStyle *style, QWidget *parent,
mSymbolTreeView->setSelectionModel( listItems->selectionModel() );
mSymbolTreeView->setSelectionMode( listItems->selectionMode() );

//connect( model, &QStandardItemModel::itemChanged, this, &QgsStyleManagerDialog::itemChanged );
connect( listItems->selectionModel(), &QItemSelectionModel::currentChanged,
this, &QgsStyleManagerDialog::symbolSelected );
connect( listItems->selectionModel(), &QItemSelectionModel::selectionChanged,
@@ -1291,32 +1290,9 @@ void QgsStyleManagerDialog::tagSymbolsAction()
}
}

void QgsStyleManagerDialog::regrouped( QStandardItem *item )
void QgsStyleManagerDialog::regrouped( QStandardItem * )
{
QgsStyle::StyleEntity type = ( currentItemType() < 3 ) ? QgsStyle::SymbolEntity : QgsStyle::ColorrampEntity;
if ( currentItemType() > 3 )
{
QgsDebugMsg( QStringLiteral( "Unknown style entity" ) );
return;
}

QStandardItemModel *treeModel = qobject_cast<QStandardItemModel *>( groupTree->model() );
QString tag = treeModel->itemFromIndex( groupTree->currentIndex() )->text();

QString symbolName = item->text();
bool regrouped;
if ( item->checkState() == Qt::Checked )
regrouped = mStyle->tagSymbol( type, symbolName, QStringList( tag ) );
else
regrouped = mStyle->detagSymbol( type, symbolName, QStringList( tag ) );
if ( !regrouped )
{
int er = QMessageBox::critical( this, tr( "Group Items" ),
tr( "There was a problem with the symbols database while regrouping." ) );
// call the slot again to get back to normal
if ( er )
tagSymbolsAction();
}
}

void QgsStyleManagerDialog::setSymbolsChecked( const QStringList & )
@@ -83,58 +83,133 @@ class GUI_EXPORT QgsStyleManagerDialog : public QDialog, private Ui::QgsStyleMan

public slots:

// TODO QGIS 4.0 -- most of this should be private

/**
* Raises, unminimizes and activates this window
* \since QGIS 3.4
*/
void activate();

/**
* Triggers the dialog for adding a new item, based on the currently
* selected item type tab.
*/
void addItem();

/**
* Triggers the dialog for editing the current item.
*/
void editItem();

/**
* Removes the current selected item.
*/
void removeItem();

/**
* Triggers the dialog to export selected items as SVG files.
*
* \see exportItemsPNG()
* \see exportSelectedItemsImages()
*/
void exportItemsSVG();

/**
* Triggers the dialog to export selected items as PNG files.
*
* \see exportItemsSVG()
* \see exportSelectedItemsImages()
*/
void exportItemsPNG();

/**
* Triggers the dialog to export selected items as images of the specified \a format and \a size.
*
* \see exportItemsSVG()
* \see exportItemsPNG()
*/
void exportSelectedItemsImages( const QString &dir, const QString &format, QSize size );

/**
* Triggers the dialog to export items.
*
* \see importItems()
*/
void exportItems();

/**
* Triggers the dialog to import items.
*
* \see exportItems()
*/
void importItems();

//! adds symbols of some type to list
/**
* Refreshes the list of items.
*/
void populateList();

//! called when the dialog is going to be closed
/**
* Called when the dialog is going to be closed.
*/
void onFinished();

//! Close the dialog
//! Closes the dialog
void onClose();

//! Open the associated help
//! Opens the associated help
void showHelp();

/**
* \deprecated in QGIS 3.6 - has no effect and will be removed in QGIS 4.0
*/
Q_DECL_DEPRECATED void itemChanged( QStandardItem *item ) SIP_DEPRECATED;

/**
* Trigerred when the current group (or tag) is changed.
*/
void groupChanged( const QModelIndex & );
void groupRenamed( QStandardItem * );
//! add a tag

/**
* Triggered when a group \a item is renamed.
*/
void groupRenamed( QStandardItem *item );

/**
* Triggers the dialog to add a new tag.
*/
int addTag();
//! add a smartgroup

/**
* Triggers the dialog to add a new smart group.
*/
int addSmartgroup();
//! remove a tag or smartgroup

/**
* Removes the selected tag or smartgroup.
*/
void removeGroup();

//! carry out symbol tagging using check boxes
/**
* Toggles the interactive item tagging mode.
*/
void tagSymbolsAction();

//! edit the selected smart group
/**
* Triggers the dialog for editing the selected smart group.
*/
void editSmartgroupAction();

//! symbol changed from one group
void regrouped( QStandardItem * );
/**
* \deprecated in QGIS 3.6 - has no effect and will be removed in QGIS 4.0
*/
Q_DECL_DEPRECATED void regrouped( QStandardItem * ) SIP_DEPRECATED;

//! filter the symbols based on input search term
void filterSymbols( const QString & );
/**
* Sets the \a filter string to filter symbols by.
*/
void filterSymbols( const QString &filter );

//! Perform symbol specific tasks when selected
void symbolSelected( const QModelIndex & );

0 comments on commit d5cedfe

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