DlgToolbarsImp.h

Go to the documentation of this file.
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_DLGTOOLBARS_IMP_H
00025 #define GUI_DIALOG_DLGTOOLBARS_IMP_H
00026 
00027 #include "ui_DlgToolbars.h"
00028 #include "PropertyPage.h"
00029 
00030 namespace Gui {
00031 namespace Dialog {
00032 
00041 class DlgCustomToolbars : public CustomizeActionPage, public Ui_DlgCustomToolbars
00042 { 
00043     Q_OBJECT
00044 
00045 protected:
00046     enum Type { Toolbar, Toolboxbar };
00047     
00048     DlgCustomToolbars(Type, QWidget* parent = 0);
00049     virtual ~DlgCustomToolbars();
00050 
00051 protected Q_SLOTS:
00052     void on_categoryBox_activated(int index);
00053     void on_workbenchBox_activated(int index);
00054     void on_moveActionRightButton_clicked();
00055     void on_moveActionLeftButton_clicked();
00056     void on_moveActionUpButton_clicked();
00057     void on_moveActionDownButton_clicked();
00058     void on_newButton_clicked();
00059     void on_renameButton_clicked();
00060     void on_deleteButton_clicked();
00061     void onAddMacroAction(const QByteArray&);
00062     void onRemoveMacroAction(const QByteArray&);
00063     void onModifyMacroAction(const QByteArray&);
00064 
00065 protected:
00066     void changeEvent(QEvent *e);
00067     void hideEvent(QHideEvent * event);
00068     virtual void addCustomToolbar(const QString&);
00069     virtual void removeCustomToolbar(const QString&);
00070     virtual void renameCustomToolbar(const QString&, const QString&);
00071     virtual void addCustomCommand(const QString&, const QByteArray&);
00072     virtual void removeCustomCommand(const QString&, const QByteArray&);
00073     virtual void moveUpCustomCommand(const QString&, const QByteArray&);
00074     virtual void moveDownCustomCommand(const QString&, const QByteArray&);
00075 
00076 private:
00077     void importCustomToolbars(const QByteArray&);
00078     void exportCustomToolbars(const QByteArray&);
00079 
00080 private:
00081     Type type;
00082 };
00083 
00089 class DlgCustomToolbarsImp : public DlgCustomToolbars
00090 { 
00091     Q_OBJECT
00092 
00093 public:
00094     DlgCustomToolbarsImp(QWidget* parent = 0);
00095     ~DlgCustomToolbarsImp();
00096 
00097 protected:
00098     void changeEvent(QEvent *e);
00099     virtual void addCustomToolbar(const QString&);
00100     virtual void removeCustomToolbar(const QString&);
00101     virtual void renameCustomToolbar(const QString&, const QString&);
00102     virtual void addCustomCommand(const QString&, const QByteArray&);
00103     virtual void removeCustomCommand(const QString&, const QByteArray&);
00104     virtual void moveUpCustomCommand(const QString&, const QByteArray&);
00105     virtual void moveDownCustomCommand(const QString&, const QByteArray&);
00106 };
00107 
00117 class DlgCustomToolBoxbarsImp : public DlgCustomToolbars
00118 { 
00119     Q_OBJECT
00120 
00121 public:
00122     DlgCustomToolBoxbarsImp(QWidget* parent = 0);
00123     ~DlgCustomToolBoxbarsImp();
00124 
00125 protected:
00126     void changeEvent(QEvent *e);
00127 };
00128 
00129 } // namespace Dialog
00130 } // namespace Gui
00131 
00132 #endif // GUI_DIALOG_DLGTOOLBARS_IMP_H

Generated on Wed Nov 23 19:00:07 2011 for FreeCAD by  doxygen 1.6.1