Added some minor changes on the GUI

preferencesAboutTextFull
shibakaneki 13 years ago
parent 44a06538e4
commit 89e16fdecd
  1. 26
      src/gui/UBTeacherBarWidget.cpp
  2. 2
      src/gui/UBTeacherBarWidget.h

@ -36,10 +36,13 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
, mpActionLabel(NULL) , mpActionLabel(NULL)
, mpActions(NULL) , mpActions(NULL)
, mpActionButton(NULL) , mpActionButton(NULL)
, mpActionLayout(NULL)
, mpCommentLabel(NULL) , mpCommentLabel(NULL)
, mpComments(NULL) , mpComments(NULL)
, mpLinkLabel(NULL) , mpLinkLabel(NULL)
, mpLinks(NULL) , mpLinks(NULL)
, mpLinkButton(NULL)
, mpLinkLayout(NULL)
{ {
setObjectName(name); setObjectName(name);
mName = "TeacherBarWidget"; mName = "TeacherBarWidget";
@ -76,6 +79,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpDurationLayout = new QHBoxLayout(); mpDurationLayout = new QHBoxLayout();
mpDuration1 = new QCheckBox(this); mpDuration1 = new QCheckBox(this);
mpDuration1->setIcon(QIcon(":images/duration1.png")); mpDuration1->setIcon(QIcon(":images/duration1.png"));
mpDuration1->setChecked(true);
mpDurationLayout->addWidget(mpDuration1, 0); mpDurationLayout->addWidget(mpDuration1, 0);
mpDuration2 = new QCheckBox(this); mpDuration2 = new QCheckBox(this);
mpDuration2->setIcon(QIcon(":images/duration2.png")); mpDuration2->setIcon(QIcon(":images/duration2.png"));
@ -98,7 +102,10 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpActionButton = new QPushButton(this); mpActionButton = new QPushButton(this);
mpActionButton->setObjectName("DockPaletteWidgetButton"); mpActionButton->setObjectName("DockPaletteWidgetButton");
mpActionButton->setText(tr("Add action")); mpActionButton->setText(tr("Add action"));
mpLayout->addWidget(mpActionButton, 0); mpActionLayout = new QHBoxLayout();
mpActionLayout->addWidget(mpActionButton, 0);
mpActionLayout->addStretch(1);
mpLayout->addLayout(mpActionLayout, 0);
// Media // Media
mpMediaLabel = new QLabel(tr("Media"), this); mpMediaLabel = new QLabel(tr("Media"), this);
@ -113,7 +120,10 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpLayout->addWidget(mpLinks, 1); mpLayout->addWidget(mpLinks, 1);
mpLinkButton = new QPushButton(tr("Add link"), this); mpLinkButton = new QPushButton(tr("Add link"), this);
mpLinkButton->setObjectName("DockPaletteWidgetButton"); mpLinkButton->setObjectName("DockPaletteWidgetButton");
mpLayout->addWidget(mpLinkButton); mpLinkLayout = new QHBoxLayout();
mpLinkLayout->addWidget(mpLinkButton, 0);
mpLinkLayout->addStretch(1);
mpLayout->addLayout(mpLinkLayout, 0);
// Comments // Comments
mpCommentLabel = new QLabel(tr("Comments"), this); mpCommentLabel = new QLabel(tr("Comments"), this);
@ -149,6 +159,14 @@ UBTeacherBarWidget::~UBTeacherBarWidget()
delete mpLinkLabel; delete mpLinkLabel;
mpLinkLabel = NULL; mpLinkLabel = NULL;
} }
if(NULL != mpLinkButton){
delete mpLinkButton;
mpLinkButton = NULL;
}
if(NULL != mpLinkLayout){
delete mpLinkLayout;
mpLinkLayout = NULL;
}
if(NULL != mpDropMediaZone){ if(NULL != mpDropMediaZone){
delete mpDropMediaZone; delete mpDropMediaZone;
mpDropMediaZone = NULL; mpDropMediaZone = NULL;
@ -161,6 +179,10 @@ UBTeacherBarWidget::~UBTeacherBarWidget()
delete mpActionButton; delete mpActionButton;
mpActionButton = NULL; mpActionButton = NULL;
} }
if(NULL != mpActionLayout){
delete mpActionLayout;
mpActionLayout = NULL;
}
if(NULL != mpAction1){ if(NULL != mpAction1){
delete mpAction1; delete mpAction1;
mpAction1 = NULL; mpAction1 = NULL;

@ -102,9 +102,11 @@ private:
QLabel* mpActionLabel; QLabel* mpActionLabel;
UBWidgetList* mpActions; UBWidgetList* mpActions;
QPushButton* mpActionButton; QPushButton* mpActionButton;
QHBoxLayout* mpActionLayout;
QLabel* mpLinkLabel; QLabel* mpLinkLabel;
UBWidgetList* mpLinks; UBWidgetList* mpLinks;
QPushButton* mpLinkButton; QPushButton* mpLinkButton;
QHBoxLayout* mpLinkLayout;
QLabel* mpCommentLabel; QLabel* mpCommentLabel;
QTextEdit* mpComments; QTextEdit* mpComments;
}; };

Loading…
Cancel
Save