fixed issue 667

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 54214ed957
commit a3f2b08b7d
  1. 1
      src/gui/UBActionPalette.cpp
  2. 1
      src/gui/UBActionPalette.h
  3. 41
      src/gui/UBTeacherGuideWidget.cpp
  4. 5
      src/gui/UBTeacherGuideWidget.h

@ -231,7 +231,6 @@ void UBActionPalette::mouseReleaseEvent(QMouseEvent * event)
void UBActionPalette::actionChanged()
{
emit itemOnActionPaletteChanged();
for(int i = 0; i < mActions.length() && i < mButtons.length(); i++)
{
mButtons.at(i)->setVisible(mActions.at(i)->isVisible());

@ -61,7 +61,6 @@ class UBActionPalette : public UBFloatingPalette
void closed();
void buttonGroupClicked(int id);
void customMouseReleased();
void itemOnActionPaletteChanged();
protected:
virtual void paintEvent(QPaintEvent *event);

@ -1100,6 +1100,7 @@ UBTeacherGuideWidget::UBTeacherGuideWidget(QWidget* parent, const char* name) :
, mpPageZeroWidget(NULL)
, mpEditionWidget(NULL)
, mpPresentationWidget(NULL)
, mKeyboardActionFired(false)
{
setObjectName(name);
if (UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) {
@ -1113,11 +1114,9 @@ UBTeacherGuideWidget::UBTeacherGuideWidget(QWidget* parent, const char* name) :
addWidget(mpPresentationWidget);
}
connect(UBApplication::boardController->controlView(),
SIGNAL(clickOnBoard()), this, SLOT(showPresentationMode()));
connect(UBApplication::boardController->controlView(), SIGNAL(clickOnBoard()), this, SLOT(showPresentationMode()));
connectToStylusPalette();
connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this,
SLOT(onActiveSceneChanged()));
connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(onActiveSceneChanged()));
}
UBTeacherGuideWidget::~UBTeacherGuideWidget()
@ -1138,12 +1137,38 @@ void UBTeacherGuideWidget::onActiveSceneChanged()
}
#include "core/UBApplication.h"
#include "gui/UBMainWindow.h"
void UBTeacherGuideWidget::onTriggeredAction(bool checked)
{
Q_UNUSED(checked);
if(!mKeyboardActionFired)
showPresentationMode();
mKeyboardActionFired=false;
}
void UBTeacherGuideWidget::onTriggeredKeyboardAction(bool checked)
{
Q_UNUSED(checked);
mKeyboardActionFired = true;
}
void UBTeacherGuideWidget::connectToStylusPalette()
{
if (UBApplication::boardController->paletteManager())
connect( UBApplication::boardController->paletteManager()->stylusPalette(), SIGNAL(itemOnActionPaletteChanged()), this, SLOT(showPresentationMode()));
else
QTimer::singleShot(100, this, SLOT(connectToStylusPalette()));
connect(UBApplication::mainWindow->actionPen, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionEraser, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionMarker, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionPointer, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionPlay, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionZoomIn, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionZoomOut, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionCapture, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionHand, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionLine, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionText, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(onTriggeredKeyboardAction(bool)));
}
void UBTeacherGuideWidget::showPresentationMode()

@ -214,6 +214,11 @@ private:
UBTeacherGuideEditionWidget* mpEditionWidget;
UBTeacherGuidePresentationWidget* mpPresentationWidget;
QVector<tUBGEElementNode*>mCurrentData;
bool mKeyboardActionFired;
private slots:
void onTriggeredAction(bool checked);
void onTriggeredKeyboardAction(bool checked);
};
#endif // UBTEACHERGUIDEWIDGET_H

Loading…
Cancel
Save