1 #ifndef uigraphicsscene_h 2 #define uigraphicsscene_h 15 #include "uibasemod.h" 45 void removeAllItems();
46 uiGraphicsItem* removeItem(uiGraphicsItem*);
51 template <
class T> T* addItem(T*);
56 uiGraphicsItem* getItem(
int id);
57 const uiGraphicsItem* getItem(
int id)
const;
61 uiRectItem* addRect(
float x,
float y,
float w,
float h);
66 void useBackgroundPattern(
bool);
67 void setBackGroundColor(
const Color&);
68 const Color backGroundColor()
const;
70 int getSelItemSize()
const;
71 uiRect getSelectedArea()
const;
72 void setSelectionArea(
const uiRect&);
75 {
return mousehandler_; }
80 double height()
const;
82 void saveAsImage(
const char*,
int,
int,
int);
83 void saveAsPDF(
const char*,
int w,
int h,
int r);
84 void saveAsPS(
const char*,
int w,
int h,
int r);
85 void saveAsPDF_PS(
const char*,
bool pdf_or_ps,
int w,
87 void setSceneRect(
float x,
float y,
float w,
float h);
91 {
return ismouseeventactive_; }
93 { ismouseeventactive_ = yn; }
95 {
return (
mQtclass(QGraphicsScene*))odgraphicsscene_;}
96 void copyToClipBoard();
99 void addUpdateToQueue(
Task*);
100 bool executePendingUpdates();
102 void setPixelDensity(
float);
104 static float getDefaultPixelDensity();
108 void translateText();
117 friend class uiGraphicsItem;
118 uiGraphicsItem* doAddItem(uiGraphicsItem*);
144 void setLayoutPos(
const uiPoint&);
145 const uiPoint layoutPos()
const;
146 const uiSize layoutSize()
const;
150 void resizeLayoutToContent();
152 mQtclass(QGraphicsLinearLayout*) layout_;
153 mQtclass(QGraphicsWidget*) layoutitem_;
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
bool remove_
Definition: uigraphicsscene.h:169
#define mQtclass(cls)
Definition: commondefs.h:229
mQtclass(QGraphicsScene *) qGraphicsScene()
Definition: uigraphicsscene.h:94
int queueid_
Definition: uigraphicsscene.h:121
Definition: uigraphicsscene.h:133
ObjectSet< uiGraphicsItem > items_
Definition: uigraphicsscene.h:111
Definition: uigraphicsitemimpl.h:192
Notifier< uiGraphicsScene > ctrlPPressed
Definition: uigraphicsscene.h:77
ODGraphicsScene * odgraphicsscene_
Definition: uigraphicsscene.h:112
Definition: uigraphicsscene.h:157
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
uiGraphicsItemGroup * group_
Definition: uigraphicsscene.h:167
MouseEventHandler mousehandler_
Definition: uigraphicsscene.h:115
Definition: uigraphicsitemimpl.h:52
Set of (small) copyable elements.
Definition: commontypes.h:30
T * addItem(T *)
Item becomes mine.
Definition: uigraphicsscene.h:127
Definition: uigraphicsitem.h:157
bool ismouseeventactive_
Definition: uigraphicsscene.h:116
Definition: uigraphicsitemimpl.h:255
Definition: mouseevent.h:162
MouseEventHandler & getMouseEventHandler()
Definition: uigraphicsscene.h:74
Definition: uigraphicsitemimpl.h:214
Object with a name.
Definition: namedobj.h:35
bool isMouseEventActive() const
Definition: uigraphicsscene.h:90
float getPixelDensity() const
Definition: uigraphicsscene.h:103
Definition: uigraphicsitem.h:142
mFDQtclass(QGraphicsScene) mFDQtclass(QGraphicsLinearLayout) mFDQtclass(QGraphicsWidget) mFDQtclass(ODGraphicsScene) class ArrowStyle
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
uiGraphicsItem & itm_
Definition: uigraphicsscene.h:168
#define mClass(module)
Definition: commondefs.h:164
uiGraphicsItem * doAddItem(uiGraphicsItem *)
float pixeldensity_
Definition: uigraphicsscene.h:122
Notifier< uiGraphicsScene > ctrlCPressed
Definition: uigraphicsscene.h:78
Generalization of something (e.g. a computation) that needs to be done in multiple steps...
Definition: task.h:28
Notifier< uiGraphicsScene > pixelDensityChange
Definition: uigraphicsscene.h:106
friend class uiGraphicsItem
Definition: uigraphicsscene.h:117
uiGraphicsScene * scene_
Definition: uigraphicsscene.h:166
void setMouseEventActive(bool yn)
Definition: uigraphicsscene.h:92
Definition: uigraphicsscene.h:39