• Main Page
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

C:/Users/David/Documents/QtProjects/visualsc/scgraphicsview/selectabletextblock.h

Go to the documentation of this file.
00001 #ifndef SELECTABLETEXTBLOCK_H
00002 #define SELECTABLETEXTBLOCK_H
00003 
00004 #include <QGraphicsTextItem>
00005 #include "selectableboxgraphic.h"
00006 #include "textblock.h"
00007 #include "iattribute.h"
00008 class QKeyEvent;
00009 class QGraphicsSceneMouseEvent;
00010 
00034 class SelectableTextBlock : public SelectableBoxGraphic
00035 {
00036     Q_OBJECT
00037 
00038 public:
00039     SelectableTextBlock(QGraphicsObject *parent=NULL,TextBlock *textBlockModel=NULL);
00040     ~SelectableTextBlock();
00041 
00042 //    void setPlainText(QString text);
00043     virtual void setSize(QPoint size); 
00044 
00045 
00046 protected:
00047 
00048     void keyPressEvent ( QKeyEvent * event ); // [virtual protected]
00049     void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * event );// [virtual protected]
00050 
00051 
00052 private slots:
00053 
00054     void handleTextChanged();
00055     void handleAttributeChanged(IAttribute *attr);
00056     void handleAttributeAdded(IAttribute *attr);
00057     void handleAttributeDeleted(IAttribute *attr);
00058     void handleEditBoxSavedText(QString text);
00059 
00060 private:
00061 
00062     // private methods
00063 
00064    void connectAttributes(IAttributeContainer *attributes);
00065    virtual void graphicHasChanged(); 
00066 
00067    // private data
00068    QGraphicsTextItem _textItem;
00069 
00070    QPoint _minSize;
00071 
00072    TextBlock * _textBlockModel;
00073 };
00074 
00075 #endif // SELECTABLETEXTBLOCK_H

Generated on Mon Sep 26 2011 06:59:25 for visualsc by  doxygen 1.7.1