backup of the teacherbar rework

preferencesAboutTextFull
shibakaneki 13 years ago
parent 3dd07bb46d
commit 9ec9128412
  1. 10
      src/gui/UBTBDocumentEditWidget.cpp
  2. 2
      src/gui/UBTBDocumentEditWidget.h
  3. 9
      src/gui/UBTBDocumentPreviewWidget.cpp
  4. 2
      src/gui/UBTBDocumentPreviewWidget.h
  5. 219
      src/gui/UBTBPageEditWidget.cpp
  6. 51
      src/gui/UBTBPageEditWidget.h
  7. 115
      src/gui/UBTeacherBarDataMgr.cpp
  8. 58
      src/gui/UBTeacherBarDataMgr.h
  9. 13
      src/gui/UBTeacherBarPreviewWidget.cpp
  10. 3
      src/gui/UBTeacherBarPreviewWidget.h
  11. 128
      src/gui/UBTeacherBarWidget.cpp
  12. 2
      src/gui/UBTeacherBarWidget.h

@ -86,3 +86,13 @@ void UBTBDocumentEditWidget::onPreview()
{
emit changeTBState(eTeacherBarState_DocumentPreview);
}
void UBTBDocumentEditWidget::updateFields()
{
}
void UBTBDocumentEditWidget::clearFields()
{
}

@ -15,6 +15,8 @@ class UBTBDocumentEditWidget : public QWidget
public:
UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QWidget* parent=0, const char* name="UBTBDocumentEditWidget");
~UBTBDocumentEditWidget();
void updateFields();
void clearFields();
signals:
void changeTBState(eTeacherBarState state);

@ -46,3 +46,12 @@ void UBTBDocumentPreviewWidget::onPageView()
emit changeTBState(eTeacherBarState_PagePreview);
}
void UBTBDocumentPreviewWidget::updateFields()
{
}
void UBTBDocumentPreviewWidget::clearFields()
{
}

@ -12,6 +12,8 @@ class UBTBDocumentPreviewWidget : public QWidget
public:
UBTBDocumentPreviewWidget(UBTeacherBarDataMgr* pDataMgr, QWidget* parent=0, const char* name="UBTBDocumentPreviewWidget");
~UBTBDocumentPreviewWidget();
void updateFields();
void clearFields();
signals:
void changeTBState(eTeacherBarState state);

@ -25,6 +25,8 @@ UBTBPageEditWidget::UBTBPageEditWidget(UBTeacherBarDataMgr *pDataMgr, QWidget *p
{
Q_UNUSED(name);
mpDataMgr = pDataMgr;
mActions.clear();
mUrls.clear();
setAttribute(Qt::WA_StyledBackground, true);
setStyleSheet(UBApplication::globalStyleSheet());
@ -93,6 +95,7 @@ UBTBPageEditWidget::UBTBPageEditWidget(UBTeacherBarDataMgr *pDataMgr, QWidget *p
mLayout.addLayout(&mPagePreviewLayout, 0);
connect(mpTitle, SIGNAL(textChanged(QString)), this, SLOT(onValueChanged()));
connect(mpComments, SIGNAL(textChanged()), this, SLOT(onValueChanged()));
connect(mpActionButton, SIGNAL(clicked()), this, SLOT(onActionButton()));
connect(mpLinkButton, SIGNAL(clicked()), this, SLOT(onLinkButton()));
connect(mpDocumentEditbutton, SIGNAL(clicked()), this, SLOT(onDocumentEditClicked()));
@ -126,14 +129,14 @@ void UBTBPageEditWidget::onValueChanged()
void UBTBPageEditWidget::onActionButton()
{
UBTeacherStudentAction* pAction = new UBTeacherStudentAction(this);
mpDataMgr->actions() << pAction;
mActions << pAction;
mpActions->addWidget(pAction);
}
void UBTBPageEditWidget::onLinkButton()
{
UBUrlWidget* pUrl = new UBUrlWidget(this);
mpDataMgr->urls() << pUrl;
mUrls << pUrl;
mpLinks->addWidget(pUrl);
}
@ -143,91 +146,87 @@ void UBTBPageEditWidget::onMediaDropped(const QString &url)
QWidget* pMedia = mpMediaContainer->generateMediaWidget(url);
if(NULL != pMedia){
mpDataMgr->medias() << pMedia;
mpDataMgr->addMediaUrl(url);
mpMediaContainer->addWidget(pMedia);
}
}
}
void UBTBPageEditWidget::saveInfos(sTeacherBarInfos *infos)
void UBTBPageEditWidget::onDocumentEditClicked()
{
if(NULL != infos){
infos->title = mpTitle->text();
emit changeTBState(eTeacherBarState_DocumentEdit);
}
// Actions
for(int i=0; i<mpDataMgr->actions().size(); i++){
infos->actions << QString("%0;%1").arg(mpDataMgr->actions().at(i)->comboValue()).arg(mpDataMgr->actions().at(i)->text());
}
// Media
foreach(QString media, mpMediaContainer->mediaUrls()){
infos->medias << media;
}
void UBTBPageEditWidget::onPagePreviewClicked()
{
emit changeTBState(eTeacherBarState_PagePreview);
}
// Links
for(int j=0; j<mpDataMgr->urls().size(); j++){
if("" != mpDataMgr->urls().at(j)->url()){
infos->urls << mpDataMgr->urls().at(j)->url();
}
}
// Comments
infos->comments = mpComments->document()->toPlainText();
void UBTBPageEditWidget::saveFields()
{
mpDataMgr->actions()->clear();
mpDataMgr->urls()->clear();
foreach(UBTeacherStudentAction* pAct, mActions){
sAction action;
action.type = pAct->comboValue().toInt();
action.content = pAct->text();
mpDataMgr->actions()->append(action);
}
foreach(UBUrlWidget* pUrl, mUrls){
sLink link;
link.title = pUrl->title();
link.link = pUrl->url();
mpDataMgr->urls()->append(link);
}
// TODO : Medias
}
void UBTBPageEditWidget::loadInfos(sTeacherBarInfos* infos)
void UBTBPageEditWidget::updateFields()
{
if(NULL != infos){
// Title
mpTitle->setText(infos->title);
mpDataMgr->setPageTitle(infos->title);
// Actions
for(int i=0; i<infos->actions.size(); i++){
QStringList qslAction = infos->actions.at(i).split(";");
if(qslAction.size() >= 2){
UBTeacherStudentAction* pAction = new UBTeacherStudentAction(this);
pAction->setComboValue(qslAction.at(0).toInt());
pAction->setText(qslAction.at(1));
mpDataMgr->actions() << pAction;
mpActions->addWidget(pAction);
}
}
// Media
foreach(QString url, infos->medias){
if("" != url){
QWidget* pMedia = mpMediaContainer->generateMediaWidget(url);
if(NULL != pMedia){
mpDataMgr->medias() << pMedia;
mpMediaContainer->addWidget(pMedia);
}
}
}
mpTitle->setText(mpDataMgr->pageTitle());
qDebug() << "mpComments will become: " << mpDataMgr->comments();
foreach(sAction action, *mpDataMgr->actions()){
UBTeacherStudentAction* pAction = new UBTeacherStudentAction(this);
pAction->setComboValue(action.type);
pAction->setText(action.content);
mActions << pAction;
mpActions->addWidget(pAction);
}
// Links
for(int j=0; j<infos->urls.size(); j++){
QString qsUrl = infos->urls.at(j);
if("" != qsUrl){
UBUrlWidget* pLink = new UBUrlWidget(this);
pLink->setUrl(qsUrl);
mpDataMgr->urls() << pLink;
mpLinks->addWidget(pLink);
}
}
// Comments
if(NULL != mpComments){
mpComments->document()->setPlainText(infos->comments);
}
foreach(sLink link, *mpDataMgr->urls()){
UBUrlWidget* urlWidget = new UBUrlWidget(this);
urlWidget->setTitle(link.title);
urlWidget->setUrl(link.link);
mUrls << urlWidget;
mpLinks->addWidget(urlWidget);
}
}
void UBTBPageEditWidget::onDocumentEditClicked()
{
emit changeTBState(eTeacherBarState_DocumentEdit);
// TODO: add the medias
qDebug() << "mpComments will become: " << mpDataMgr->comments();
mpComments->setPlainText(mpDataMgr->comments());
}
void UBTBPageEditWidget::onPagePreviewClicked()
void UBTBPageEditWidget::clearFields()
{
emit changeTBState(eTeacherBarState_PagePreview);
mpTitle->setText("");
mpComments->setText("");
foreach(UBTeacherStudentAction* pAction, mActions){
mpActions->removeWidget(pAction);
DELETEPTR(pAction);
}
mActions.clear();
foreach(UBUrlWidget* pLink, mUrls){
mpLinks->removeWidget(pLink);
DELETEPTR(pLink);
}
mUrls.clear();
// TODO: clean the media?
}
// ---------------------------------------------------------------------------------------------
@ -287,10 +286,8 @@ QString UBUrlWidget::url()
void UBUrlWidget::setUrl(const QString &url)
{
QStringList list = url.split(";");
if(NULL != mpUrl){
mpUrl->setText(list.at(0));
mpTitle->setText(list.at(1));
mpUrl->setText(url);
}
}
@ -415,3 +412,81 @@ QWidget* UBTBMediaContainer::generateMediaWidget(const QString& url)
return pW;
}
UBTeacherStudentAction::UBTeacherStudentAction(QWidget *parent, const char *name):QWidget(parent)
, mpText(NULL)
, mpLayout(NULL)
, mpComboLayout(NULL)
, mpCombo(NULL)
{
setObjectName(name);
setAttribute(Qt::WA_StyledBackground, true);
setStyleSheet(UBApplication::globalStyleSheet());
// Create the GUI
mpLayout = new QHBoxLayout(this);
setLayout(mpLayout);
mpComboLayout = new QVBoxLayout();
mpCombo = new QComboBox(this);
mpCombo->setObjectName("DockPaletteWidgetComboBox");
mpCombo->setMinimumWidth(80);
mpCombo->addItem(tr("Teacher"));
mpCombo->addItem(tr("Student"));
mpComboLayout->addWidget(mpCombo, 0);
mpComboLayout->addStretch(1);
mpLayout->addLayout(mpComboLayout, 0);
mpText = new QTextEdit(this);
mpText->setObjectName("DockPaletteWidgetBox");
mpText->setStyleSheet("background:white;");
mpLayout->addWidget(mpText, 1);
}
UBTeacherStudentAction::~UBTeacherStudentAction()
{
DELETEPTR(mpCombo);
DELETEPTR(mpText);
DELETEPTR(mpComboLayout);
DELETEPTR(mpLayout);
}
QString UBTeacherStudentAction::text()
{
QString str;
if(NULL != mpText){
str = mpText->document()->toPlainText();
}
return str;
}
QString UBTeacherStudentAction::comboValue()
{
QString str;
if(NULL != mpCombo){
str = QString("%0").arg(mpCombo->currentIndex());
}
return str;
}
void UBTeacherStudentAction::setComboValue(int value)
{
if(NULL != mpCombo){
mpCombo->setCurrentIndex(value);
}
}
void UBTeacherStudentAction::setText(const QString& text)
{
if(NULL != mpText){
mpText->document()->setPlainText(text);
}
}

@ -14,6 +14,48 @@
#include "interfaces/IDropable.h"
#include "UBTeacherBarDataMgr.h"
class UBTeacherStudentAction : public QWidget
{
Q_OBJECT
public:
UBTeacherStudentAction(QWidget* parent=0, const char* name="UBTeacherStudentAction");
~UBTeacherStudentAction();
QString text();
QString comboValue();
void setComboValue(int value);
void setText(const QString& text);
private:
QTextEdit* mpText;
QHBoxLayout* mpLayout;
QVBoxLayout* mpComboLayout;
QComboBox* mpCombo;
};
class UBUrlWidget : public QWidget
{
public:
UBUrlWidget(QWidget* parent=0, const char* name="UBUrlWidget");
~UBUrlWidget();
QString url();
void setUrl(const QString& url);
QString title(){return mpTitle->text();}
void setTitle(const QString& title){mpTitle->setText(title);}
private:
QVBoxLayout* mpLayout;
QHBoxLayout* mpLabelLayout;
QHBoxLayout* mpTitleLayout;
QLabel* mpUrlLabel;
QLineEdit* mpUrl;
QLabel* mpTitleLabel;
QLineEdit* mpTitle;
};
class UBTBMediaContainer : public UBWidgetList
, public IDropable
{
@ -46,9 +88,9 @@ class UBTBPageEditWidget : public QWidget
public:
UBTBPageEditWidget(UBTeacherBarDataMgr* pDataMgr, QWidget* parent=0, const char* name="UBTBPageEditWidget");
~UBTBPageEditWidget();
void saveInfos(sTeacherBarInfos* infos);
void loadInfos(sTeacherBarInfos* infos);
void saveFields();
void updateFields();
void clearFields();
signals:
void valueChanged();
@ -87,6 +129,9 @@ private:
QPushButton* mpDocumentEditbutton;
QPushButton* mpPagePreviewButton;
QWidget* mpContainer;
QVector<UBTeacherStudentAction*> mActions;
QVector<UBUrlWidget*> mUrls;
};
#endif // UBTBPAGEEDITWIDGET_H

@ -1,5 +1,8 @@
#include "core/UBApplication.h"
#include "core/UBPersistenceManager.h"
#include "board/UBBoardController.h"
#include "customWidgets/UBGlobals.h"
#include "UBTeacherBarDataMgr.h"
UBTeacherBarDataMgr::UBTeacherBarDataMgr()
@ -19,79 +22,75 @@ void UBTeacherBarDataMgr::clearLists()
mMediaList.clear();
}
UBTeacherStudentAction::UBTeacherStudentAction(QWidget *parent, const char *name):QWidget(parent)
, mpText(NULL)
, mpLayout(NULL)
, mpComboLayout(NULL)
, mpCombo(NULL)
void UBTeacherBarDataMgr::saveContent()
{
setObjectName(name);
// Store the page information in the UBZ
sTeacherBarInfos infos;
setAttribute(Qt::WA_StyledBackground, true);
setStyleSheet(UBApplication::globalStyleSheet());
infos.title = mPageTitle;
// Create the GUI
mpLayout = new QHBoxLayout(this);
setLayout(mpLayout);
// Actions
foreach(sAction action, mActionList){
infos.actions << QString("%0;%1").arg(action.type).arg(action.content);
}
mpComboLayout = new QVBoxLayout();
// Media
foreach(QString media, mMediaUrls){
infos.medias << media;
}
mpCombo = new QComboBox(this);
mpCombo->setObjectName("DockPaletteWidgetComboBox");
mpCombo->setMinimumWidth(80);
mpCombo->addItem(tr("Teacher"));
mpCombo->addItem(tr("Student"));
mpComboLayout->addWidget(mpCombo, 0);
mpComboLayout->addStretch(1);
// Links
foreach(sLink link, mUrlList){
if("" != link.title && "" != link.link){
infos.urls << QString("%0;%1").arg(link.title).arg(link.link);
}
}
mpLayout->addLayout(mpComboLayout, 0);
// Comments
infos.comments = mComments;
mpText = new QTextEdit(this);
mpText->setObjectName("DockPaletteWidgetBox");
mpText->setStyleSheet("background:white;");
UBPersistenceManager::persistenceManager()->persistTeacherBar(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex(), infos);
mpLayout->addWidget(mpText, 1);
// TODO: Store the document metadata somewhere
}
UBTeacherStudentAction::~UBTeacherStudentAction()
void UBTeacherBarDataMgr::loadContent()
{
DELETEPTR(mpCombo);
DELETEPTR(mpText);
DELETEPTR(mpComboLayout);
DELETEPTR(mpLayout);
}
QString UBTeacherStudentAction::text()
{
QString str;
if(NULL != mpText){
str = mpText->document()->toPlainText();
clearLists();
sTeacherBarInfos nextInfos = UBPersistenceManager::persistenceManager()->getTeacherBarInfos(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex());
// Page Title
mPageTitle = nextInfos.title;
// Actions
foreach(QString eachAction, nextInfos.actions){
QStringList qslAction = eachAction.split(";");
if(2 <= qslAction.size()){
sAction action;
action.type = qslAction.at(0).toInt();
action.content = qslAction.at(1);
mActionList << action;
}
}
return str;
}
QString UBTeacherStudentAction::comboValue()
{
QString str;
if(NULL != mpCombo){
str = QString("%0").arg(mpCombo->currentIndex());
// Media URL
mMediaUrls = nextInfos.medias;
// Links
foreach(QString eachUrl, nextInfos.urls){
QStringList qslUrl = eachUrl.split(';');
if(2 <= qslUrl.size()){
sLink link;
link.title = qslUrl.at(0);
link.link = qslUrl.at(1);
mUrlList << link;
}
}
return str;
}
// Comments
mComments = nextInfos.comments;
void UBTeacherStudentAction::setComboValue(int value)
{
if(NULL != mpCombo){
mpCombo->setCurrentIndex(value);
}
}
// TODO : Read the document metadata file and populate the metadata infos here
void UBTeacherStudentAction::setText(const QString& text)
{
if(NULL != mpText){
mpText->document()->setPlainText(text);
}
}

@ -22,44 +22,15 @@ typedef enum{
eActionOwner_Student
}eActionOwner;
class UBTeacherStudentAction : public QWidget
{
Q_OBJECT
public:
UBTeacherStudentAction(QWidget* parent=0, const char* name="UBTeacherStudentAction");
~UBTeacherStudentAction();
QString text();
QString comboValue();
void setComboValue(int value);
void setText(const QString& text);
private:
QTextEdit* mpText;
QHBoxLayout* mpLayout;
QVBoxLayout* mpComboLayout;
QComboBox* mpCombo;
};
typedef struct{
int type;
QString content;
}sAction;
class UBUrlWidget : public QWidget
{
public:
UBUrlWidget(QWidget* parent=0, const char* name="UBUrlWidget");
~UBUrlWidget();
QString url();
void setUrl(const QString& url);
private:
QVBoxLayout* mpLayout;
QHBoxLayout* mpLabelLayout;
QHBoxLayout* mpTitleLayout;
QLabel* mpUrlLabel;
QLineEdit* mpUrl;
QLabel* mpTitleLabel;
QLineEdit* mpTitle;
};
typedef struct{
QString title;
QString link;
}sLink;
class UBTeacherBarDataMgr
{
@ -80,13 +51,15 @@ public:
QString pageTitle(){return mPageTitle;}
// Actions
QVector<UBTeacherStudentAction*> actions(){return mActionList;}
QVector<sAction>* actions(){return &mActionList;}
// Medias
QVector<QWidget*> medias(){return mMediaList;}
void addMediaUrl(const QString& url){mMediaUrls << url;}
QStringList mediaUrls(){return mMediaUrls;}
// Urls
QVector<UBUrlWidget*> urls(){return mUrlList;}
QVector<sLink>* urls(){return &mUrlList;}
// Comments
void setComments(const QString& c){mComments = c;}
@ -94,6 +67,8 @@ public:
// Others
void clearLists();
void saveContent();
void loadContent();
private:
QString mSessionTitle;
@ -101,9 +76,10 @@ private:
QString mPageTitle;
QString mComments;
QVector<UBTeacherStudentAction*> mActionList;
QVector<UBUrlWidget*> mUrlList;
QVector<sAction> mActionList;
QVector<sLink> mUrlList;
QVector<QWidget*> mMediaList;
QStringList mMediaUrls;
};
#endif // UBTEACHERBARDATAMGR_H

@ -302,13 +302,12 @@ void UBTeacherBarPreviewWidget::setLinks(QStringList links)
}
}
void UBTeacherBarPreviewWidget::loadInfos(sTeacherBarInfos *infos)
void UBTeacherBarPreviewWidget::updateFields()
{
}
void UBTeacherBarPreviewWidget::clearFields()
{
if(NULL != infos){
setTitle(infos->title);
mediaViewer()->loadMedia(infos->medias);
// Add the comments
//setComments();
}
}

@ -61,7 +61,8 @@ public:
void setLinks(QStringList links);
void clean();
QLabel* mediaLabel() { return mpMediaLabel;}
void loadInfos(sTeacherBarInfos* infos);
void updateFields();
void clearFields();
signals:
void showEditMode();

@ -59,6 +59,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
connect(mpDocPreviewWidget, SIGNAL(changeTBState(eTeacherBarState)), this, SLOT(onTBStateChanged(eTeacherBarState)));
connect(mpDocEditWidget, SIGNAL(changeTBState(eTeacherBarState)), this, SLOT(onTBStateChanged(eTeacherBarState)));
connect(mpPageEditWidget, SIGNAL(changeTBState(eTeacherBarState)), this, SLOT(onTBStateChanged(eTeacherBarState)));
connect(mpPageEditWidget, SIGNAL(valueChanged()), this, SLOT(onValueChanged()));
}
UBTeacherBarWidget::~UBTeacherBarWidget()
@ -88,110 +89,49 @@ void UBTeacherBarWidget::onValueChanged()
void UBTeacherBarWidget::saveContent()
{
sTeacherBarInfos infos;
mpPageEditWidget->saveInfos(&infos);
UBPersistenceManager::persistenceManager()->persistTeacherBar(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex(), infos);
mpPageEditWidget->saveFields();
mData.saveContent();
}
void UBTeacherBarWidget::loadContent()
{
// clearWidgetLists();
// sTeacherBarInfos nextInfos = UBPersistenceManager::persistenceManager()->getTeacherBarInfos(UBApplication::boardController->activeDocument(), UBApplication::boardController->activeSceneIndex());
// mpPageEditWidget->loadInfos(&nextInfos);
// mpPreview->mediaViewer()->cleanMedia();
// if(!isEmpty()){
// // Update the fields of the preview widget
// onTBStateChanged(eTeacherBarState_PagePreview);
// mpPreview->clean();
// mpPreview->loadInfos(&nextInfos);
// // Add the actions
// if(!mActionList.empty()){
// QStringList actions;
// foreach(UBTeacherStudentAction* action, mActionList){
// QString desc = QString("%0;%1").arg(action->comboValue()).arg(action->text());
// actions << desc;
// }
// mpPreview->setActions(actions);
// }
// // Add the media
// if(nextInfos.medias.count() > 0){
// QList<QWidget*> widgetList;
// widgetList.append(mpPreview->mediaLabel());
// mpPreview->mediaViewer()->loadWidgets(widgetList,false);
// int loadedMedia = mpPreview->mediaViewer()->loadMedia(nextInfos.medias);
// if(loadedMedia)
// mpPreview->mediaLabel()->setVisible(true);
// }
// // Add the links
// if(!mUrlList.empty()){
// QStringList links;
// foreach(UBUrlWidget* url, mUrlList){
// QStringList list = url->url().split(";");
// QString formedlink = "<a href=";
// if(!list.at(0).startsWith("http://"))
// formedlink += "http://";
// formedlink += list.at(0) + ">" + list.at(1) + "</a>";
// links << formedlink;
// }
// mpPreview->setLinks(links);
// }
// }
// else{
// // If the document has only one page, show the document edit page
// if(1 == UBApplication::boardController->activeDocument()->pageCount()){
// onTBStateChanged(eTeacherBarState_DocumentEdit);
// }else{
// onTBStateChanged(eTeacherBarState_PageEdit);
// }
// }
// Clear the old datas
mpPageEditWidget->clearFields();
mpPreview->clearFields();
mpDocEditWidget->clearFields();
mpDocPreviewWidget->clearFields();
// Update the datas
mData.loadContent();
qDebug() << mData.comments();
// Update the fields
mpPageEditWidget->updateFields();
mpPreview->updateFields();
mpDocEditWidget->updateFields();
mpDocPreviewWidget->updateFields();
if(!isEmpty()){
onTBStateChanged(eTeacherBarState_PagePreview);
}else{
if(1 == UBApplication::boardController->activeDocument()->pageCount()){
onTBStateChanged(eTeacherBarState_DocumentEdit);
}else{
onTBStateChanged(eTeacherBarState_PageEdit);
}
}
}
bool UBTeacherBarWidget::isEmpty()
{
return mData.pageTitle() == "" &&
mData.urls().empty() &&
mData.actions().empty() &&
mData.urls()->empty() &&
mData.actions()->empty() &&
mData.medias().empty() &&
mData.comments() == "";
}
void UBTeacherBarWidget::onTitleTextChanged(const QString& text)
{
//mpTitle->setToolTip(text);
}
void UBTeacherBarWidget::clearWidgetLists()
{
// if(NULL != mpMediaContainer){
// for(int i=0; i<mMediaList.size(); i++){
// mpMediaContainer->removeWidget(mMediaList.at(i));
// delete mMediaList.at(i);
// }
// mMediaList.clear();
// mpMediaContainer->cleanMedias();
// }
// if(NULL != mpActions){
// for(int i=0; i<mActionList.size(); i++){
// mpActions->removeWidget(mActionList.at(i));
// delete mActionList.at(i);
// }
// mActionList.clear();
// }
// if(NULL != mpLinks){
// for(int i=0; i<mUrlList.size(); i++){
// mpLinks->removeWidget(mUrlList.at(i));
// delete mUrlList.at(i);
// }
// mUrlList.clear();
// }
mData.comments() == "" &&
mData.sessionTarget() == "" &&
mData.sessionTitle() == "";
}
void UBTeacherBarWidget::onShowEditMode()

@ -36,12 +36,10 @@ private slots:
void saveContent();
void loadContent();
void onValueChanged();
void onTitleTextChanged(const QString& text);
void onShowEditMode();
void onTBStateChanged(eTeacherBarState state);
private:
void clearWidgetLists();
bool isEmpty();
QVBoxLayout mLayout;

Loading…
Cancel
Save