00001 /*************************************************************************** 00002 * Copyright (c) 2004 Werner Mayer <wmayer[at]users.sourceforge.net> * 00003 * * 00004 * This file is part of the FreeCAD CAx development system. * 00005 * * 00006 * This library is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU Library General Public * 00008 * License as published by the Free Software Foundation; either * 00009 * version 2 of the License, or (at your option) any later version. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU Library General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Library General Public * 00017 * License along with this library; see the file COPYING.LIB. If not, * 00018 * write to the Free Software Foundation, Inc., 59 Temple Place, * 00019 * Suite 330, Boston, MA 02111-1307, USA * 00020 * * 00021 ***************************************************************************/ 00022 00023 00024 #ifndef GUI_DIALOG_DLGACTIONS_IMP_H 00025 #define GUI_DIALOG_DLGACTIONS_IMP_H 00026 00027 #include "ui_DlgActions.h" 00028 #include "PropertyPage.h" 00029 #include <QDialog> 00030 00031 00032 namespace Gui { 00033 namespace Dialog { 00034 00042 class DlgCustomActionsImp : public CustomizeActionPage, public Ui_DlgCustomActions 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 DlgCustomActionsImp( QWidget* parent = 0 ); 00048 ~DlgCustomActionsImp(); 00049 00050 Q_SIGNALS: 00051 void addMacroAction( const QByteArray& ); 00052 void removeMacroAction( const QByteArray& ); 00053 void modifyMacroAction( const QByteArray& ); 00054 00055 protected: 00057 bool event(QEvent* e); 00058 void showEvent(QShowEvent* e); 00059 void changeEvent(QEvent *e); 00060 00061 protected Q_SLOTS: 00063 void on_actionListWidget_itemActivated( QTreeWidgetItem *i ); 00065 void on_buttonChoosePixmap_clicked(); 00067 void on_buttonAddAction_clicked(); 00069 void on_buttonRemoveAction_clicked(); 00071 void on_buttonReplaceAction_clicked(); 00072 void onAddMacroAction(const QByteArray&); 00073 void onRemoveMacroAction(const QByteArray&); 00074 void onModifyMacroAction(const QByteArray&); 00075 00076 private: 00078 void showActions(); 00080 QString newActionName(); 00081 00082 private: 00083 bool bShown; 00084 QString m_sPixmap; 00085 }; 00086 00087 class Ui_DlgChooseIcon; 00088 class IconDialog : public QDialog 00089 { 00090 Q_OBJECT 00091 00092 public: 00093 IconDialog(QWidget* parent); 00094 ~IconDialog(); 00095 void resizeEvent(QResizeEvent*); 00096 QListWidgetItem* currentItem() const; 00097 00098 private Q_SLOTS: 00099 void onAddIconPath(); 00100 00101 private: 00102 Ui_DlgChooseIcon *ui; 00103 }; 00104 00105 } // namespace Dialog 00106 } // namespace Gui 00107 00108 #endif // GUI_DIALOG_DLGACTIONS_IMP_H