~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kivio/kiviopart/kivio_view.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-04-20 21:38:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060420213853-j5lxluqvymxt2zny
Tags: 1:1.5.0-0ubuntu2
UbuntuĀ uploadĀ 

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18
18
 */
19
19
#ifndef __kivio_gui_h__
20
20
#define __kivio_gui_h__
33
33
class TKSelectColorAction;
34
34
class StencilBarDockManager;
35
35
class KivioArrowHeadAction;
 
36
 
36
37
namespace Kivio {
37
38
  class ToolController;
38
39
  class PluginManager;
39
 
  class AddStencilSetPanel;
 
40
  class AddStencilSetDialog;
 
41
  class AddStencilTool;
 
42
  class ObjectListPalette;
40
43
}
41
44
 
42
45
class KivioBirdEyePanel;
46
49
 
47
50
class KoDocumentEntry;
48
51
class KoTabBar;
49
 
class KoToolDockBase;
50
 
class KoToolDockManager;
51
52
 
52
53
class KAction;
53
54
class KFontAction;
60
61
class QStringList;
61
62
class QPushButton;
62
63
class QProgressBar;
 
64
class QScrollBar;
63
65
class DCOPObject;
64
66
class KoRuler;
65
67
class KoZoomHandler;
67
69
class KStatusBarLabel;
68
70
class KoLineWidthAction;
69
71
class KoLineStyleAction;
 
72
class KoPaletteManager;
70
73
 
71
74
#include <qdom.h>
72
75
#include <qptrlist.h>
73
76
#include <qframe.h>
74
77
 
75
 
#include <koView.h>
76
 
#include <koDocument.h>
77
 
#include <koUnit.h>
 
78
#include <KoView.h>
 
79
#include <KoDocument.h>
 
80
#include <KoUnit.h>
78
81
 
79
82
#include <koffice_export.h>
80
83
using namespace Kivio;
93
96
    KivioCanvas* canvasWidget() const { return m_pCanvas; }
94
97
    KivioDoc* doc()const { return m_pDoc; }
95
98
 
96
 
    void addPage( KivioPage* );
97
 
    void removePage( KivioPage* );
98
99
    KivioPage* activePage() const;
99
100
 
100
101
    void setActiveSpawnerSet( KivioStencilSpawnerSet* );
101
102
    KivioStencilSpawnerSet *activeSpawnerSet();
102
103
 
103
104
    KoTabBar* tabBar()const { return  m_pTabBar;}
104
 
    KoToolDockManager* toolDockManager() { return m_pToolDockManager; }
 
105
    KoPaletteManager* paletteManager() { return m_pPaletteManager; };
105
106
    void updateMenuPage( );
106
107
 
107
108
    virtual void setupPrinter(KPrinter&);
108
109
    virtual void print(KPrinter&);
109
110
 
110
 
    void paintContent( KivioPainter& painter, const QRect& rect, bool transparent );
111
 
 
112
 
    virtual QWidget* canvas();
 
111
    virtual QWidget* canvas() const;
113
112
    virtual int canvasXOffset() const;
114
113
    virtual int canvasYOffset() const;
115
114
 
153
152
    void createLayerDock();
154
153
    void createBirdEyeDock();
155
154
    void createProtectionDock();
156
 
    void createAddStencilSetDock();
 
155
    void createObjectListPalette();
157
156
 
158
157
  public slots:
159
158
    void paperLayoutDlg();
163
162
    void toggleShowGrid(bool);
164
163
    void toggleSnapGrid(bool);
165
164
    void toggleShowGuides(bool);
166
 
    void toggleSnapGuides(bool);
167
165
 
168
166
    void toggleStencilGeometry(bool);
169
167
    void toggleViewManager(bool);
170
 
    void toggleLayersPanel(bool);
171
 
    void toggleBirdEyePanel(bool);
172
 
    void toggleProtectionPanel(bool);
173
 
    void toggleAddStencilSetPanel(bool);
174
168
 
 
169
    void addPage( KivioPage* );
 
170
    void removePage( KivioPage* );
175
171
    void insertPage();
176
172
    void removePage();
177
173
    void renamePage();
178
174
    void hidePage();
179
175
    void showPage();
180
 
    void exportPage();
181
176
    void viewZoom(int);
182
177
 
183
178
    void groupStencils();
198
193
    void cutStencil();
199
194
    void copyStencil();
200
195
    void pasteStencil();
 
196
    /// Called by the delete action
 
197
    void deleteObject();
201
198
 
202
199
    void alignStencilsDlg();
203
200
    void optionsDialog();
218
215
    void setStatusBarInfo(const QString& text);
219
216
 
220
217
  protected slots:
221
 
    void slotAddPage( KivioPage *_page );
222
218
    void slotPageRenamed( KivioPage* page, const QString& old_name );
223
219
    void slotUpdateView( KivioPage *_page );
224
220
    void slotUpdateGrid();
276
272
 
277
273
    void installStencilSet();
278
274
 
 
275
    /// This slot gets called when the loading has finished (doh!)
 
276
    void loadingFinished();
 
277
 
 
278
    void moveTab(unsigned tab, unsigned target);
 
279
 
 
280
    void addGuideLine();
 
281
 
 
282
    void showAddStencilSetDialog();
 
283
 
 
284
    void updateRulers();
 
285
 
279
286
  protected:
280
287
    void setupActions();
281
288
    void initActions();
295
302
    KAction* m_renamePage;
296
303
    KAction* m_hidePage;
297
304
    KAction* m_showPage;
298
 
    KAction* m_exportPage;
299
305
    KAction* m_arrowHeadsMenuAction;
300
306
    KAction* m_menuTextFormatAction;
301
307
    KAction* m_menuStencilConnectorsAction;
324
330
    KivioStencilSpawnerSet* m_pActiveSpawnerSet;
325
331
 
326
332
    StencilBarDockManager* m_pStencilBarDockManager;
327
 
    KoToolDockManager* m_pToolDockManager;
 
333
    KoPaletteManager* m_pPaletteManager;
328
334
 
329
335
    KoRuler* vRuler;
330
336
    KoRuler* hRuler;
333
339
    KivioLayerPanel* m_pLayersPanel;
334
340
    KivioBirdEyePanel* m_pBirdEyePanel;
335
341
    KivioProtectionPanel* m_pProtectionPanel;
336
 
    Kivio::AddStencilSetPanel* m_addStencilSetPanel;
 
342
    Kivio::ObjectListPalette* m_objectListPalette;
337
343
    KToggleAction* showPageMargins;
338
344
    KToggleAction* showRulers;
339
345
    KToggleAction* showGrid;
343
349
    KAction *m_editCopy;
344
350
    KAction* m_editCut;
345
351
    KAction* m_editPaste;
 
352
    KAction* m_editDelete;
346
353
    bool m_bShowPageMargins;
347
354
    bool m_bShowRulers;
348
355
    bool m_bSnapGuides;
368
375
 
369
376
    QProgressBar* m_statusBarProgress;
370
377
 
 
378
    QScrollBar* m_vertScrollBar;
 
379
    QScrollBar* m_horzScrollBar;
 
380
    Kivio::AddStencilTool* m_addStencilTool;
 
381
 
 
382
    Kivio::AddStencilSetDialog* m_addStencilSetDialog;
371
383
};
372
384
 
373
385
#endif