~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to src/Gui/DlgToolbarsImp.h

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-07-16 18:37:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090716183741-oww9kcxqrk991i1n
Tags: upstream-0.8.2237
ImportĀ upstreamĀ versionĀ 0.8.2237

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (c) 2004 Werner Mayer <werner.wm.mayer@gmx.de>              *
 
3
 *                                                                         *
 
4
 *   This file is part of the FreeCAD CAx development system.              *
 
5
 *                                                                         *
 
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.      *
 
10
 *                                                                         *
 
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.                  *
 
15
 *                                                                         *
 
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                                *
 
20
 *                                                                         *
 
21
 ***************************************************************************/
 
22
 
 
23
 
 
24
#ifndef GUI_DIALOG_DLGTOOLBARS_IMP_H
 
25
#define GUI_DIALOG_DLGTOOLBARS_IMP_H
 
26
 
 
27
#include "ui_DlgToolbars.h"
 
28
#include "PropertyPage.h"
 
29
 
 
30
namespace Gui {
 
31
namespace Dialog {
 
32
 
 
33
/** This class implements the creation of user defined toolbars.
 
34
 * In the left panel are shown all command groups with their command objects.
 
35
 * If any changeable toolbar was created in the left panel are shown all commands 
 
36
 * of the currently edited toolbar, otherwise it is emtpy.
 
37
 * All changes to a toolbar is done immediately.
 
38
 * 
 
39
 * \author Werner Mayer
 
40
 */
 
41
class DlgCustomToolbars : public CustomizeActionPage, public Ui_DlgCustomToolbars
 
42
 
43
    Q_OBJECT
 
44
 
 
45
protected:
 
46
    enum Type { Toolbar, Toolboxbar };
 
47
    
 
48
    DlgCustomToolbars(Type, QWidget* parent = 0);
 
49
    virtual ~DlgCustomToolbars();
 
50
 
 
51
protected Q_SLOTS:
 
52
    void on_categoryBox_activated(int index);
 
53
    void on_workbenchBox_activated(int index);
 
54
    void on_commandTreeWidget_currentItemChanged(QTreeWidgetItem*);
 
55
    void on_toolbarTreeWidget_currentItemChanged(QTreeWidgetItem*);
 
56
    void on_moveActionRightButton_clicked();
 
57
    void on_moveActionLeftButton_clicked();
 
58
    void on_moveActionUpButton_clicked();
 
59
    void on_moveActionDownButton_clicked();
 
60
    void on_newButton_clicked();
 
61
    void on_renameButton_clicked();
 
62
    void on_deleteButton_clicked();
 
63
    void onAddMacroAction(const QByteArray&);
 
64
    void onRemoveMacroAction(const QByteArray&);
 
65
    void onModifyMacroAction(const QByteArray&);
 
66
 
 
67
protected:
 
68
    void hideEvent(QHideEvent * event);
 
69
 
 
70
private:
 
71
    void importCustomToolbars(const QByteArray&);
 
72
    void exportCustomToolbars(const QByteArray&);
 
73
 
 
74
private:
 
75
    Type type;
 
76
};
 
77
 
 
78
/** This class implements the creation of user defined toolbars.
 
79
 * @see DlgCustomToolbars
 
80
 * @see DlgCustomCmdbarsImp
 
81
 * \author Werner Mayer
 
82
 */
 
83
class DlgCustomToolbarsImp : public DlgCustomToolbars
 
84
 
85
    Q_OBJECT
 
86
 
 
87
public:
 
88
    DlgCustomToolbarsImp(QWidget* parent = 0);
 
89
    ~DlgCustomToolbarsImp();
 
90
};
 
91
 
 
92
/** This class implements the creation of user defined toolbox bars.
 
93
 * A toolbox bar is the same as a toolbar - a collection of several 
 
94
 * action objects - unless a toolbox bar is placed in a toolbox,
 
95
 * while a toolbar is placed in the dock areas of the main window.
 
96
 * So toolbox bars are predestinated to save place on your desktop.
 
97
 * @see DlgCustomToolbars
 
98
 * @see DlgCustomToolbarsImp
 
99
 * \author Werner Mayer
 
100
 */
 
101
class DlgCustomToolBoxbarsImp : public DlgCustomToolbars
 
102
 
103
    Q_OBJECT
 
104
 
 
105
public:
 
106
    DlgCustomToolBoxbarsImp(QWidget* parent = 0);
 
107
    ~DlgCustomToolBoxbarsImp();
 
108
};
 
109
 
 
110
} // namespace Dialog
 
111
} // namespace Gui
 
112
 
 
113
#endif // GUI_DIALOG_DLGTOOLBARS_IMP_H