Openboard crosslinux hack detecting storage location

preferencesAboutTextFull
Ilia Ryabokon 11 years ago
parent e9f6f397e4
commit 01bb806677
  1. 2
      src/core/UBSettings.cpp
  2. 12
      src/domain/UBGraphicsTextItemDelegate.cpp
  3. 5
      src/domain/UBGraphicsTextItemDelegate.h

@ -790,6 +790,8 @@ QString UBSettings::userDataDirectory()
qDebug() << "organization name" << UBSettings::organizationName();
qDebug() << "application" << qApp;
dataDirPath.replace(UBSettings::organizationName() + "/", "");
dataDirPath.truncate(dataDirPath.count() - 1);
dataDirPath.append("OpenBoard");
}
return dataDirPath;
}

@ -48,6 +48,10 @@ const int UBGraphicsTextItemDelegate::sMinPointSize = 8;
UBGraphicsTextItemDelegate::UBGraphicsTextItemDelegate(UBGraphicsTextItem* pDelegated, QObject *)
: UBGraphicsItemDelegate(pDelegated,0, GF_COMMON | GF_REVOLVABLE | GF_TOOLBAR_USED)
, mLastFontPixelSize(-1)
, mAlignLeftButton(0)
, mAlignCenterButton(0)
, mAlignRightButton(0)
, mAlighMixed(0)
, delta(5)
{
delegated()->setData(UBGraphicsItemData::ItemEditable, QVariant(true));
@ -108,13 +112,19 @@ void UBGraphicsTextItemDelegate::buildButtons()
mDecreaseSizeButton = new DelegateButton(":/images/minus.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
mIncreaseSizeButton = new DelegateButton(":/images/plus.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
//Alignment buttons family
mAlignLeftButton = new DelegateButton(":/images/plus.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
mAlignCenterButton = new DelegateButton(":/images/pause.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
mAlignRightButton = new DelegateButton(":/images/minus.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
mAlighMixed = new DelegateButton(":/images/reload.svg", mDelegated, mToolBarItem, Qt::TitleBarArea);
connect(mFontButton, SIGNAL(clicked(bool)), this, SLOT(pickFont()));
connect(mColorButton, SIGNAL(clicked(bool)), this, SLOT(pickColor()));
connect(mDecreaseSizeButton, SIGNAL(clicked(bool)), this, SLOT(decreaseSize()));
connect(mIncreaseSizeButton, SIGNAL(clicked(bool)), this, SLOT(increaseSize()));
QList<QGraphicsItem*> itemsOnToolBar;
itemsOnToolBar << mFontButton << mColorButton << mDecreaseSizeButton << mIncreaseSizeButton;
itemsOnToolBar << mFontButton << mColorButton << mDecreaseSizeButton << mIncreaseSizeButton << mFontButton;
mToolBarItem->setItemsOnToolBar(itemsOnToolBar);
mToolBarItem->setShifting(true);
mToolBarItem->setVisibleOnBoard(true);

@ -76,6 +76,11 @@ class UBGraphicsTextItemDelegate : public UBGraphicsItemDelegate
DelegateButton* mDecreaseSizeButton;
DelegateButton* mIncreaseSizeButton;
DelegateButton* mAlignLeftButton;
DelegateButton* mAlignCenterButton;
DelegateButton* mAlignRightButton;
DelegateButton* mAlighMixed;
int mLastFontPixelSize;
static const int sMinPixelSize;

Loading…
Cancel
Save