Handling the multiscreen option

preferencesAboutTextFull
Didier Clerc 12 years ago
parent 20d6064f68
commit 7220a63034
  1. 10
      src/core/UBApplication.cpp
  2. 2
      src/core/UBApplication.h
  3. 1
      src/core/UBPreferencesController.cpp

@ -55,6 +55,7 @@
#include "frameworks/UBCryptoUtils.h"
#include "tools/UBToolsManager.h"
#include "UBDisplayManager.h"
#include "core/memcheck.h"
QPointer<QUndoStack> UBApplication::undoStack;
@ -378,9 +379,18 @@ int UBApplication::exec(const QString& pFileToImport)
else
applicationController->showBoard();
onScreenCountChanged(1);
connect(desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(onScreenCountChanged(int)));
return QApplication::exec();
}
void UBApplication::onScreenCountChanged(int newCount)
{
Q_UNUSED(newCount);
UBDisplayManager displayManager;
mainWindow->actionMultiScreen->setEnabled(displayManager.numScreens() > 1);
}
void UBApplication::importUniboardFiles()
{
mUniboardSankoreTransition = new UniboardSankoreTransition();

@ -117,6 +117,8 @@ class UBApplication : public QtSingleApplication
#endif
void importUniboardFiles();
void onScreenCountChanged(int newCount);
private:
void updateProtoActionsState();
void setupTranslators(QStringList args);

@ -88,6 +88,7 @@ UBPreferencesController::~UBPreferencesController()
void UBPreferencesController::adjustScreens(int screen)
{
Q_UNUSED(screen);
UBDisplayManager displayManager;
mPreferencesUI->multiDisplayGroupBox->setEnabled(displayManager.numScreens() > 1);
}

Loading…
Cancel
Save