14 #ifndef FIGUREEDITOR_H
15 #define FIGUREEDITOR_H
20 #include <msdevstudio/MSconfig.h>
24 #if QT_VERSION < 0x040000
28 #include <QtCore/QCustomEvent>
72 #if QT_VERSION < 0x040000
89 #if QT_VERSION < 0x040000
92 const Q3CanvasItem * m_item;
99 #if QT_VERSION < 0x040000
110 #if QT_VERSION < 0x040000
113 const Q3CanvasItem * item () const
158 #if QT_VERSION < 0x040000
161 void resizeCanvasToFit ( Q3CanvasItem * item );
165 void savePrinterSettings ();
175 void addPageMargin (
int x,
int y );
189 double maximumZ ()
const;
193 void setUnselectedVisible (
bool yes );
203 #if QT_VERSION < 0X040000
204 movePlotterWithText (
QCanvasItem * item,
float dx,
float dy );
206 movePlotterWithText ( Q3CanvasItem * item,
float dx,
float dy );
212 QPixmap * createPixmap (
const QRect & rectangle )
const;
217 QImage createImage (
const QRect & rectange )
const;
237 #if QT_VERSION < 0x040000
240 std::vector < Q3CanvasItem * > m_items;
251 #if QT_VERSION < 0x040000
254 Q3CanvasItem * m_rightItem;
262 #if QT_VERSION < 0x040000
265 Q3CanvasItem * m_preSelected;
282 #if QT_VERSION < 0x040000
289 #if QT_VERSION < 0x040000
292 std::vector < Q3CanvasItem * > m_selected_list;
312 lower_left, lower_middle, lower_right };
318 virtual void notifyObservers () = 0;
322 #if QT_VERSION < 0x040000
325 void makeVisible (
const Q3CanvasItem * item );
328 virtual void contentsMousePressEvent(
QMouseEvent*);
331 virtual void controlMousePressEvent () = 0;
338 void contentsMouseMoveEvent (
QMouseEvent *,
double aspect );
345 void whereClicked ( );
348 #if QT_VERSION < 0x040000
351 void placeGraphOnSelected ( Q3CanvasRectangle * item );
357 void setSelectedItems (
bool state );
360 QRect getSelectedBounds ()
const;
363 void clearSelectedList ();
368 #if QT_VERSION < 0x040000
369 void setCollidingSelected (
const QCanvasItem * target );
371 void setCollidingSelected (
const Q3CanvasItem * target );
376 void saveSelectedAsPixmap (
const std::string & filename );
380 void saveAreaAsPixmap (
const QRect & area,
const std::string & filename );
384 void copySelectedToClipboard ();
392 #if QT_VERSION < 0x040000
395 void removeFromItemList ( Q3CanvasItem * item );
398 #if QT_VERSION < 0x040000
401 void addToItemList ( Q3CanvasItem * item );
407 #if QT_VERSION < 0x040000
409 const char * name = 0, Qt::WFlags f = 0 );
412 const char * name = 0, Qt::WFlags f = 0 );
416 void static setAppKey (
const std::string & );
420 void showPrinterMargins (
bool on );
423 void setPrinterSettings ();
427 virtual void print ();
431 virtual void print (
const std::string & filename );
442 #if QT_VERSION < 0x040000
445 Q3CanvasItem * selectedItem ()
const;
450 #if QT_VERSION < 0x040000
453 void setSelectedItem ( Q3CanvasItem * );
458 #if QT_VERSION < 0x040000
461 Q3CanvasItem * getRightItem ();
465 void setAllSelected (
bool flag =
true );
468 void setLocked (
bool flag );
472 void setZoomMode (
bool flag );
475 bool getZoomMode ( )
const;
485 #if QT_VERSION < 0x040000
488 void placeGraph ( Q3CanvasRectangle * );
492 #if QT_VERSION < 0x040000
495 void add ( Q3CanvasItem * item );
500 #if QT_VERSION < 0x040000
503 void paste ( Q3CanvasItem * item );
510 #if QT_VERSION < 0x040000
513 void remove ( Q3CanvasItem * item );
521 #if QT_VERSION < 0x040000
524 void hide ( Q3CanvasItem * item );
528 #if QT_VERSION < 0x040000
529 std::vector < QCanvasItem * > & getSelectedItems ();
531 std::vector < Q3CanvasItem * > & getSelectedItems ();
535 bool isSingleItemSelected ()
const;
538 #if QT_VERSION < 0x040000
541 void addSelectedItem ( Q3CanvasItem * item );
546 #if QT_VERSION < 0x040000
549 void removeSelectedItem ( Q3CanvasItem * item );
553 void setSelectedFlags ();
559 void scaleBy (
double factor );
569 void viewZoomReset ();
572 virtual void viewShowPickTable() = 0;
576 #if QT_VERSION < 0x040000
579 void ensureVisible (
const Q3CanvasItem * item );
584 const QString & getAppKey ()
const;
588 const QString & getRegistry ()
const;
592 void enterEvent (
QEvent * );
596 void leaveEvent (
QEvent * );
603 #endif // FIGUREEDITOR_H