Launch Sankore on desktop mode
preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
parent 48bce1d8b1
commit e304b03fc2
  1. 2174
      resources/forms/preferences.ui
  2. 14
      src/board/UBBoardController.cpp
  3. 3
      src/core/UBApplication.cpp
  4. 5
      src/core/UBApplicationController.cpp
  5. 4
      src/core/UBDisplayManager.cpp
  6. 2
      src/core/UBDisplayManager.h
  7. 10
      src/core/UBPreferencesController.cpp
  8. 2
      src/core/UBSettings.cpp
  9. 2
      src/core/UBSettings.h

File diff suppressed because it is too large Load Diff

@ -365,7 +365,7 @@ void UBBoardController::connectToolbar()
void UBBoardController::startScript() void UBBoardController::startScript()
{ {
freezeW3CWidgets(true); freezeW3CWidgets(false);
} }
void UBBoardController::stopScript() void UBBoardController::stopScript()
@ -453,6 +453,7 @@ void UBBoardController::addScene()
setActiveDocumentScene(mActiveDocument, mActiveSceneIndex + 1); setActiveDocumentScene(mActiveDocument, mActiveSceneIndex + 1);
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
centerOn();
} }
@ -2162,13 +2163,14 @@ void UBBoardController::freezeW3CWidget(QGraphicsItem *item, bool freeze)
{ {
if(item->type() == UBGraphicsW3CWidgetItem::Type) if(item->type() == UBGraphicsW3CWidgetItem::Type)
{ {
QString scriptString;
if (freeze)
scriptString = "setfreezed(true);";
else
scriptString = "setfreezed(false);";
UBGraphicsW3CWidgetItem* item_casted = dynamic_cast<UBGraphicsW3CWidgetItem*>(item); UBGraphicsW3CWidgetItem* item_casted = dynamic_cast<UBGraphicsW3CWidgetItem*>(item);
if (0 == item_casted) if (0 == item_casted)
return; return;
item_casted->widgetWebView()->page()->mainFrame()->evaluateJavaScript(scriptString);
if (freeze) {
item_casted->widgetWebView()->page()->mainFrame()->setContent(UBW3CWidget::freezedWidgetPage().toAscii());
} else
item_casted->widgetWebView()->loadMainHtml();
} }
} }

@ -310,6 +310,9 @@ int UBApplication::exec(const QString& pFileToImport)
static AEEventHandlerUPP ub_proc_ae_handlerUPP = AEEventHandlerUPP(ub_appleEventProcessor); static AEEventHandlerUPP ub_proc_ae_handlerUPP = AEEventHandlerUPP(ub_appleEventProcessor);
AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, ub_proc_ae_handlerUPP, SRefCon(UBApplication::applicationController), true); AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, ub_proc_ae_handlerUPP, SRefCon(UBApplication::applicationController), true);
#endif #endif
if (UBSettings::settings()->appStartMode->get() == "Desktop")
applicationController->showDesktop();
else applicationController->showBoard();
if (UBSettings::settings()->appIsInSoftwareUpdateProcess->get().toBool()) if (UBSettings::settings()->appIsInSoftwareUpdateProcess->get().toBool())

@ -137,7 +137,7 @@ void UBApplicationController::initViewState(int horizontalPosition, int vertical
void UBApplicationController::initScreenLayout() void UBApplicationController::initScreenLayout()
{ {
mDisplayManager->setAsControl(mMainWindow); mDisplayManager->setAsControl(mMainWindow, true);
mDisplayManager->setAsDisplay(mDisplayView); mDisplayManager->setAsDisplay(mDisplayView);
mDisplayManager->setAsPreviousDisplays(mPreviousViews); mDisplayManager->setAsPreviousDisplays(mPreviousViews);
@ -352,7 +352,8 @@ void UBApplicationController::showBoard()
UBPlatformUtils::setDesktopMode(false); UBPlatformUtils::setDesktopMode(false);
mUninoteController->hideWindow(); mUninoteController->hideWindow();
mMainWindow->show();
mDisplayManager->adjustScreens(0);
emit mainModeChanged(Board); emit mainModeChanged(Board);
} }

@ -118,13 +118,15 @@ int UBDisplayManager::numPreviousViews()
} }
void UBDisplayManager::setAsControl(QWidget* pControlWidget ) void UBDisplayManager::setAsControl(QWidget* pControlWidget, bool init)
{ {
if(hasControl() && pControlWidget && (pControlWidget != mControlWidget)) if(hasControl() && pControlWidget && (pControlWidget != mControlWidget))
{ {
mControlWidget = pControlWidget; mControlWidget = pControlWidget;
mControlWidget->hide(); mControlWidget->hide();
mControlWidget->setGeometry(mDesktop->screenGeometry(mControlScreenIndex)); mControlWidget->setGeometry(mDesktop->screenGeometry(mControlScreenIndex));
if (!init)
mControlWidget->showFullScreen(); mControlWidget->showFullScreen();
// !!!! Should be included into Windows after QT recompilation // !!!! Should be included into Windows after QT recompilation
#ifdef Q_WS_MAC #ifdef Q_WS_MAC

@ -33,7 +33,7 @@ class UBDisplayManager : public QObject
int numPreviousViews(); int numPreviousViews();
void setAsControl(QWidget* pControlWidget); void setAsControl(QWidget* pControlWidget, bool init = false);
void setAsDisplay(QWidget* pDisplayWidget); void setAsDisplay(QWidget* pDisplayWidget);

@ -112,6 +112,7 @@ void UBPreferencesController::wire()
connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &))); connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &)));
connect(mPreferencesUI->startModeComboBox, SIGNAL(currentIndexChanged(const QString &)), settings->appStartMode, SLOT(setString(const QString &)));
connect(mPreferencesUI->useExternalBrowserCheckBox, SIGNAL(clicked(bool)), settings->webUseExternalBrowser, SLOT(setBool(bool))); connect(mPreferencesUI->useExternalBrowserCheckBox, SIGNAL(clicked(bool)), settings->webUseExternalBrowser, SLOT(setBool(bool)));
@ -180,6 +181,14 @@ void UBPreferencesController::init()
break; break;
} }
for(int i=0; i<mPreferencesUI->startModeComboBox->count(); i++)
if (mPreferencesUI->startModeComboBox->itemText(i) ==
settings->appStartMode->get().toString())
{
mPreferencesUI->startModeComboBox->setCurrentIndex(i);
break;
}
mPreferencesUI->useExternalBrowserCheckBox->setChecked(settings->webUseExternalBrowser->get().toBool()); mPreferencesUI->useExternalBrowserCheckBox->setChecked(settings->webUseExternalBrowser->get().toBool());
mPreferencesUI->displayBrowserPageCheckBox->setChecked(settings->webShowPageImmediatelyOnMirroredScreen->get().toBool()); mPreferencesUI->displayBrowserPageCheckBox->setChecked(settings->webShowPageImmediatelyOnMirroredScreen->get().toBool());
mPreferencesUI->webHomePage->setText(settings->webHomePage->get().toString()); mPreferencesUI->webHomePage->setText(settings->webHomePage->get().toString());
@ -293,6 +302,7 @@ void UBPreferencesController::defaultSettings()
mPreferencesUI->toolbarDisplayTextCheckBox->setChecked(defaultValue); mPreferencesUI->toolbarDisplayTextCheckBox->setChecked(defaultValue);
mPreferencesUI->verticalChoice->setChecked(settings->appToolBarOrientationVertical->reset().toBool()); mPreferencesUI->verticalChoice->setChecked(settings->appToolBarOrientationVertical->reset().toBool());
mPreferencesUI->horizontalChoice->setChecked(!settings->appToolBarOrientationVertical->reset().toBool()); mPreferencesUI->horizontalChoice->setChecked(!settings->appToolBarOrientationVertical->reset().toBool());
mPreferencesUI->startModeComboBox->setCurrentIndex(0);
} }
else if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->penTab) else if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->penTab)
{ {

@ -212,6 +212,8 @@ void UBSettings::init()
appLastSessionPageIndex = new UBSetting(this, "App", "LastSessionPageIndex", 0); appLastSessionPageIndex = new UBSetting(this, "App", "LastSessionPageIndex", 0);
appUseMultiscreen = new UBSetting(this, "App", "UseMusliscreenMode", true); appUseMultiscreen = new UBSetting(this, "App", "UseMusliscreenMode", true);
appStartMode = new UBSetting(this, "App", "StartMode", "");
boardPenFineWidth = new UBSetting(this, "Board", "PenFineWidth", 1.5); boardPenFineWidth = new UBSetting(this, "Board", "PenFineWidth", 1.5);
boardPenMediumWidth = new UBSetting(this, "Board", "PenMediumWidth", 3.0); boardPenMediumWidth = new UBSetting(this, "Board", "PenMediumWidth", 3.0);
boardPenStrongWidth = new UBSetting(this, "Board", "PenStrongWidth", 8.0); boardPenStrongWidth = new UBSetting(this, "Board", "PenStrongWidth", 8.0);

@ -229,6 +229,8 @@ class UBSettings : public QObject
UBSetting* boardKeyboardPaletteKeyBtnSize; UBSetting* boardKeyboardPaletteKeyBtnSize;
UBSetting* appStartMode;
UBColorListSetting* boardPenLightBackgroundColors; UBColorListSetting* boardPenLightBackgroundColors;
UBColorListSetting* boardPenLightBackgroundSelectedColors; UBColorListSetting* boardPenLightBackgroundSelectedColors;

Loading…
Cancel
Save