Add access to QgisApp's mActionCopyStyle and mActionPasteStyle to QgisInterface

This commit is contained in:
Larry Shaffer 2012-11-27 10:35:22 -07:00
parent 8ba6bfb2c6
commit b9b943d5e1
5 changed files with 25 additions and 7 deletions

View File

@ -359,12 +359,16 @@ class QgisInterface : QObject
virtual QAction *actionAddPgLayer() = 0;
virtual QAction *actionAddWmsLayer() = 0;
virtual QAction *actionLayerSeparator1() = 0 /Deprecated/;
/** @note added in 1.9 */
virtual QAction *actionCopyLayerStyle() = 0;
/** @note added in 1.9 */
virtual QAction *actionPasteLayerStyle() = 0;
virtual QAction *actionOpenTable() = 0;
virtual QAction *actionToggleEditing() = 0;
virtual QAction *actionLayerSaveAs() = 0;
virtual QAction *actionLayerSelectionSaveAs() = 0;
virtual QAction *actionRemoveLayer() = 0;
/** @note added in 2.0 */
/** @note added in 1.9 */
virtual QAction *actionDuplicateLayer() = 0;
virtual QAction *actionLayerProperties() = 0;
virtual QAction *actionLayerSeparator2() = 0 /Deprecated/;

View File

@ -280,17 +280,21 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionAddOgrLayer() { return mActionAddOgrLayer; }
QAction *actionAddRasterLayer() { return mActionAddRasterLayer; }
QAction *actionAddPgLayer() { return mActionAddPgLayer; }
QAction *actionAddSpatiaLiteLayer() { return mActionAddSpatiaLiteLayer; };
QAction *actionAddSpatiaLiteLayer() { return mActionAddSpatiaLiteLayer; }
QAction *actionAddWmsLayer() { return mActionAddWmsLayer; }
QAction *actionAddWcsLayer() { return mActionAddWcsLayer; }
QAction *actionAddWfsLayer() { return mActionAddWfsLayer; }
/** @note added in 1.9 */
QAction *actionCopyLayerStyle() { return mActionCopyStyle; }
/** @note added in 1.9 */
QAction *actionPasteLayerStyle() { return mActionPasteStyle; }
QAction *actionOpenTable() { return mActionOpenTable; }
QAction *actionToggleEditing() { return mActionToggleEditing; }
QAction *actionSaveEdits() { return mActionSaveEdits; }
QAction *actionLayerSaveAs() { return mActionLayerSaveAs; }
QAction *actionLayerSelectionSaveAs() { return mActionLayerSelectionSaveAs; }
QAction *actionRemoveLayer() { return mActionRemoveLayer; }
/** @note added in 2.0 */
/** @note added in 1.9 */
QAction *actionDuplicateLayer() { return mActionDuplicateLayer; }
QAction *actionSetLayerCRS() { return mActionSetLayerCRS; }
QAction *actionSetProjectCRSFromLayer() { return mActionSetProjectCRSFromLayer; }
@ -437,13 +441,13 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
(defaults to the active layer on the legend)
*/
void editPaste( QgsMapLayer * destinationLayer = 0 );
//! copies style of the active layer to the clipboard
/**
\param sourceLayer The layer where the style will be taken from
(defaults to the active layer on the legend)
*/
void copyStyle( QgsMapLayer * sourceLayer = 0 );
//! copies style on the clipboard to the active layer
//! pastes style on the clipboard to the active layer
/**
\param destinatioLayer The layer that the clipboard will be pasted to
(defaults to the active layer on the legend)

View File

@ -460,6 +460,8 @@ QAction *QgisAppInterface::actionAddRasterLayer() { return qgis->actionAddRaster
QAction *QgisAppInterface::actionAddPgLayer() { return qgis->actionAddPgLayer(); }
QAction *QgisAppInterface::actionAddWmsLayer() { return qgis->actionAddWmsLayer(); }
QAction *QgisAppInterface::actionLayerSeparator1() { return 0; }
QAction *QgisAppInterface::actionCopyLayerStyle() { return qgis->actionCopyLayerStyle(); }
QAction *QgisAppInterface::actionPasteLayerStyle() { return qgis->actionPasteLayerStyle(); }
QAction *QgisAppInterface::actionOpenTable() { return qgis->actionOpenTable(); }
QAction *QgisAppInterface::actionToggleEditing() { return qgis->actionToggleEditing(); }
QAction *QgisAppInterface::actionLayerSaveAs() { return qgis->actionLayerSaveAs(); }

View File

@ -308,12 +308,16 @@ class QgisAppInterface : public QgisInterface
virtual QAction *actionAddPgLayer();
virtual QAction *actionAddWmsLayer();
virtual QAction *actionLayerSeparator1();
/** @note added in 1.9 */
virtual QAction *actionCopyLayerStyle();
/** @note added in 1.9 */
virtual QAction *actionPasteLayerStyle();
virtual QAction *actionOpenTable();
virtual QAction *actionToggleEditing();
virtual QAction *actionLayerSaveAs();
virtual QAction *actionLayerSelectionSaveAs();
virtual QAction *actionRemoveLayer();
/** @note added in 2.0 */
/** @note added in 1.9 */
virtual QAction *actionDuplicateLayer();
virtual QAction *actionLayerProperties();
virtual QAction *actionLayerSeparator2();

View File

@ -461,12 +461,16 @@ class GUI_EXPORT QgisInterface : public QObject
Q_DECL_DEPRECATED
#endif
virtual QAction *actionLayerSeparator1() = 0;
/** @note added in 1.9 */
virtual QAction *actionCopyLayerStyle() = 0;
/** @note added in 1.9 */
virtual QAction *actionPasteLayerStyle() = 0;
virtual QAction *actionOpenTable() = 0;
virtual QAction *actionToggleEditing() = 0;
virtual QAction *actionLayerSaveAs() = 0;
virtual QAction *actionLayerSelectionSaveAs() = 0;
virtual QAction *actionRemoveLayer() = 0;
/** @note added in 2.0 */
/** @note added in 1.9 */
virtual QAction *actionDuplicateLayer() = 0;
virtual QAction *actionLayerProperties() = 0;
#ifndef Q_MOC_RUN