Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit 0b587e6861
  1. 2
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 5
      src/board/UBBoardPaletteManager.cpp
  3. 5
      src/domain/UBGraphicsMediaItem.cpp
  4. 24
      src/gui/UBTeacherBarPreviewWidget.cpp
  5. 2
      src/gui/UBTeacherBarPreviewWidget.h
  6. 5
      src/gui/UBTeacherBarWidget.cpp

@ -1854,7 +1854,7 @@ UBGraphicsAudioItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::audioItemFromSvg()
href = mDocumentPath + "/" + href.right(href.length() - indexOfAudioDirectory); href = mDocumentPath + "/" + href.right(href.length() - indexOfAudioDirectory);
} }
UBGraphicsAudioItem* audioItem = new UBGraphicsAudioItem(href); UBGraphicsAudioItem* audioItem = new UBGraphicsAudioItem(QUrl::fromLocalFile(href));
graphicsItemFromSvg(audioItem); graphicsItemFromSvg(audioItem);
QStringRef ubPos = mXmlReader.attributes().value(mNamespaceUri, "position"); QStringRef ubPos = mXmlReader.attributes().value(mNamespaceUri, "position");

@ -112,11 +112,6 @@ UBBoardPaletteManager::~UBBoardPaletteManager()
delete mpLibWidget; delete mpLibWidget;
mpLibWidget = NULL; mpLibWidget = NULL;
} }
if(NULL != mpTeacherBarWidget)
{
delete mpTeacherBarWidget;
mpTeacherBarWidget = NULL;
}
if(NULL != mpCachePropWidget) if(NULL != mpCachePropWidget)
{ {
delete mpCachePropWidget; delete mpCachePropWidget;

@ -86,12 +86,13 @@ QVariant UBGraphicsMediaItem::itemChange(GraphicsItemChange change, const QVaria
void UBGraphicsMediaItem::clearSource() void UBGraphicsMediaItem::clearSource()
{ {
QString path = mediaFileUrl().path(); QString path = mediaFileUrl().toLocalFile();
//if path is absolute clean duplicated path string //if path is absolute clean duplicated path string
if (!path.contains(UBApplication::boardController->activeDocument()->persistencePath())) if (!path.contains(UBApplication::boardController->activeDocument()->persistencePath()))
path = UBApplication::boardController->activeDocument()->persistencePath() + "/" + path; path = UBApplication::boardController->activeDocument()->persistencePath() + "/" + path;
UBFileSystemUtils::deleteFile(path); if (!UBFileSystemUtils::deleteFile(path))
qDebug() << "cannot delete file: " << path;
} }
void UBGraphicsMediaItem::toggleMute() void UBGraphicsMediaItem::toggleMute()

@ -161,7 +161,8 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(UBTeacherBarDataMgr* pDataM
// Build the Preview widget // Build the Preview widget
// Session Title // Session Title
mTitleContainer.setLayout(&mTitleLayout); mpTitleContainer = new QWidget(this);
mpTitleContainer->setLayout(&mTitleLayout);
mpSessionTitle = new QLabel(this); mpSessionTitle = new QLabel(this);
mpSessionTitle->setText(tr("Session: ")); mpSessionTitle->setText(tr("Session: "));
mpSessionTitle->setWordWrap(true); mpSessionTitle->setWordWrap(true);
@ -170,23 +171,23 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(UBTeacherBarDataMgr* pDataM
mLayout.addWidget(mpSessionTitle); mLayout.addWidget(mpSessionTitle);
// Title // Title
mTitleContainer.setLayout(&mTitleLayout); mpTitleContainer->setLayout(&mTitleLayout);
mTitleLayout.setContentsMargins(0, 0, 0, 0); mTitleLayout.setContentsMargins(0, 0, 0, 0);
mpTitleLabel = new QLabel(&mTitleContainer); mpTitleLabel = new QLabel(mpTitleContainer);
mpTitleLabel->setText(tr("Activity")); mpTitleLabel->setText(tr("Activity"));
mpTitleLabel->setObjectName("UBTeacherBarPreviewSubtitle"); mpTitleLabel->setObjectName("UBTeacherBarPreviewSubtitle");
mTitleLayout.addWidget(mpTitleLabel, 0); mTitleLayout.addWidget(mpTitleLabel, 0);
mpTitle = new QLabel(&mTitleContainer); mpTitle = new QLabel(mpTitleContainer);
mpTitle->setObjectName("UBTeacherBarPreviewTitle"); mpTitle->setObjectName("UBTeacherBarPreviewTitle");
mpTitle->setWordWrap(true); mpTitle->setWordWrap(true);
mpTitle->setAlignment(Qt::AlignLeft); mpTitle->setAlignment(Qt::AlignLeft);
mTitleLayout.addWidget(mpTitle, 1); mTitleLayout.addWidget(mpTitle, 1);
mpPageNbrLabel = new QLabel(tr("Page n° "), &mTitleContainer); mpPageNbrLabel = new QLabel(tr("Page n° "), mpTitleContainer);
mpPageNbrLabel->setAlignment(Qt::AlignRight); mpPageNbrLabel->setAlignment(Qt::AlignRight);
mpPageNbrLabel->setObjectName("UBTBPreviewSessionTitle"); mpPageNbrLabel->setObjectName("UBTBPreviewSessionTitle");
mTitleLayout.addWidget(mpPageNbrLabel); mTitleLayout.addWidget(mpPageNbrLabel);
mTitleLayout.addWidget(&mTitleSeparator); mTitleLayout.addWidget(&mTitleSeparator);
mLayout.addWidget(&mTitleContainer); mLayout.addWidget(mpTitleContainer);
// Content // Content
mpContentContainer = new UBTBPreviewContainer(this); mpContentContainer = new UBTBPreviewContainer(this);
@ -212,13 +213,6 @@ UBTeacherBarPreviewWidget::UBTeacherBarPreviewWidget(UBTeacherBarDataMgr* pDataM
UBTeacherBarPreviewWidget::~UBTeacherBarPreviewWidget() UBTeacherBarPreviewWidget::~UBTeacherBarPreviewWidget()
{ {
DELETEPTR(mpEditButton);
DELETEPTR(mpLicenseLabel);
DELETEPTR(mpScheduleLabel);
DELETEPTR(mpPageNbrLabel);
DELETEPTR(mpTitle);
DELETEPTR(mpTitleLabel);
DELETEPTR(mpSessionTitle);
} }
void UBTeacherBarPreviewWidget::onActiveSceneChanged() void UBTeacherBarPreviewWidget::onActiveSceneChanged()
@ -245,9 +239,9 @@ void UBTeacherBarPreviewWidget::updateFields()
if("" != mpDataMgr->pageTitle()){ if("" != mpDataMgr->pageTitle()){
mpTitle->setText(mpDataMgr->pageTitle()); mpTitle->setText(mpDataMgr->pageTitle());
mpPageNbrLabel->setText(tr("Page n° %0").arg(UBApplication::boardController->activeSceneIndex())); mpPageNbrLabel->setText(tr("Page n° %0").arg(UBApplication::boardController->activeSceneIndex()));
mTitleContainer.setVisible(true); mpTitleContainer->setVisible(true);
}else{ }else{
mTitleContainer.setVisible(false); mpTitleContainer->setVisible(false);
} }
// Actions // Actions

@ -83,7 +83,7 @@ private:
// Titles // Titles
QVBoxLayout mTitleLayout; QVBoxLayout mTitleLayout;
UBTBSeparator mTitleSeparator; UBTBSeparator mTitleSeparator;
QWidget mTitleContainer; QWidget* mpTitleContainer;
QLabel* mpSessionTitle; QLabel* mpSessionTitle;
QLabel* mpTitle; QLabel* mpTitle;
QLabel* mpTitleLabel; QLabel* mpTitleLabel;

@ -66,11 +66,6 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
UBTeacherBarWidget::~UBTeacherBarWidget() UBTeacherBarWidget::~UBTeacherBarWidget()
{ {
DELETEPTR(mpDocPreviewWidget);
DELETEPTR(mpDocEditWidget);
DELETEPTR(mpPageEditWidget);
DELETEPTR(mpPreview);
DELETEPTR(mpStackWidget);
} }
void UBTeacherBarWidget::onActiveDocumentChanged() void UBTeacherBarWidget::onActiveDocumentChanged()

Loading…
Cancel
Save