1
/***************************************************************************
2
* Copyright (c) 2004 Werner Mayer <werner.wm.mayer@gmx.de> *
4
* This file is part of the FreeCAD CAx development system. *
6
* This library is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU Library General Public *
8
* License as published by the Free Software Foundation; either *
9
* version 2 of the License, or (at your option) any later version. *
11
* This library is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU Library General Public License for more details. *
16
* You should have received a copy of the GNU Library General Public *
17
* License along with this library; see the file COPYING.LIB. If not, *
18
* write to the Free Software Foundation, Inc., 59 Temple Place, *
19
* Suite 330, Boston, MA 02111-1307, USA *
21
***************************************************************************/
24
#ifndef GUI_DIALOG_DLGACTIONS_IMP_H
25
#define GUI_DIALOG_DLGACTIONS_IMP_H
27
#include "ui_DlgActions.h"
28
#include "PropertyPage.h"
34
/** This class implements the creation of user defined actions executing a recorded macro.
35
* It is possible to use these actions in own toolbars or commandbars.
39
* \author Werner Mayer
41
class DlgCustomActionsImp : public CustomizeActionPage, public Ui_DlgCustomActions
46
DlgCustomActionsImp( QWidget* parent = 0 );
47
~DlgCustomActionsImp();
50
void addMacroAction( const QByteArray& );
51
void removeMacroAction( const QByteArray& );
52
void modifyMacroAction( const QByteArray& );
55
/** Trigger for reparent event. */
56
bool event(QEvent* e);
57
void showEvent(QShowEvent* e);
60
/** Enables/disables buttons for deletion */
61
void on_actionListWidget_itemActivated( QTreeWidgetItem *i );
62
/** Opens a iconview to select a pixmap */
63
void on_buttonChoosePixmap_clicked();
64
/** Adds a custom action */
65
void on_buttonAddAction_clicked();
66
/** Deletes a custom action */
67
void on_buttonRemoveAction_clicked();
68
/** Shows the setup of the action */
69
void on_buttonReplaceAction_clicked();
70
void onAddMacroAction(const QByteArray&);
71
void onRemoveMacroAction(const QByteArray&);
72
void onModifyMacroAction(const QByteArray&);
75
/** Shows all actions and their pixmaps if available */
77
/** Name for the new created action */
78
QString newActionName();
81
bool bShown; /**< For internal use only*/
82
QString m_sPixmap; /**< Name of the specified pixmap */
88
#endif // GUI_DIALOG_DLGACTIONS_IMP_H