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

« back to all changes in this revision

Viewing changes to kugar/kudesigner_lib/mycanvas.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:
1
 
/***************************************************************************
2
 
                          mycanvas.h  -  description
3
 
                             -------------------
4
 
    begin                : 07.06.2002
5
 
    copyright            : (C) 2002 by Alexander Dymo
6
 
    email                : cloudtemple@mksat.net
7
 
 ***************************************************************************/
8
 
 
9
 
/***************************************************************************
10
 
 *                                                                         *
11
 
 *   This program is free software; you can redistribute it and/or modify  *
12
 
 *   it under the terms of the GNU Library General Public License as       *
13
 
 *   published by the Free Software Foundation; either version 2 of the    *
14
 
 *   License, or (at your option) any later version.                       *
15
 
 *                                                                         *
16
 
 ***************************************************************************/
17
 
#ifndef MYCANVAS_H
18
 
#define MYCANVAS_H
19
 
 
20
 
#include <qcanvas.h>
21
 
 
22
 
class CanvasBox;
23
 
class CanvasKugarTemplate;
24
 
class KuDesignerPlugin;
25
 
 
26
 
class MyCanvas: public QCanvas{
27
 
    Q_OBJECT
28
 
public:
29
 
    MyCanvas(int w, int h);
30
 
    ~MyCanvas();
31
 
 
32
 
//    KudesignerDoc *document(){return m_doc;}
33
 
    CanvasKugarTemplate *templ;
34
 
    QPtrList<CanvasBox> selected;
35
 
 
36
 
    KuDesignerPlugin *plugin();
37
 
    void setPlugin(KuDesignerPlugin *plugin);
38
 
 
39
 
    void unselectAll();
40
 
    void selectAll();
41
 
    void selectItem(CanvasBox *it, bool addToSelection = true);
42
 
    void unselectItem(CanvasBox *it);
43
 
//    void deleteSelected();
44
 
 
45
 
protected:
46
 
   virtual void drawForeground ( QPainter & painter, const QRect & clip );
47
 
 
48
 
private:
49
 
//    KudesignerDoc *m_doc;
50
 
    void scaleCanvas(int scale);
51
 
    KuDesignerPlugin *m_plugin;
52
 
 
53
 
signals:
54
 
    void itemSelected();
55
 
};
56
 
 
57
 
#endif