Managed enable state of items regarding screen number

preferencesAboutTextFull
Didier Clerc 12 years ago
parent 17c42091f2
commit 20d6064f68
  1. 7
      resources/etc/Uniboard.css
  2. 8
      src/core/UBPreferencesController.cpp
  3. 5
      src/core/UBPreferencesController.h

@ -1,6 +1,11 @@
*
QWidget:enabled
{
color: #3F3F3F;
}
QWidget:disabled
{
color: #AAAAAA;
}
QTextEdit,

@ -64,9 +64,12 @@ UBPreferencesController::UBPreferencesController(QWidget *parent)
, mPenProperties(0)
, mMarkerProperties(0)
{
mDesktop = qApp->desktop();
mPreferencesWindow = new UBPreferencesDialog(this,parent, Qt::Dialog);
mPreferencesUI = new Ui::preferencesDialog(); // deleted in
mPreferencesUI->setupUi(mPreferencesWindow);
adjustScreens(1);
connect(mDesktop, SIGNAL(screenCountChanged(int)), this, SLOT(adjustScreens(int)));
wire();
}
@ -83,6 +86,11 @@ UBPreferencesController::~UBPreferencesController()
delete mMarkerProperties;
}
void UBPreferencesController::adjustScreens(int screen)
{
UBDisplayManager displayManager;
mPreferencesUI->multiDisplayGroupBox->setEnabled(displayManager.numScreens() > 1);
}
void UBPreferencesController::show()
{

@ -85,12 +85,15 @@ class UBPreferencesController : public QObject
void onCommunityPasswordChanged();
void onCommunityPersistenceChanged();
private:
private slots:
void adjustScreens(int screen);
private:
static qreal sSliderRatio;
static qreal sMinPenWidth;
static qreal sMaxPenWidth;
void persistanceCheckboxUpdate();
QDesktopWidget* mDesktop;
};

Loading…
Cancel
Save