Commit b6ae9969 authored by Claudio Valerio's avatar Claudio Valerio

Merge branch 'develop' into claudio-dev

parents edba346f 986c6eb0
No preview for this file type
...@@ -11,7 +11,7 @@ CONFIG += debug_and_release \ ...@@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 2 VERSION_MAJ = 2
VERSION_MIN = 00 VERSION_MIN = 00
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 05 VERSION_PATCH = 06
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "") VERSION = $$replace(VERSION, "\\.r", "")
......
body{ body{
margin-top:10px; margin: 0;
margin-left:10px;
font-family:Arial, Sans-serif; font-family:Arial, Sans-serif;
font-size:15px; font-size:15px;
color:#444; color:#444;
...@@ -104,7 +103,6 @@ body{ ...@@ -104,7 +103,6 @@ body{
} }
#embeded-content{ #embeded-content{
border:1px solid rgb(230,230,230);
position:relative; position:relative;
z-index:3; z-index:3;
float:left; float:left;
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
top:($("#embeded-content").children(":first").height()-35)/2 top:($("#embeded-content").children(":first").height()-35)/2
}); });
adaptWidgetSize(5, 13); adaptWidgetSize(3, 0);
return false; return false;
}; };
......
This diff is collapsed.
...@@ -94,6 +94,7 @@ public: ...@@ -94,6 +94,7 @@ public:
// UBFeature(); // UBFeature();
virtual ~UBFeature(); virtual ~UBFeature();
QString getName() const { return mName; } QString getName() const { return mName; }
QString getDisplayName() const {return mDisplayName;}
QImage getThumbnail() const {return mThumbnail;} QImage getThumbnail() const {return mThumbnail;}
QString getVirtualPath() const { return virtualDir; } QString getVirtualPath() const { return virtualDir; }
//QString getPath() const { return mPath; }; //QString getPath() const { return mPath; };
...@@ -112,11 +113,17 @@ public: ...@@ -112,11 +113,17 @@ public:
const QMap<QString,QString> & getMetadata() const { return metadata; } const QMap<QString,QString> & getMetadata() const { return metadata; }
void setMetadata( const QMap<QString,QString> &data ) { metadata = data; } void setMetadata( const QMap<QString,QString> &data ) { metadata = data; }
private:
QString getNameFromVirtualPath(const QString &pVirtPath);
QString getVirtualDirFromVirtualPath(const QString &pVirtPath);
private: private:
QString virtualDir; QString virtualDir;
QString virtualPath; QString virtualPath;
QImage mThumbnail; QImage mThumbnail;
QString mName; QString mName;
QString mDisplayName;
QUrl mPath; QUrl mPath;
UBFeatureElementType elementType; UBFeatureElementType elementType;
QMap<QString,QString> metadata; QMap<QString,QString> metadata;
...@@ -182,6 +189,19 @@ public: ...@@ -182,6 +189,19 @@ public:
void assignFeaturesListVeiw(UBFeaturesListView *pList); void assignFeaturesListVeiw(UBFeaturesListView *pList);
void assignPathListView(UBFeaturesListView *pList); void assignPathListView(UBFeaturesListView *pList);
public:
static const QString rootPath;
static const QString audiosPath;
static const QString moviesPath;
static const QString picturesPath;
static const QString appPath;
static const QString flashPath;
static const QString shapesPath;
static const QString interactPath;
static const QString trashPath;
static const QString favoritePath;
static const QString webSearchPath;
signals: signals:
void maxFilesCountEvaluated(int pLimit); void maxFilesCountEvaluated(int pLimit);
void scanStarted(); void scanStarted();
...@@ -235,17 +255,7 @@ private: ...@@ -235,17 +255,7 @@ private:
QUrl trashDirectoryPath; QUrl trashDirectoryPath;
QUrl mLibSearchDirectoryPath; QUrl mLibSearchDirectoryPath;
QString rootPath;
QString audiosPath;
QString moviesPath;
QString picturesPath;
QString appPath;
QString flashPath;
QString shapesPath;
QString interactPath;
QString trashPath;
QString favoritePath;
QString webSearchPath;
int mLastItemOffsetIndex; int mLastItemOffsetIndex;
UBFeature currentElement; UBFeature currentElement;
......
...@@ -233,7 +233,7 @@ void UBApplication::setupTranslator(QString forcedLanguage) ...@@ -233,7 +233,7 @@ void UBApplication::setupTranslator(QString forcedLanguage)
mApplicationTranslator = new QTranslator(this); mApplicationTranslator = new QTranslator(this);
mQtGuiTranslator = new QTranslator(this); mQtGuiTranslator = new QTranslator(this);
mApplicationTranslator->load(UBPlatformUtils::translationPath(QString("sankore_"),language)); mApplicationTranslator->load(UBPlatformUtils::translationPath(QString("sankore_"),language));
installTranslator(mApplicationTranslator); installTranslator(mApplicationTranslator);
......
...@@ -66,8 +66,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) ...@@ -66,8 +66,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
, mDesktopStylusTool(UBDrawingController::drawingController()->stylusTool()) , mDesktopStylusTool(UBDrawingController::drawingController()->stylusTool())
{ {
mTransparentDrawingView = new UBBoardView(UBApplication::boardController, static_cast<QWidget*>(NULL), true); // deleted in UBDesktopAnnotationController::destructor mTransparentDrawingView = new UBBoardView(UBApplication::boardController, static_cast<QWidget*>(0), true); // deleted in UBDesktopAnnotationController::destructor
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
......
...@@ -259,7 +259,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata ) ...@@ -259,7 +259,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
}break; }break;
} }
UBFeature feature( QString(), QImage(previewImageUrl), QString(), metadata["Url"], FEATURE_ITEM ); UBFeature feature( "/root", QImage(previewImageUrl), QString(), metadata["Url"], FEATURE_ITEM );
feature.setMetadata( metadata ); feature.setMetadata( metadata );
centralWidget->showElement(feature, UBFeaturesCentralWidget::FeaturePropertiesList); centralWidget->showElement(feature, UBFeaturesCentralWidget::FeaturePropertiesList);
...@@ -1080,7 +1080,7 @@ QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const ...@@ -1080,7 +1080,7 @@ QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const
return QVariant(); return QVariant();
if (role == Qt::DisplayRole) { if (role == Qt::DisplayRole) {
return featuresList->at(index.row()).getName(); return featuresList->at(index.row()).getDisplayName();
} }
else if (role == Qt::DecorationRole) { else if (role == Qt::DecorationRole) {
...@@ -1311,7 +1311,7 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina ...@@ -1311,7 +1311,7 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina
} }
} }
UBFeature newElement( destVirtualPath, sourceIcon, name, QUrl::fromLocalFile(destFullPath), sourceType ); UBFeature newElement( destVirtualPath + "/" + name, sourceIcon, name, QUrl::fromLocalFile(destFullPath), sourceType );
addItem(newElement); addItem(newElement);
if (deleteManualy) { if (deleteManualy) {
......
...@@ -685,6 +685,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons ...@@ -685,6 +685,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpSessionTitle = new UBTGAdaptableText(0, this, "UBTGSessionTitle"); mpSessionTitle = new UBTGAdaptableText(0, this, "UBTGSessionTitle");
mpSessionTitle->setPlaceHolderText(tr("Type session title here ...")); mpSessionTitle->setPlaceHolderText(tr("Type session title here ..."));
mpButtonTitleLayout->addWidget(mpSessionTitle); mpButtonTitleLayout->addWidget(mpSessionTitle);
connect(this, SIGNAL(resized()), mpSessionTitle, SLOT(onTextChanged()));
mpLayout->addLayout(mpButtonTitleLayout); mpLayout->addLayout(mpButtonTitleLayout);
...@@ -703,6 +704,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons ...@@ -703,6 +704,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpAuthors->setObjectName("UBTGZeroPageInputText"); mpAuthors->setObjectName("UBTGZeroPageInputText");
mpAuthors->setPlaceHolderText(tr("Type authors here ...")); mpAuthors->setPlaceHolderText(tr("Type authors here ..."));
mpLayout->addWidget(mpAuthors); mpLayout->addWidget(mpAuthors);
connect(this, SIGNAL(resized()), mpAuthors, SLOT(onTextChanged()));
mpCreationLabel = new QLabel(this); mpCreationLabel = new QLabel(this);
mpCreationLabel->setObjectName("UBTGZeroPageDateLabel"); mpCreationLabel->setObjectName("UBTGZeroPageDateLabel");
...@@ -727,6 +729,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons ...@@ -727,6 +729,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpObjectives->setObjectName("UBTGZeroPageInputText"); mpObjectives->setObjectName("UBTGZeroPageInputText");
mpObjectives->setPlaceHolderText(tr("Type objectives here...")); mpObjectives->setPlaceHolderText(tr("Type objectives here..."));
mpLayout->addWidget(mpObjectives); mpLayout->addWidget(mpObjectives);
connect(this, SIGNAL(resized()), mpObjectives, SLOT(onTextChanged()));
mpSeparatorObjectives = new QFrame(this); mpSeparatorObjectives = new QFrame(this);
mpSeparatorObjectives->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); mpSeparatorObjectives->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT);
...@@ -747,6 +750,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons ...@@ -747,6 +750,7 @@ UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, cons
mpKeywords = new UBTGAdaptableText(0, this); mpKeywords = new UBTGAdaptableText(0, this);
mpKeywords->setPlaceHolderText(tr("Type keywords here ...")); mpKeywords->setPlaceHolderText(tr("Type keywords here ..."));
mpLayout->addWidget(mpKeywords); mpLayout->addWidget(mpKeywords);
connect(this, SIGNAL(resized()), mpKeywords, SLOT(onTextChanged()));
mpSchoolLevelItemLabel = new QLabel(this); mpSchoolLevelItemLabel = new QLabel(this);
mpSchoolLevelItemLabel->setObjectName("UBTGZeroPageItemLabel"); mpSchoolLevelItemLabel->setObjectName("UBTGZeroPageItemLabel");
...@@ -1122,6 +1126,12 @@ bool UBTeacherGuidePageZeroWidget::isModified() ...@@ -1122,6 +1126,12 @@ bool UBTeacherGuidePageZeroWidget::isModified()
return result; return result;
} }
void UBTeacherGuidePageZeroWidget::resizeEvent(QResizeEvent* ev){
emit resized();
QWidget::resizeEvent(ev);
}
/*************************************************************************** /***************************************************************************
* class UBTeacherGuideWidget * * class UBTeacherGuideWidget *
***************************************************************************/ ***************************************************************************/
...@@ -1238,3 +1248,4 @@ bool UBTeacherGuideWidget::isModified() ...@@ -1238,3 +1248,4 @@ bool UBTeacherGuideWidget::isModified()
else else
return mpEditionWidget->isModified(); return mpEditionWidget->isModified();
} }
...@@ -136,11 +136,16 @@ public: ...@@ -136,11 +136,16 @@ public:
QVector<tUBGEElementNode*> getData(); QVector<tUBGEElementNode*> getData();
bool isModified(); bool isModified();
signals:
void resized();
public slots: public slots:
void onActiveSceneChanged(); void onActiveSceneChanged();
void switchToMode(tUBTGZeroPageMode mode = tUBTGZeroPageMode_EDITION); void switchToMode(tUBTGZeroPageMode mode = tUBTGZeroPageMode_EDITION);
protected:
void resizeEvent(QResizeEvent* ev);
private: private:
void fillComboBoxes(); void fillComboBoxes();
void loadData(); void loadData();
......
...@@ -174,6 +174,7 @@ void UBTGAdaptableText::showEvent(QShowEvent* e) ...@@ -174,6 +174,7 @@ void UBTGAdaptableText::showEvent(QShowEvent* e)
if(!mIsUpdatingSize && mHasPlaceHolder && toPlainText().isEmpty()) if(!mIsUpdatingSize && mHasPlaceHolder && toPlainText().isEmpty())
setPlainText(mPlaceHolderText); setPlainText(mPlaceHolderText);
else else
// If the teacherguide is collapsed, don't updated the size. Or set the size as the expanded size
onTextChanged(); onTextChanged();
} }
...@@ -188,9 +189,12 @@ QString UBTGAdaptableText::text() ...@@ -188,9 +189,12 @@ QString UBTGAdaptableText::text()
void UBTGAdaptableText::onTextChanged() void UBTGAdaptableText::onTextChanged()
{ {
qDebug() << ">> onTextChanged CALLED!";
qreal documentSize = document()->size().height(); qreal documentSize = document()->size().height();
if(height() == documentSize + mBottomMargin) qDebug() << ">> documentSize: " << documentSize << ", height: " << height();
return; if(height() == documentSize + mBottomMargin){
return;
}
mIsUpdatingSize = true; mIsUpdatingSize = true;
...@@ -208,6 +212,7 @@ void UBTGAdaptableText::onTextChanged() ...@@ -208,6 +212,7 @@ void UBTGAdaptableText::onTextChanged()
setFocus(); setFocus();
} }
mIsUpdatingSize = false; mIsUpdatingSize = false;
} }
void UBTGAdaptableText::setInitialText(const QString& text) void UBTGAdaptableText::setInitialText(const QString& text)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment