r15297 by jghali - #9225: improvements to the fix
scribus-commit
scribus-commit at lists.scribus.net
Thu Jul 1 20:50:27 CEST 2010
Revision: 15297
Author: jghali
Date: 2010-07-01T18:43:06.827513Z
Commit message: #9225: improvements to the fix
Changeset:
M /branches/Version135/Scribus/scribus/vruler.cpp
M /branches/Version135/Scribus/scribus/hruler.cpp
M /branches/Version135/Scribus/scribus/vruler.h
M /branches/Version135/Scribus/scribus/hruler.h
Diffs:
Index: scribus/vruler.cpp
===================================================================
--- scribus/vruler.cpp (revision 15296)
+++ scribus/vruler.cpp (revision 15297)
@@ -61,6 +61,7 @@
oldMark = 0;
Mpressed = false;
drawMark = false;
+ setMouseTracking(true);
rulerGesture = new RulerGesture(currView, RulerGesture::VERTICAL);
unitChange();
}
@@ -93,8 +94,11 @@
else
{
QCursor* cursor = qApp->overrideCursor();
- if (cursor && (cursor->shape() != Qt::ArrowCursor))
+ Qt::CursorShape shape = cursor ? cursor->shape() : Qt::ArrowCursor;
+ if ((shape == Qt::SplitHCursor) || (shape == Qt::SplitVCursor))
+ {
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+ }
}
}
Index: scribus/hruler.cpp
===================================================================
--- scribus/hruler.cpp (revision 15296)
+++ scribus/hruler.cpp (revision 15297)
@@ -452,8 +452,11 @@
else
{
QCursor* cursor = qApp->overrideCursor();
- if (cursor && (cursor->shape() != Qt::ArrowCursor))
+ Qt::CursorShape shape = cursor ? cursor->shape() : Qt::ArrowCursor;
+ if ((shape == Qt::SplitHCursor) || (shape == Qt::SplitVCursor))
+ {
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+ }
}
}
}
Index: scribus/hruler.h
===================================================================
--- scribus/hruler.h (revision 15296)
+++ scribus/hruler.h (revision 15297)
@@ -71,11 +71,12 @@
void setItem(PageItem * item);
private:
- void paintEvent(QPaintEvent *e);
+ virtual void paintEvent(QPaintEvent *e);
+ virtual void mousePressEvent(QMouseEvent *m);
+ virtual void mouseReleaseEvent(QMouseEvent *);
+ virtual void mouseMoveEvent(QMouseEvent *m);
+
void drawNumber(QString num, int startx, int starty, QPainter & p);
- void mousePressEvent(QMouseEvent *m);
- void mouseReleaseEvent(QMouseEvent *);
- void mouseMoveEvent(QMouseEvent *m);
void UpdateTabList();
int Markp;
Index: scribus/vruler.h
===================================================================
--- scribus/vruler.h (revision 15296)
+++ scribus/vruler.h (revision 15297)
@@ -44,17 +44,21 @@
public:
Vruler(ScribusView *pa, ScribusDoc *doc);
~Vruler() {};
- void paintEvent(QPaintEvent *e);
- void mousePressEvent(QMouseEvent *m);
- void mouseReleaseEvent(QMouseEvent *m);
- void mouseMoveEvent(QMouseEvent *m);
- void drawNumber(QString num, int starty, QPainter *p);
+
double offs;
bool repainted;
int oldMark;
bool Mpressed;
double ruleSpacing();
+
private: // Private attributes
+ virtual void paintEvent(QPaintEvent *e);
+ virtual void mousePressEvent(QMouseEvent *m);
+ virtual void mouseReleaseEvent(QMouseEvent *m);
+ virtual void mouseMoveEvent(QMouseEvent *m);
+
+ void drawNumber(QString num, int starty, QPainter *p);
+
/** Zeichensatz des Lineals */
ScribusDoc *currDoc;
ScribusView *currView;
More information about the scribus-commit
mailing list