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

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
commit c5f6a9cfee
  1. 16
      src/desktop/UBDesktopAnnotationController.cpp
  2. 1
      src/desktop/UBDesktopAnnotationController.h
  3. 10
      src/tools/UBGraphicsTriangle.cpp

@ -95,8 +95,14 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
if (UBPlatformUtils::hasVirtualKeyboard()) if (UBPlatformUtils::hasVirtualKeyboard())
{ {
#ifdef Q_WS_X11
mKeyboardPalette = UBKeyboardPalette::create(0);
connect(mTransparentDrawingView, SIGNAL(hidden()), mKeyboardPalette, SLOT(hide()));
connect(mTransparentDrawingView, SIGNAL(shown()), this, SLOT(showKeyboard()));
#else
mKeyboardPalette = UBKeyboardPalette::create(mTransparentDrawingView); mKeyboardPalette = UBKeyboardPalette::create(mTransparentDrawingView);
mKeyboardPalette->setParent(mTransparentDrawingView); mKeyboardPalette->setParent(mTransparentDrawingView);
#endif
connect(mKeyboardPalette, SIGNAL(keyboardActivated(bool)), mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool))); connect(mKeyboardPalette, SIGNAL(keyboardActivated(bool)), mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool)));
connect(mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask())); connect(mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask()));
} }
@ -160,6 +166,11 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
void UBDesktopAnnotationController::showKeyboard(bool show) void UBDesktopAnnotationController::showKeyboard(bool show)
{ {
#ifdef Q_WS_X11
if (!mTransparentDrawingView->isVisible())
return;
#endif
if(mKeyboardPalette) if(mKeyboardPalette)
{ {
if(show) if(show)
@ -170,6 +181,11 @@ void UBDesktopAnnotationController::showKeyboard(bool show)
} }
} }
void UBDesktopAnnotationController::showKeyboard()
{
if (UBApplication::mainWindow->actionVirtualKeyboard->isChecked())
mKeyboardPalette->show();
}
UBDesktopAnnotationController::~UBDesktopAnnotationController() UBDesktopAnnotationController::~UBDesktopAnnotationController()
{ {

@ -71,6 +71,7 @@ class UBDesktopAnnotationController : public QObject
void updateBackground(); void updateBackground();
void showKeyboard(bool show); void showKeyboard(bool show);
void showKeyboard(); //X11 virtual keyboard working only needed
signals: signals:
/** /**

@ -802,6 +802,7 @@ void UBGraphicsTriangle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
mVFlipSvgItem->setVisible(false); mVFlipSvgItem->setVisible(false);
mHFlipSvgItem->setVisible(false); mHFlipSvgItem->setVisible(false);
mRotateSvgItem->setVisible(false); mRotateSvgItem->setVisible(false);
UBDrawingController::drawingController()->mActiveRuler = NULL;
event->accept(); event->accept();
update(); update();
} }
@ -824,21 +825,20 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
else if (closeButtonRect().contains(event->pos())) else if (closeButtonRect().contains(event->pos()))
setCursor(closeCursor()); setCursor(closeCursor());
else if (hFlipRect().contains(event->pos()) else if (hFlipRect().contains(event->pos())
|| vFlipRect().contains(event->pos())) || vFlipRect().contains(event->pos()))
setCursor(flipCursor()); setCursor(flipCursor());
else if (rotateRect().contains(event->pos())) else if (rotateRect().contains(event->pos()))
setCursor(rotateCursor()); setCursor(rotateCursor());
else else
setCursor(moveCursor()); setCursor(moveCursor());
event->accept();
} else if (UBDrawingController::drawingController()->isDrawingTool()) {
event->accept(); event->accept();
} }
} }
void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width)
{ {
qDebug() << "morientation" << mOrientation;
//qDebug() << "triangle rect()" << rect();
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
qreal y; qreal y;

Loading…
Cancel
Save