Commit 856f3257 authored by Aleksei Kanash's avatar Aleksei Kanash

Merge branch 'master' of github.com:Sankore/Sankore-3.1

parents ed2996c9 26dad723
...@@ -199,7 +199,7 @@ function init(){ ...@@ -199,7 +199,7 @@ function init(){
if(text) if(text)
textField.html(text); textField.html(text);
else else
textField.html("Enter your notes here ..."); textField.html("Saisir votre texte ici ...");
textField.focus(); textField.focus();
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
var sankoreLang = {display: "Afficher", edit: "Modifier", add: "Ajouter", enter_data: "Saisir la donnée:", enter_result: "Saisir le résultat:", ok: "Accepter", cancel: "Annuler"}; var sankoreLang = {display: "Afficher", edit: "Modifier", add: "Ajouter", enter_data: "Saisir la donnée:", enter_result: "Saisir le résultat:", ok: "Valider", cancel: "Annuler"};
function init(){ function init(){
......
...@@ -3,7 +3,7 @@ var sankoreLang = { ...@@ -3,7 +3,7 @@ var sankoreLang = {
edit: "Edit", edit: "Edit",
short_desc: "Select the number \"three\".", short_desc: "Select the number \"three\".",
add: "Add new block", add: "Add new block",
enter: "Enter what to do here ..." enter: "Enter what to do here..."
}; };
//main function //main function
......
...@@ -2559,7 +2559,6 @@ UBGraphicsRuler* UBSvgSubsetAdaptor::UBSvgSubsetReader::rulerFromSvg() ...@@ -2559,7 +2559,6 @@ UBGraphicsRuler* UBSvgSubsetAdaptor::UBSvgSubsetReader::rulerFromSvg()
graphicsItemFromSvg(ruler); graphicsItemFromSvg(ruler);
UBGraphicsItem::assignZValue(ruler, UBGraphicsScene::toolLayerStart + UBGraphicsScene::toolOffsetRuler);
ruler->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); ruler->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool));
QStringRef svgWidth = mXmlReader.attributes().value("width"); QStringRef svgWidth = mXmlReader.attributes().value("width");
...@@ -2617,7 +2616,6 @@ UBGraphicsCompass* UBSvgSubsetAdaptor::UBSvgSubsetReader::compassFromSvg() ...@@ -2617,7 +2616,6 @@ UBGraphicsCompass* UBSvgSubsetAdaptor::UBSvgSubsetReader::compassFromSvg()
graphicsItemFromSvg(compass); graphicsItemFromSvg(compass);
UBGraphicsItem::assignZValue(compass, UBGraphicsScene::toolLayerStart + UBGraphicsScene::toolOffsetCompass);
compass->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); compass->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool));
QStringRef svgX = mXmlReader.attributes().value("x"); QStringRef svgX = mXmlReader.attributes().value("x");
...@@ -2681,7 +2679,6 @@ UBGraphicsProtractor* UBSvgSubsetAdaptor::UBSvgSubsetReader::protractorFromSvg() ...@@ -2681,7 +2679,6 @@ UBGraphicsProtractor* UBSvgSubsetAdaptor::UBSvgSubsetReader::protractorFromSvg()
{ {
UBGraphicsProtractor* protractor = new UBGraphicsProtractor(); UBGraphicsProtractor* protractor = new UBGraphicsProtractor();
UBGraphicsItem::assignZValue(protractor, UBGraphicsScene::toolLayerStart + UBGraphicsScene::toolOffsetProtractor);
protractor->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); protractor->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool));
graphicsItemFromSvg(protractor); graphicsItemFromSvg(protractor);
...@@ -2751,7 +2748,6 @@ UBGraphicsTriangle* UBSvgSubsetAdaptor::UBSvgSubsetReader::triangleFromSvg() ...@@ -2751,7 +2748,6 @@ UBGraphicsTriangle* UBSvgSubsetAdaptor::UBSvgSubsetReader::triangleFromSvg()
{ {
UBGraphicsTriangle* triangle = new UBGraphicsTriangle(); UBGraphicsTriangle* triangle = new UBGraphicsTriangle();
UBGraphicsItem::assignZValue(triangle, UBGraphicsScene::toolLayerStart + UBGraphicsScene::toolOffsetTriangle);
triangle->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); triangle->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool));
graphicsItemFromSvg(triangle); graphicsItemFromSvg(triangle);
......
...@@ -419,10 +419,10 @@ UBBoardView::mousePressEvent (QMouseEvent *event) ...@@ -419,10 +419,10 @@ UBBoardView::mousePressEvent (QMouseEvent *event)
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
if (!movingItem if (!movingItem
|| movingItem->isSelected() || movingItem->isSelected()
|| movingItem->type() == UBGraphicsDelegateFrame::Type || movingItem->type() == UBGraphicsDelegateFrame::Type
|| movingItem->type() == DelegateButton::Type || movingItem->type() == DelegateButton::Type
|| movingItem->type() == UBGraphicsCompass::Type || movingItem->type() == UBGraphicsCompass::Type
|| movingItem->type() == UBGraphicsPDFItem::Type || movingItem->type() == UBGraphicsPDFItem::Type
|| movingItem->type() == UBGraphicsPolygonItem::Type || movingItem->type() == UBGraphicsPolygonItem::Type
...@@ -434,7 +434,7 @@ UBBoardView::mousePressEvent (QMouseEvent *event) ...@@ -434,7 +434,7 @@ UBBoardView::mousePressEvent (QMouseEvent *event)
QGraphicsView::mousePressEvent (event); QGraphicsView::mousePressEvent (event);
} }
else else
{ {
mLastPressedMousePos = mapToScene(event->pos()); mLastPressedMousePos = mapToScene(event->pos());
if (suspendedMousePressEvent) if (suspendedMousePressEvent)
......
...@@ -86,6 +86,7 @@ const int UBSettings::defaultWidgetIconWidth = 110; ...@@ -86,6 +86,7 @@ const int UBSettings::defaultWidgetIconWidth = 110;
const int UBSettings::defaultVideoWidth = 80; const int UBSettings::defaultVideoWidth = 80;
const int UBSettings::thumbnailSpacing = 20; const int UBSettings::thumbnailSpacing = 20;
const int UBSettings::longClickInterval = 2000;
const qreal UBSettings::minScreenRatio = 1.33; // 800/600 or 1024/768 const qreal UBSettings::minScreenRatio = 1.33; // 800/600 or 1024/768
......
...@@ -178,6 +178,7 @@ class UBSettings : public QObject ...@@ -178,6 +178,7 @@ class UBSettings : public QObject
static const int defaultSoundWidth; static const int defaultSoundWidth;
static const int thumbnailSpacing; static const int thumbnailSpacing;
static const int longClickInterval;
static const qreal minScreenRatio; static const qreal minScreenRatio;
......
This diff is collapsed.
...@@ -21,9 +21,11 @@ ...@@ -21,9 +21,11 @@
#include <QMimeData> #include <QMimeData>
#include "core/UB.h" #include "core/UB.h"
#include "core/UBSettings.h"
class QGraphicsSceneMouseEvent; class QGraphicsSceneMouseEvent;
class QGraphicsItem; class QGraphicsItem;
class UBGraphicsScene;
class UBGraphicsProxyWidget; class UBGraphicsProxyWidget;
class UBGraphicsDelegateFrame; class UBGraphicsDelegateFrame;
class UBGraphicsWidgetItem; class UBGraphicsWidgetItem;
...@@ -63,20 +65,8 @@ class DelegateButton: public QGraphicsSvgItem ...@@ -63,20 +65,8 @@ class DelegateButton: public QGraphicsSvgItem
protected: protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
{ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
// make sure delegate is selected, to avoid control being hidden
mDelegated->setSelected(true);
event->setAccepted(!mIsTransparentToMouseEvent);
}
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
emit clicked();
event->setAccepted(!mIsTransparentToMouseEvent);
}
void modified(); void modified();
...@@ -84,12 +74,13 @@ class DelegateButton: public QGraphicsSvgItem ...@@ -84,12 +74,13 @@ class DelegateButton: public QGraphicsSvgItem
QGraphicsItem* mDelegated; QGraphicsItem* mDelegated;
QTime mPressedTime;
bool mIsTransparentToMouseEvent; bool mIsTransparentToMouseEvent;
Qt::WindowFrameSection mButtonAlignmentSection; Qt::WindowFrameSection mButtonAlignmentSection;
signals: signals:
void clicked (bool checked = false); void clicked (bool checked = false);
void longClicked();
}; };
...@@ -110,8 +101,12 @@ class UBGraphicsItemDelegate : public QObject ...@@ -110,8 +101,12 @@ class UBGraphicsItemDelegate : public QObject
virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event); virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
virtual bool weelEvent(QGraphicsSceneWheelEvent *event); virtual bool weelEvent(QGraphicsSceneWheelEvent *event);
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change,
const QVariant &value); const QVariant &value);
virtual UBGraphicsScene *castUBGraphicsScene();
void printMessage(const QString &mess) {qDebug() << mess;} void printMessage(const QString &mess) {qDebug() << mess;}
...@@ -123,6 +118,7 @@ class UBGraphicsItemDelegate : public QObject ...@@ -123,6 +118,7 @@ class UBGraphicsItemDelegate : public QObject
void setCanDuplicate(bool allow){ mCanDuplicate = allow; } void setCanDuplicate(bool allow){ mCanDuplicate = allow; }
virtual void positionHandles(); virtual void positionHandles();
void setZOrderButtonsVisible(bool visible);
void startUndoStep(); void startUndoStep();
void commitUndoStep(); void commitUndoStep();
...@@ -135,6 +131,7 @@ class UBGraphicsItemDelegate : public QObject ...@@ -135,6 +131,7 @@ class UBGraphicsItemDelegate : public QObject
QMimeData* mimeData(){ return mMimeData; } QMimeData* mimeData(){ return mMimeData; }
void setMimeData(QMimeData* mimeData); void setMimeData(QMimeData* mimeData);
void setDragPixmap(const QPixmap &pix) {mDragPixmap = pix;}
void setFlippable(bool flippable); void setFlippable(bool flippable);
bool isFlippable(); bool isFlippable();
...@@ -153,8 +150,10 @@ class UBGraphicsItemDelegate : public QObject ...@@ -153,8 +150,10 @@ class UBGraphicsItemDelegate : public QObject
virtual void lock(bool lock); virtual void lock(bool lock);
virtual void duplicate(); virtual void duplicate();
virtual void increaseZLevel() {increaseZLevel(1);} void increaseZLevelUp();
virtual void decreaseZLevel() {increaseZLevel(-1);} void increaseZLevelDown();
void increaseZlevelTop();
void increaseZlevelBottom();
protected: protected:
virtual void buildButtons() {;} virtual void buildButtons() {;}
...@@ -189,18 +188,22 @@ protected slots: ...@@ -189,18 +188,22 @@ protected slots:
virtual void gotoContentSource(bool checked); virtual void gotoContentSource(bool checked);
private: private:
void updateFrame();
void updateButtons(bool showUpdated = false);
virtual void increaseZLevel(int delta);
QPointF mOffset; QPointF mOffset;
QTransform mPreviousTransform; QTransform mPreviousTransform;
QPointF mPreviousPosition; QPointF mPreviousPosition;
QPointF mDragStartPosition;
qreal mPreviousZValue; qreal mPreviousZValue;
QSizeF mPreviousSize; QSizeF mPreviousSize;
bool mCanRotate; bool mCanRotate;
bool mCanDuplicate; bool mCanDuplicate;
bool mRespectRatio; bool mRespectRatio;
QMimeData* mMimeData; QMimeData* mMimeData;
QPixmap mDragPixmap;
/** A boolean saying that this object can be flippable (mirror effect) */ /** A boolean saying that this object can be flippable (mirror effect) */
bool mFlippable; bool mFlippable;
......
...@@ -58,13 +58,18 @@ void UBGraphicsPixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *event) ...@@ -58,13 +58,18 @@ void UBGraphicsPixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
QMimeData* pMime = new QMimeData(); QMimeData* pMime = new QMimeData();
pMime->setImageData(pixmap().toImage()); pMime->setImageData(pixmap().toImage());
mDelegate->setMimeData(pMime); mDelegate->setMimeData(pMime);
int k = pixmap().width() / 100;
QSize newSize(pixmap().width() / k, pixmap().height() / k);
mDelegate->setDragPixmap(pixmap().scaled(newSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
if (mDelegate->mousePressEvent(event)) if (mDelegate->mousePressEvent(event))
{ {
//NOOP //NOOP
} }
else else
{ {
QGraphicsPixmapItem::mousePressEvent(event); // QGraphicsPixmapItem::mousePressEvent(event);
} }
} }
......
...@@ -61,10 +61,6 @@ protected: ...@@ -61,10 +61,6 @@ protected:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
// UBGraphicsItemDelegate* mDelegate;
}; };
#endif /* UBGRAPHICSPIXMAPITEM_H_ */ #endif /* UBGRAPHICSPIXMAPITEM_H_ */
This diff is collapsed.
...@@ -49,33 +49,47 @@ class UBGraphicsCache; ...@@ -49,33 +49,47 @@ class UBGraphicsCache;
const double PI = 4.0 * atan(1.0); const double PI = 4.0 * atan(1.0);
class UBZLayerController class UBZLayerController : public QObject
{ {
public: Q_OBJECT
public:
struct ItemLayerTypeData { struct ItemLayerTypeData {
ItemLayerTypeData() : bottomLimit(0), topLimit(0), curValue(0) {;} ItemLayerTypeData() : bottomLimit(0), topLimit(0), curValue(0), incStep(1) {;}
ItemLayerTypeData(qreal bot, qreal top) : bottomLimit(bot), topLimit(top), curValue(bot) {;} ItemLayerTypeData(qreal bot, qreal top, qreal increment = 1) : bottomLimit(bot), topLimit(top), curValue(bot), incStep(increment) {;}
qreal bottomLimit; qreal bottomLimit; //bottom bound of the layer
qreal topLimit; qreal topLimit;//top bound of the layer
qreal curValue; qreal curValue;//current value of variable
qreal incStep;//incremental step
};
enum moveDestination {
up
, down
, top
, bottom
}; };
typedef QMap<itemLayerType::Enum, ItemLayerTypeData> ScopeMap; typedef QMap<itemLayerType::Enum, ItemLayerTypeData> ScopeMap;
UBZLayerController(); UBZLayerController(QGraphicsScene *scene);
qreal getBottomLimit(itemLayerType::Enum key) const {return scopeMap.value(key).bottomLimit;} qreal getBottomLimit(itemLayerType::Enum key) const {return scopeMap.value(key).bottomLimit;}
qreal getTopLimit(itemLayerType::Enum key) const {return scopeMap.value(key).topLimit;} qreal getTopLimit(itemLayerType::Enum key) const {return scopeMap.value(key).topLimit;}
bool validLayerType(itemLayerType::Enum key) const {return scopeMap.contains(key);} bool validLayerType(itemLayerType::Enum key) const {return scopeMap.contains(key);}
static qreal errorNum() {return errorNumber;} static qreal errorNum() {return errorNumber;}
qreal generateZLevel(itemLayerType::Enum key); qreal generateZLevel(itemLayerType::Enum key);
qreal generateZLevel(QGraphicsItem *item);
private: qreal changeZLevelTo(QGraphicsItem *item, moveDestination dest);
ScopeMap scopeMap; itemLayerType::Enum typeForData(QGraphicsItem *item) const;
static qreal errorNumber;
private:
ScopeMap scopeMap;
static qreal errorNumber;
QGraphicsScene *mScene;
}; };
class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
...@@ -87,7 +101,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem ...@@ -87,7 +101,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
// tmp stub for divide addings scene objects from undo mechanism implementation // tmp stub for divide addings scene objects from undo mechanism implementation
void setURStackEnable(bool set = true) {enableUndoRedoStack = set;} void setURStackEnable(bool set = true) {enableUndoRedoStack = set;}
UBGraphicsScene(UBDocumentProxy *parent); UBGraphicsScene(UBDocumentProxy *parent);
virtual ~UBGraphicsScene(); virtual ~UBGraphicsScene();
virtual UBItem* deepCopy() const; virtual UBItem* deepCopy() const;
...@@ -242,6 +256,8 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem ...@@ -242,6 +256,8 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
void setNominalSize(int pWidth, int pHeight); void setNominalSize(int pWidth, int pHeight);
qreal changeZLevelTo(QGraphicsItem *item, UBZLayerController::moveDestination dest);
enum RenderingContext enum RenderingContext
{ {
Screen = 0, NonScreen, PdfExport, Podcast Screen = 0, NonScreen, PdfExport, Podcast
...@@ -257,20 +273,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem ...@@ -257,20 +273,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
return mRenderingContext; return mRenderingContext;
} }
static qreal backgroundLayerStart;
static qreal objectLayerStart;
static qreal drawingLayerStart;
static qreal toolLayerStart;
static qreal toolOffsetEraser;
static qreal toolOffsetPointer;
static qreal toolOffsetRuler;
static qreal toolOffsetProtractor;
static qreal toolOffsetCompass;
static qreal toolOffsetCurtain;
static qreal toolOffsetTriangle;
static qreal toolOffsetCache;
QSet<QGraphicsItem*> tools(){ return mTools;} QSet<QGraphicsItem*> tools(){ return mTools;}
void registerTool(QGraphicsItem* item) void registerTool(QGraphicsItem* item)
...@@ -283,7 +285,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem ...@@ -283,7 +285,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
return mPreviousPoint; return mPreviousPoint;
} }
public slots: void setSelectedZLevel(QList<QGraphicsItem *> itemList);
void setOwnZlevel(QList<QGraphicsItem *> itemList);
public slots:
void hideEraser(); void hideEraser();
...@@ -339,8 +343,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem ...@@ -339,8 +343,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
void createEraiser(); void createEraiser();
void createPointer(); void createPointer();
qreal generateZLevel(QGraphicsItem *item);
QGraphicsEllipseItem* mEraser; QGraphicsEllipseItem* mEraser;
QGraphicsEllipseItem* mPointer; QGraphicsEllipseItem* mPointer;
...@@ -392,7 +394,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem ...@@ -392,7 +394,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
UBMagnifier *magniferControlViewWidget; UBMagnifier *magniferControlViewWidget;
UBMagnifier *magniferDisplayViewWidget; UBMagnifier *magniferDisplayViewWidget;
UBZLayerController mZLayerController; UBZLayerController *mZLayerController;
}; };
......
...@@ -109,10 +109,10 @@ void UBGraphicsVideoItem::showOnDisplayChanged(bool shown) ...@@ -109,10 +109,10 @@ void UBGraphicsVideoItem::showOnDisplayChanged(bool shown)
void UBGraphicsVideoItem::mousePressEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsVideoItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
QDrag* mDrag = new QDrag(event->widget()); // QDrag* mDrag = new QDrag(event->widget());
QMimeData* pMime = new QMimeData(); // QMimeData* pMime = new QMimeData();
mDrag->setMimeData(pMime); // mDrag->setMimeData(pMime);
mDrag->start(); // mDrag->start();
mShouldMove = (event->buttons() & Qt::LeftButton); mShouldMove = (event->buttons() & Qt::LeftButton);
mMousePressPos = event->scenePos(); mMousePressPos = event->scenePos();
......
...@@ -82,11 +82,13 @@ void UBGraphicsWidgetItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) ...@@ -82,11 +82,13 @@ void UBGraphicsWidgetItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsWidgetItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsWidgetItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {
sendJSEnterEvent(); sendJSEnterEvent();
mDelegate->hoverEnterEvent(event);
UBGraphicsProxyWidget::hoverEnterEvent(event); UBGraphicsProxyWidget::hoverEnterEvent(event);
} }
void UBGraphicsWidgetItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsWidgetItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
sendJSLeaveEvent(); sendJSLeaveEvent();
mDelegate->hoverLeaveEvent(event);
UBGraphicsProxyWidget::hoverLeaveEvent(event); UBGraphicsProxyWidget::hoverLeaveEvent(event);
} }
......
...@@ -29,7 +29,7 @@ UBItem::~UBItem() ...@@ -29,7 +29,7 @@ UBItem::~UBItem()
// NOOP // NOOP
} }
void UBGraphicsItem::assignZValue(QGraphicsItem *item, int value) void UBGraphicsItem::assignZValue(QGraphicsItem *item, qreal value)
{ {
item->setZValue(value); item->setZValue(value);
item->setData(UBGraphicsItemData::ItemOwnZValue, value); item->setData(UBGraphicsItemData::ItemOwnZValue, value);
......
...@@ -101,7 +101,7 @@ protected: ...@@ -101,7 +101,7 @@ protected:
public: public:
static void assignZValue(QGraphicsItem*, int value); static void assignZValue(QGraphicsItem*, qreal value);
virtual UBGraphicsItemDelegate *Delegate() const = 0; virtual UBGraphicsItemDelegate *Delegate() const = 0;
virtual void remove() = 0; virtual void remove() = 0;
......
...@@ -44,7 +44,7 @@ class UBGraphicsRuler : public UBAbstractDrawRuler, public QGraphicsRectItem, pu ...@@ -44,7 +44,7 @@ class UBGraphicsRuler : public UBAbstractDrawRuler, public QGraphicsRectItem, pu
virtual void StartLine(const QPointF& position, qreal width); virtual void StartLine(const QPointF& position, qreal width);
virtual void DrawLine(const QPointF& position, qreal width); virtual void DrawLine(const QPointF& position, qreal width);
virtual void EndLine(); virtual void EndLine();
protected: protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment