Scribus
Open source desktop publishing at your fingertips
sctoolbar.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  * Copyright (C) 2006 by Riku Leino *
9  * riku@scribus.info *
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  * This program is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19  * GNU General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU General Public License *
22  * along with this program; if not, write to the *
23  * Free Software Foundation, Inc., *
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
25  ***************************************************************************/
26 
27 #ifndef SCTOOLBAR_H
28 #define SCTOOLBAR_H
29 
30 #include "scribusapi.h"
31 #include <QToolBar>
32 #include <QMainWindow>
33 #include <QMenu>
34 #include <QCloseEvent>
35 
36 class QString;
37 class PrefsContext;
38 class QCloseEvent;
39 class QToolButton;
40 
41 #include "scribus.h"
42 
43 class SCRIBUS_API ScToolBar : public QToolBar
44 {
45  Q_OBJECT
46 public:
47  // prefName is the name without tr() that will be used in the preferences for this toolbar
48  // if using name settings depend on the language
49  ScToolBar(const QString& name, const QString &prefName, QMainWindow *parent, Qt::Orientation o = Qt::Horizontal);
50  virtual ~ScToolBar();
51  //bit of a hack as saving prefs seems to happen on shutdown and prefs is already in the process of being destroyed
52  void connectPrefsSlot(bool b);
53 
54 
55 // int position();
56 // void storeDockPosition();
57 // void moveDock();
58  void initVisibility();
59 
60 public slots:
61  void languageChange();
62 
63 protected slots:
64 // void slotPlaceChanged(Q3DockWindow::Place p);
65  void slotVisibilityChanged(bool visible);
66 // void slotTop();
67 // void slotRight();
68 // void slotBottom();
69 // void slotLeft();
70 // void slotVert();
71 // void slotHor();
72 
73 private:
74  QString m_name;
75  PrefsContext *m_prefs;
76  Qt::Orientation floatOrientation;
77  QToolButton *prefsButton;
78 // QMenu *popup;
79 // QMenu *dockMenu;
80 // QMenu *orientationMenu;
81  QMainWindow* parentMW;
82  bool dockTop;
83  bool dockRight;
84  bool dockBottom;
85  bool dockLeft;
86 
87 // void initPrefsButton();
88 // void storeDockPositions();
89 // void moveDocks();
90 
91  enum Orientation { Vert, Hor };
92 };
93 
94 #endif
Definition: sctoolbar.h:43
Definition: prefscontext.h:40