Merge branch 'develop' into Ilia_dev

preferencesAboutTextFull
Ilia Ryabokon 12 years ago
commit a55b01c962
  1. BIN
      JournalDesModifications.pdf
  2. BIN
      ReleaseNotes.pdf
  3. 11
      src/gui/UBTeacherGuideWidget.cpp
  4. 5
      src/gui/UBTeacherGuideWidget.h
  5. 9
      src/gui/UBTeacherGuideWidgetsTools.cpp
  6. 3
      src/web/UBWebController.cpp
  7. 24
      src/web/browser/WBBrowserWindow.cpp

Binary file not shown.

Binary file not shown.

@ -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
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
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
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()
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()
else else
return mpEditionWidget->isModified(); return mpEditionWidget->isModified();
} }

@ -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)
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()
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()
setFocus(); setFocus();
} }
mIsUpdatingSize = false; mIsUpdatingSize = false;
} }
void UBTGAdaptableText::setInitialText(const QString& text) void UBTGAdaptableText::setInitialText(const QString& text)
{ {

@ -733,6 +733,7 @@ bool UBWebController::isEduMedia(const QUrl& pUrl)
void UBWebController::loadUrl(const QUrl& url) void UBWebController::loadUrl(const QUrl& url)
{ {
bool webBrowserAlreadyInstanciated = dynamic_cast<WBBrowserWindow*>(mStackedWidget->widget(WebBrowser)) != NULL;
UBApplication::applicationController->showInternet(); UBApplication::applicationController->showInternet();
if (UBSettings::settings()->webUseExternalBrowser->get().toBool()) if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{ {
@ -740,8 +741,6 @@ void UBWebController::loadUrl(const QUrl& url)
} }
else else
{ {
bool webBrowserAlreadyInstanciated = mStackedWidget->widget(WebBrowser) != NULL;
if (!webBrowserAlreadyInstanciated) { if (!webBrowserAlreadyInstanciated) {
(*mCurrentWebBrowser)->loadUrl(url); (*mCurrentWebBrowser)->loadUrl(url);
} }

@ -270,28 +270,6 @@ void WBBrowserWindow::setupToolBarForTutorial()
if (tb && tb->menu()) if (tb && tb->menu())
tb->setMenu(NULL); tb->setMenu(NULL);
} }
// mTabWidget->addWebAction(mUniboardMainWindow->actionWebReload, QWebPage::Reload);
// mTabWidget->addWebAction(mUniboardMainWindow->actionStopLoading, QWebPage::Stop);
// mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mTabWidget->lineEditStack());
// mSearchToolBar = new WBToolbarSearch(mWebToolBar);
// mSearchAction = mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mSearchToolBar);
// connect(mSearchToolBar, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&)));
// mChaseWidget = new WBChaseWidget(this);
// mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mChaseWidget);
// mWebToolBar->insertSeparator(mUniboardMainWindow->actionWebBigger);
// connect(mUniboardMainWindow->actionHome, SIGNAL(triggered()), this , SLOT(slotHome()));
// connect(mUniboardMainWindow->actionBookmarks, SIGNAL(triggered()), this , SLOT(bookmarks()));
// connect(mUniboardMainWindow->actionAddBookmark, SIGNAL(triggered()), this , SLOT(addBookmark()));
// connect(mUniboardMainWindow->actionWebBigger, SIGNAL(triggered()), this , SLOT(slotViewZoomIn()));
// connect(mUniboardMainWindow->actionWebSmaller, SIGNAL(triggered()), this , SLOT(slotViewZoomOut()));
mWebToolBar->show(); mWebToolBar->show();
} }
@ -662,4 +640,4 @@ void WBBrowserWindow::openActionUrl(QAction *action)
history->goToItem(history->backItems(-1*offset).first()); history->goToItem(history->backItems(-1*offset).first());
else if (offset > 0) else if (offset > 0)
history->goToItem(history->forwardItems(history->count() - offset + 1).back()); history->goToItem(history->forwardItems(history->count() - offset + 1).back());
} }

Loading…
Cancel
Save