Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JuK
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
JuK
Commits
c4195357
Commit
c4195357
authored
Mar 11, 2002
by
Scott Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a lot of little bugs to get rid of compiler warnings.
svn path=/trunk/kdemultimedia/juk/; revision=142327
parent
da02d118
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
44 deletions
+38
-44
customaction.cpp
customaction.cpp
+1
-6
customaction.h
customaction.h
+1
-1
filelist.cpp
filelist.cpp
+3
-3
filelistitem.h
filelistitem.h
+1
-1
genrelist.cpp
genrelist.cpp
+2
-2
player.cpp
player.cpp
+4
-4
slideraction.cpp
slideraction.cpp
+23
-23
slideraction.h
slideraction.h
+3
-4
No files found.
customaction.cpp
View file @
c4195357
...
...
@@ -68,7 +68,7 @@ void CustomAction::unplug(QWidget *parent)
toolbar
->
removeItem
(
itemId
(
index
));
removeContainer
(
index
);
toolbar
=
NULL
;
toolbar
=
0
;
}
}
}
...
...
@@ -81,8 +81,3 @@ KToolBar *CustomAction::getToolBar()
{
return
(
toolbar
);
}
QWidget
*
CustomAction
::
createWidget
(
QWidget
*
parent
)
// virtual, should be reimplemented in subclasses
{
return
(
0
);
}
customaction.h
View file @
c4195357
...
...
@@ -36,12 +36,12 @@ public:
protected:
KToolBar
*
getToolBar
();
virtual
QWidget
*
createWidget
(
QWidget
*
parent
);
QWidget
*
customWidget
;
KToolBar
*
toolbar
;
private:
virtual
QWidget
*
createWidget
(
QWidget
*
parent
)
=
0
;
signals:
void
pluggedIn
(
QWidget
*
parent
);
...
...
filelist.cpp
View file @
c4195357
...
...
@@ -28,18 +28,18 @@
// public members
////////////////////////////////////////////////////////////////////////////////
FileList
::
FileList
(
QWidget
*
parent
=
0
,
const
char
*
name
=
0
)
:
KListView
(
parent
,
name
)
FileList
::
FileList
(
QWidget
*
parent
,
const
char
*
name
)
:
KListView
(
parent
,
name
)
{
setup
();
}
FileList
::
FileList
(
QString
item
,
QWidget
*
parent
=
0
,
const
char
*
name
=
0
)
:
KListView
(
parent
,
name
)
FileList
::
FileList
(
QString
item
,
QWidget
*
parent
,
const
char
*
name
)
:
KListView
(
parent
,
name
)
{
setup
();
append
(
item
);
}
FileList
::
FileList
(
QStringList
*
items
,
QWidget
*
parent
=
0
,
const
char
*
name
=
0
)
:
KListView
(
parent
,
name
)
FileList
::
FileList
(
QStringList
*
items
,
QWidget
*
parent
,
const
char
*
name
)
:
KListView
(
parent
,
name
)
{
setup
();
append
(
items
);
...
...
filelistitem.h
View file @
c4195357
...
...
@@ -36,7 +36,7 @@ public:
protected:
private:
virtual
int
compare
(
QListViewItem
*
item
,
int
column
,
bool
ascending
)
const
;
int
compare
(
QListViewItem
*
item
,
int
column
,
bool
ascending
)
const
;
int
compare
(
FileListItem
*
firstItem
,
FileListItem
*
secondItem
,
int
column
,
bool
ascending
)
const
;
QFileInfo
*
fileInfo
;
Tag
*
tag
;
...
...
genrelist.cpp
View file @
c4195357
...
...
@@ -24,12 +24,12 @@
// public members
////////////////////////////////////////////////////////////////////////////////
GenreList
::
GenreList
(
bool
createIndex
=
false
)
:
QValueList
<
Genre
>
()
GenreList
::
GenreList
(
bool
createIndex
)
:
QValueList
<
Genre
>
()
{
hasIndex
=
createIndex
;
}
GenreList
::
GenreList
(
QString
file
,
bool
createIndex
=
false
)
:
QValueList
<
Genre
>
()
GenreList
::
GenreList
(
QString
file
,
bool
createIndex
)
:
QValueList
<
Genre
>
()
{
hasIndex
=
createIndex
;
load
(
file
);
...
...
player.cpp
View file @
c4195357
...
...
@@ -55,13 +55,13 @@ Player::~Player()
delete
(
dispatcher
);
}
void
Player
::
play
(
QString
fileName
,
float
volume
=
1.0
)
void
Player
::
play
(
QString
fileName
,
float
volume
)
{
currentFile
=
fileName
;
play
(
volume
);
}
void
Player
::
play
(
float
volume
=
1.0
)
void
Player
::
play
(
float
volume
)
{
if
(
serverRunning
())
{
if
(
media
&&
media
->
state
()
==
posPaused
)
{
...
...
@@ -110,9 +110,9 @@ void Player::stop()
}
}
void
Player
::
setVolume
(
float
volume
=
1.0
)
void
Player
::
setVolume
(
float
volume
)
{
if
(
serverRunning
())
{
if
(
serverRunning
()
&&
media
&&
!
media
->
isNull
()
)
{
if
(
!
volumeControl
)
setupVolumeControl
();
if
(
volumeControl
)
{
...
...
slideraction.cpp
View file @
c4195357
...
...
@@ -55,7 +55,29 @@ QSlider *SliderAction::getVolumeSlider()
}
////////////////////////////////////////////////////////////////////////////////
// protected members
// public slots
////////////////////////////////////////////////////////////////////////////////
void
SliderAction
::
updateOrientation
(
QDockWindow
*
dockWindow
)
{
// if the toolbar is not null and either the dockWindow not defined or is the toolbar
if
(
customWidget
&&
toolbar
&&
(
!
dockWindow
||
dockWindow
==
dynamic_cast
<
QDockWindow
*>
(
toolbar
)))
{
if
(
toolbar
->
barPos
()
==
KToolBar
::
Right
||
toolbar
->
barPos
()
==
KToolBar
::
Left
)
{
trackPositionSlider
->
setOrientation
(
Qt
::
Vertical
);
volumeSlider
->
setOrientation
(
Qt
::
Vertical
);
layout
->
setDirection
(
QBoxLayout
::
TopToBottom
);
}
else
{
trackPositionSlider
->
setOrientation
(
Qt
::
Horizontal
);
volumeSlider
->
setOrientation
(
Qt
::
Horizontal
);
layout
->
setDirection
(
QBoxLayout
::
LeftToRight
);
}
}
updateSize
();
}
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
QWidget
*
SliderAction
::
createWidget
(
QWidget
*
parent
)
// virtual -- used by base class
...
...
@@ -90,28 +112,6 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
}
}
////////////////////////////////////////////////////////////////////////////////
// public slots
////////////////////////////////////////////////////////////////////////////////
void
SliderAction
::
updateOrientation
(
QDockWindow
*
dockWindow
=
NULL
)
{
// if the toolbar is not null and either the dockWindow not defined or is the toolbar
if
(
customWidget
&&
toolbar
&&
(
!
dockWindow
||
dockWindow
==
dynamic_cast
<
QDockWindow
*>
(
toolbar
)))
{
if
(
toolbar
->
barPos
()
==
KToolBar
::
Right
||
toolbar
->
barPos
()
==
KToolBar
::
Left
)
{
trackPositionSlider
->
setOrientation
(
Qt
::
Vertical
);
volumeSlider
->
setOrientation
(
Qt
::
Vertical
);
layout
->
setDirection
(
QBoxLayout
::
TopToBottom
);
}
else
{
trackPositionSlider
->
setOrientation
(
Qt
::
Horizontal
);
volumeSlider
->
setOrientation
(
Qt
::
Horizontal
);
layout
->
setDirection
(
QBoxLayout
::
LeftToRight
);
}
}
updateSize
();
}
////////////////////////////////////////////////////////////////////////////////
// private slots
////////////////////////////////////////////////////////////////////////////////
...
...
slideraction.h
View file @
c4195357
...
...
@@ -39,12 +39,11 @@ public:
QSlider
*
getTrackPositionSlider
();
public
slots
:
void
updateOrientation
(
QDockWindow
*
dockWindow
=
NULL
);
protected:
virtual
QWidget
*
createWidget
(
QWidget
*
parent
);
void
updateOrientation
(
QDockWindow
*
dockWindow
=
0
);
private:
QWidget
*
createWidget
(
QWidget
*
parent
);
QBoxLayout
*
layout
;
QSlider
*
trackPositionSlider
;
QSlider
*
volumeSlider
;
...
...
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