Commit 15f89fc7 authored by shibakaneki's avatar shibakaneki

Partial commit

parent f5f1f835
This diff is collapsed.
...@@ -22,6 +22,13 @@ class UBMediaPlayer; ...@@ -22,6 +22,13 @@ class UBMediaPlayer;
#define LABEL_MINWIDHT 80 #define LABEL_MINWIDHT 80
typedef enum{
eTeacherBarState_DocumentEdit,
eTeacherBarState_DocumentPreview,
eTeacherBarState_PageEdit,
eTeacherBarState_PagePreview
}eTeacherBarState;
typedef enum{ typedef enum{
eDuration_Quarter, eDuration_Quarter,
eDuration_Half, eDuration_Half,
...@@ -104,6 +111,13 @@ private: ...@@ -104,6 +111,13 @@ private:
QHBoxLayout mOwnerLayout; QHBoxLayout mOwnerLayout;
}; };
class UBTBPreviewContainer : public UBWidgetList
{
public:
UBTBPreviewContainer(QWidget* parent=0, const char* name="UBTBPreviewContainer");
~UBTBPreviewContainer();
};
class UBTeacherBarPreviewWidget : public QWidget class UBTeacherBarPreviewWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
...@@ -133,6 +147,7 @@ private: ...@@ -133,6 +147,7 @@ private:
QHBoxLayout mTitleDurationLayout; QHBoxLayout mTitleDurationLayout;
UBTeacherBarPreviewMedia mMediaViewer; UBTeacherBarPreviewMedia mMediaViewer;
QList<QWidget*> mWidgets; QList<QWidget*> mWidgets;
QList<QWidget*> mStoredWidgets;
QPushButton* mpEditButton; QPushButton* mpEditButton;
QLabel* mpTitle; QLabel* mpTitle;
...@@ -144,6 +159,7 @@ private: ...@@ -144,6 +159,7 @@ private:
QLabel* mpLinksLabel; QLabel* mpLinksLabel;
QLabel* mpTmpLink; QLabel* mpTmpLink;
UBActionPreview* mpTmpAction; UBActionPreview* mpTmpAction;
UBTBPreviewContainer* mpContentContainer;
}; };
class UBTBMediaContainer : public UBWidgetList class UBTBMediaContainer : public UBWidgetList
...@@ -172,6 +188,51 @@ private: ...@@ -172,6 +188,51 @@ private:
QStringList mMediaList; QStringList mMediaList;
}; };
class UBTBDocumentEditWidget : public QWidget
{
Q_OBJECT
public:
UBTBDocumentEditWidget(QWidget* parent=0, const char* name="UBTBDocumentEditWidget");
~UBTBDocumentEditWidget();
signals:
void onPreviewClicked();
void onPageViewClicked();
private:
QVBoxLayout mLayout;
QHBoxLayout mPageLayout;
QHBoxLayout mPreviewLayout;
QPushButton* mpPageViewButton;
QPushButton* mpPreviewButton;
QLabel* mpTitleLabel;
QLineEdit* mpTitle;
QLabel* mpTargetLabel;
QTextEdit* mpTarget;
QLabel* mpMetadataLabel;
QLabel* mpLicenseLabel;
};
class UBTBDocumentPreviewWidget : public QWidget
{
Q_OBJECT
public:
UBTBDocumentPreviewWidget(QWidget* parent=0, const char* name="UBTBDocumentPreviewWidget");
~UBTBDocumentPreviewWidget();
signals:
void onEditClicked();
void onPageViewClicked();
private:
QVBoxLayout mLayout;
QHBoxLayout mPageLayout;
QHBoxLayout mPreviewLayout;
QPushButton* mpPageViewButton;
QPushButton* mpEditButton;
};
class UBTeacherBarWidget : public UBDockPaletteWidget class UBTeacherBarWidget : public UBDockPaletteWidget
{ {
Q_OBJECT Q_OBJECT
...@@ -188,23 +249,18 @@ private slots: ...@@ -188,23 +249,18 @@ private slots:
void onLinkButton(); void onLinkButton();
void onShowEditMode(); void onShowEditMode();
void onMediaDropped(const QString& url); void onMediaDropped(const QString& url);
void onTBStateChanged(eTeacherBarState state);
private: private:
void clearWidgetLists(); void clearWidgetLists();
bool isEmpty(); bool isEmpty();
QVBoxLayout* mpLayout; QVBoxLayout* mpLayout;
QHBoxLayout* mpTitleLayout; QHBoxLayout* mpTitleLayout;
QHBoxLayout* mpDurationLayout;
QLabel* mpTitleLabel; QLabel* mpTitleLabel;
QLabel* mpDurationLabel;
QLineEdit* mpTitle; QLineEdit* mpTitle;
QLabel* mpMediaLabel; QLabel* mpMediaLabel;
QWidget* mpContainer; QWidget* mpContainer;
QVBoxLayout* mpContainerLayout; QVBoxLayout* mpContainerLayout;
QCheckBox* mpDuration1;
QCheckBox* mpDuration2;
QCheckBox* mpDuration3;
QButtonGroup* mpDurationButtons;
QLabel* mpActionLabel; QLabel* mpActionLabel;
UBWidgetList* mpActions; UBWidgetList* mpActions;
QPushButton* mpActionButton; QPushButton* mpActionButton;
...@@ -223,6 +279,10 @@ private: ...@@ -223,6 +279,10 @@ private:
QVector<QWidget*> mMediaList; QVector<QWidget*> mMediaList;
UBTBMediaContainer* mpMediaContainer; UBTBMediaContainer* mpMediaContainer;
eTeacherBarState mState;
UBTBDocumentPreviewWidget* mpDocPreviewWidget;
UBTBDocumentEditWidget* mpDocEditWidget;
}; };
#endif // UBTEACHERBARWIDGET_H #endif // UBTEACHERBARWIDGET_H
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