Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
80e9b93a
Commit
80e9b93a
authored
Jan 05, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the Links widgets
parent
9b470227
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
UBTeacherBarWidget.cpp
src/gui/UBTeacherBarWidget.cpp
+47
-1
UBTeacherBarWidget.h
src/gui/UBTeacherBarWidget.h
+15
-0
No files found.
src/gui/UBTeacherBarWidget.cpp
View file @
80e9b93a
...
@@ -47,6 +47,8 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
...
@@ -47,6 +47,8 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
setObjectName
(
name
);
setObjectName
(
name
);
mName
=
"TeacherBarWidget"
;
mName
=
"TeacherBarWidget"
;
mVisibleState
=
true
;
mVisibleState
=
true
;
mActionList
.
clear
();
mUrlList
.
clear
();
setAttribute
(
Qt
::
WA_StyledBackground
,
true
);
setAttribute
(
Qt
::
WA_StyledBackground
,
true
);
setStyleSheet
(
UBApplication
::
globalStyleSheet
());
setStyleSheet
(
UBApplication
::
globalStyleSheet
());
...
@@ -284,7 +286,9 @@ void UBTeacherBarWidget::onActionButton()
...
@@ -284,7 +286,9 @@ void UBTeacherBarWidget::onActionButton()
void
UBTeacherBarWidget
::
onLinkButton
()
void
UBTeacherBarWidget
::
onLinkButton
()
{
{
UBUrlWidget
*
pUrl
=
new
UBUrlWidget
(
this
);
mUrlList
<<
pUrl
;
mpLinks
->
addWidget
(
pUrl
);
}
}
UBTeacherStudentAction
::
UBTeacherStudentAction
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
UBTeacherStudentAction
::
UBTeacherStudentAction
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
...
@@ -437,3 +441,45 @@ void UBTeacherBarDropMediaZone::dragMoveEvent(QDragMoveEvent *pEvent)
...
@@ -437,3 +441,45 @@ void UBTeacherBarDropMediaZone::dragMoveEvent(QDragMoveEvent *pEvent)
{
{
pEvent
->
acceptProposedAction
();
pEvent
->
acceptProposedAction
();
}
}
// ---------------------------------------------------------------------------------------------
UBUrlWidget
::
UBUrlWidget
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
,
mpLayout
(
NULL
)
,
mpUrlLabel
(
NULL
)
,
mpUrl
(
NULL
)
{
setObjectName
(
name
);
mpLayout
=
new
QHBoxLayout
(
this
);
setLayout
(
mpLayout
);
mpUrlLabel
=
new
QLabel
(
tr
(
"Url"
),
this
);
mpLayout
->
addWidget
(
mpUrlLabel
,
0
);
mpUrl
=
new
QLineEdit
(
this
);
mpLayout
->
addWidget
(
mpUrl
,
1
);
}
UBUrlWidget
::~
UBUrlWidget
()
{
if
(
NULL
!=
mpUrlLabel
){
delete
mpUrlLabel
;
mpUrlLabel
=
NULL
;
}
if
(
NULL
!=
mpUrl
){
delete
mpUrl
;
mpUrl
=
NULL
;
}
if
(
NULL
!=
mpLayout
){
delete
mpLayout
;
mpLayout
=
NULL
;
}
}
QString
UBUrlWidget
::
url
()
{
QString
str
;
if
(
NULL
!=
mpUrl
){
str
=
mpUrl
->
text
();
}
return
str
;
}
src/gui/UBTeacherBarWidget.h
View file @
80e9b93a
...
@@ -59,6 +59,20 @@ protected:
...
@@ -59,6 +59,20 @@ protected:
void
dragLeaveEvent
(
QDragLeaveEvent
*
pEvent
);
void
dragLeaveEvent
(
QDragLeaveEvent
*
pEvent
);
};
};
class
UBUrlWidget
:
public
QWidget
{
public
:
UBUrlWidget
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBUrlWidget"
);
~
UBUrlWidget
();
QString
url
();
private
:
QHBoxLayout
*
mpLayout
;
QLabel
*
mpUrlLabel
;
QLineEdit
*
mpUrl
;
};
class
UBTeacherBarWidget
:
public
UBDockPaletteWidget
class
UBTeacherBarWidget
:
public
UBDockPaletteWidget
{
{
Q_OBJECT
Q_OBJECT
...
@@ -102,6 +116,7 @@ private:
...
@@ -102,6 +116,7 @@ private:
QTextEdit
*
mpComments
;
QTextEdit
*
mpComments
;
QVector
<
UBTeacherStudentAction
*>
mActionList
;
QVector
<
UBTeacherStudentAction
*>
mActionList
;
QVector
<
UBUrlWidget
*>
mUrlList
;
};
};
#endif // UBTEACHERBARWIDGET_H
#endif // UBTEACHERBARWIDGET_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment