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
fbd63063
Commit
fbd63063
authored
May 29, 2013
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused classes
parent
ca762f42
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
675 deletions
+0
-675
Sankore_3.1.pro
Sankore_3.1.pro
+0
-1
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+0
-3
UBActionableWidget.cpp
src/customWidgets/UBActionableWidget.cpp
+0
-90
UBActionableWidget.h
src/customWidgets/UBActionableWidget.h
+0
-68
UBMediaWidget.cpp
src/customWidgets/UBMediaWidget.cpp
+0
-368
UBMediaWidget.h
src/customWidgets/UBMediaWidget.h
+0
-137
customWidgets.pri
src/customWidgets/customWidgets.pri
+0
-8
No files found.
Sankore_3.1.pro
View file @
fbd63063
...
...
@@ -49,7 +49,6 @@ include(src/podcast/podcast.pri)
include
(
src
/
tools
/
tools
.
pri
)
include
(
src
/
desktop
/
desktop
.
pri
)
include
(
src
/
web
/
web
.
pri
)
include
(
src
/
customWidgets
/
customWidgets
.
pri
)
DEPENDPATH
+=
src
/
pdf
-
merger
INCLUDEPATH
+=
src
/
pdf
-
merger
...
...
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
fbd63063
...
...
@@ -1335,9 +1335,6 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistGroupToDom(QGraphicsItem *gro
QDomElement
curGroupElement
=
groupDomDocument
->
createElement
(
tGroup
);
curGroupElement
.
setAttribute
(
aId
,
uuid
);
curParent
->
appendChild
(
curGroupElement
);
qDebug
()
<<
groupItem
->
children
().
count
();
foreach
(
QGraphicsItem
*
item
,
groupItem
->
childItems
())
{
QUuid
tmpUuid
=
UBGraphicsScene
::
getPersonalUuid
(
item
);
if
(
!
tmpUuid
.
isNull
())
{
...
...
src/customWidgets/UBActionableWidget.cpp
deleted
100644 → 0
View file @
ca762f42
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QPainter>
#include <QDebug>
#include "UBActionableWidget.h"
#include "core/memcheck.h"
UBActionableWidget
::
UBActionableWidget
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
,
mShowActions
(
false
)
{
setObjectName
(
name
);
mActions
.
clear
();
mCloseButtons
.
setIcon
(
QIcon
(
QPixmap
(
":images/close.svg"
)));
mCloseButtons
.
setGeometry
(
0
,
0
,
2
*
ACTIONSIZE
,
ACTIONSIZE
);
mCloseButtons
.
setVisible
(
false
);
connect
(
&
mCloseButtons
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
onCloseClicked
()));
}
UBActionableWidget
::~
UBActionableWidget
()
{
}
void
UBActionableWidget
::
addAction
(
eAction
act
)
{
if
(
!
mActions
.
contains
(
act
)){
mActions
<<
act
;
}
}
void
UBActionableWidget
::
removeAction
(
eAction
act
)
{
if
(
mActions
.
contains
(
act
)){
mActions
.
remove
(
mActions
.
indexOf
(
act
));
}
}
void
UBActionableWidget
::
removeAllActions
()
{
mActions
.
clear
();
}
void
UBActionableWidget
::
setActionsVisible
(
bool
bVisible
)
{
if
(
!
mActions
.
empty
()
&&
mActions
.
contains
(
eAction_Close
)){
mCloseButtons
.
setVisible
(
bVisible
);
}
}
void
UBActionableWidget
::
onCloseClicked
()
{
emit
close
(
this
);
}
void
UBActionableWidget
::
setActionsParent
(
QWidget
*
parent
)
{
if
(
mActions
.
contains
(
eAction_Close
)){
mCloseButtons
.
setParent
(
parent
);
}
}
void
UBActionableWidget
::
unsetActionsParent
()
{
if
(
mActions
.
contains
(
eAction_Close
)){
mCloseButtons
.
setParent
(
this
);
}
}
src/customWidgets/UBActionableWidget.h
deleted
100644 → 0
View file @
ca762f42
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBACTIONABLEWIDGET_H
#define UBACTIONABLEWIDGET_H
#include <QWidget>
#include <QPaintEvent>
#include <QToolButton>
#include <QPushButton>
#define ACTIONSIZE 16
typedef
enum
{
eAction_Close
,
eAction_MoveUp
,
eAction_MoveDown
}
eAction
;
class
UBActionableWidget
:
public
QWidget
{
Q_OBJECT
public
:
UBActionableWidget
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBActionableWidget"
);
~
UBActionableWidget
();
void
addAction
(
eAction
act
);
void
removeAction
(
eAction
act
);
void
removeAllActions
();
void
setActionsVisible
(
bool
bVisible
);
signals
:
void
close
(
QWidget
*
w
);
protected
:
void
setActionsParent
(
QWidget
*
parent
);
void
unsetActionsParent
();
QVector
<
eAction
>
mActions
;
QPushButton
mCloseButtons
;
private
slots
:
void
onCloseClicked
();
private
:
bool
mShowActions
;
};
#endif // UBACTIONABLEWIDGET_H
src/customWidgets/UBMediaWidget.cpp
deleted
100644 → 0
View file @
ca762f42
This diff is collapsed.
Click to expand it.
src/customWidgets/UBMediaWidget.h
deleted
100644 → 0
View file @
ca762f42
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBMEDIAWIDGET_H
#define UBMEDIAWIDGET_H
#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QSlider>
#include <QMouseEvent>
#include <QStackedWidget>
#include <phonon/MediaObject>
#include <phonon/VideoWidget>
#include <phonon/AudioOutput>
#include "UBActionableWidget.h"
#define UBMEDIABUTTON_SIZE 32
#define TICK_INTERVAL 1000
/**
* \brief The media type
*/
typedef
enum
{
eMediaType_Video
,
eMediaType_Audio
}
eMediaType
;
class
UBMediaButton
:
public
QLabel
{
Q_OBJECT
public
:
UBMediaButton
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBMediaButton"
);
~
UBMediaButton
();
signals
:
void
clicked
();
protected
:
void
mousePressEvent
(
QMouseEvent
*
ev
);
void
mouseReleaseEvent
(
QMouseEvent
*
ev
);
private
:
/** And indicator of the press event in progress */
bool
mPressed
;
};
class
UBMediaWidget
:
public
UBActionableWidget
{
Q_OBJECT
public
:
UBMediaWidget
(
eMediaType
type
=
eMediaType_Video
,
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBMediaWidget"
);
~
UBMediaWidget
();
void
setFile
(
const
QString
&
filePath
);
eMediaType
mediaType
();
int
border
();
void
setAudioCover
(
const
QString
&
coverPath
);
void
setUrl
(
const
QString
&
url
){
mUrl
=
url
;}
QString
url
(){
return
mUrl
;}
protected
:
void
resizeEvent
(
QResizeEvent
*
ev
);
void
showEvent
(
QShowEvent
*
event
);
void
hideEvent
(
QHideEvent
*
event
);
/** The current media file path */
QString
mFilePath
;
private
slots
:
void
onPlayStopClicked
();
void
onPauseClicked
();
void
onStateChanged
(
Phonon
::
State
newState
,
Phonon
::
State
oldState
);
void
onTotalTimeChanged
(
qint64
total
);
void
onTick
(
qint64
currentTime
);
void
onSliderChanged
(
int
value
);
private
:
void
createMediaPlayer
();
void
adaptSizeToVideo
();
/** The current media type */
eMediaType
mType
;
/** The media object */
Phonon
::
MediaObject
*
mpMediaObject
;
/** The video renderer */
Phonon
::
VideoWidget
*
mpVideoWidget
;
/** The audio renderer */
Phonon
::
AudioOutput
*
mpAudioOutput
;
/** The principal layout of this widget */
QVBoxLayout
*
mpLayout
;
/** The seeker layout */
QHBoxLayout
*
mpSeekerLayout
;
/** The play-stop button */
UBMediaButton
*
mpPlayStopButton
;
/** The pause button */
UBMediaButton
*
mpPauseButton
;
/** The seeker slider */
QSlider
*
mpSlider
;
/** An indicator of the seeker auto update in progress */
bool
mAutoUpdate
;
/** An indicator of the thumbnail generation in progress */
bool
mGeneratingThumbnail
;
/** The border */
int
mBorder
;
/** A widget that will contain the media */
QWidget
*
mpMediaContainer
;
/** The media layout */
QHBoxLayout
*
mMediaLayout
;
/** The audio cover */
QLabel
*
mpCover
;
/** The media url */
QString
mUrl
;
};
#endif // UBMEDIAWIDGET_H
src/customWidgets/customWidgets.pri
deleted
100644 → 0
View file @
ca762f42
HEADERS += \
src/customWidgets/UBMediaWidget.h \
src/customWidgets/UBActionableWidget.h
SOURCES += \
src/customWidgets/UBMediaWidget.cpp \
src/customWidgets/UBActionableWidget.cpp
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