kplato
kptpertview.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KPTPERTVIEW_H
00021 #define KPTPERTVIEW_H
00022
00023 #include "kptcontext.h"
00024
00025 #include <qsplitter.h>
00026
00027 class QLayout;
00028 class QListViewItem;
00029
00030 class KPrinter;
00031
00032 namespace KPlato
00033 {
00034
00035 class View;
00036 class PertCanvas;
00037 class Node;
00038 class Relation;
00039
00040 class PertView : public QWidget
00041 {
00042 Q_OBJECT
00043
00044 public:
00045
00046 PertView( View *view, QWidget *parent, QLayout *layout );
00047
00048 ~PertView();
00049
00050 void setZoom(double ) {}
00051
00052 void draw();
00053 View *mainView() const { return m_mainview; }
00054
00055 void print(KPrinter &printer);
00056
00057 Node *currentNode();
00058
00059 virtual bool setContext(Context::Pertview &context);
00060 virtual void getContext(Context::Pertview &context) const;
00061
00062 public slots:
00063 void slotRMBPressed(Node *node, const QPoint & point);
00064 void slotAddRelation(Node *par, Node *child);
00065 void slotModifyRelation(Relation *rel);
00066
00067 signals:
00068 void addRelation(Node *par, Node *child);
00069 void modifyRelation(Relation *rel);
00070
00071 private:
00072 void init(QLayout *layout);
00073 View *m_mainview;
00074 PertCanvas *m_canvasview;
00075 Node *m_node;
00076 int m_defaultFontSize;
00077 };
00078
00079 }
00080
00081 #endif
|