Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maui
Vvave
Commits
baa154ee
Commit
baa154ee
authored
Feb 18, 2021
by
camilo higuita
Browse files
add the common show sidebar button. tweak the progressbar slider and fix floating disk position
parent
81048ba2
Changes
6
Hide whitespace changes
Inline
Side-by-side
.clang-format
View file @
baa154ee
...
...
@@ -17,8 +17,8 @@ Standard: Cpp11
# 4 spaces indent
TabWidth: 4
#
2
* 80 wide lines
ColumnLimit:
16
0
#
3
* 80 wide lines
ColumnLimit:
24
0
# sort includes inside line separated groups
SortIncludes: true
...
...
@@ -47,9 +47,8 @@ BinPackArguments: false
# don't move parameters to own lines if they are not all on the same
BinPackParameters: false
# In case we have an if statement whith multiple lines the operator should be at the beginning of the line
# but we do not want to break assignments
BreakBeforeBinaryOperators: NonAssignment
# don't break binary ops
BreakBeforeBinaryOperators: None
# format C++11 braced lists like function calls
Cpp11BracedListStyle: true
...
...
main.qml
View file @
baa154ee
...
...
@@ -248,10 +248,20 @@ Maui.ApplicationWindow
width
:
parent
.
width
}
ProgressBar
{
id
:
_scanningProgress
width
:
parent
.
width
anchors.bottom
:
parent
.
bottom
indeterminate
:
true
visible
:
Vvave
.
scanning
}
StackView
{
id
:
_stackView
anchors.fill
:
parent
anchors.bottomMargin
:
_scanningProgress
.
height
initialItem
:
Maui.Page
{
...
...
vvave.cpp
View file @
baa154ee
...
...
@@ -54,7 +54,6 @@ vvave::vvave(QObject *parent)
if
(
!
dirPath
.
exists
())
dirPath
.
mkpath
(
"."
);
auto
tracksTimer
=
new
QTimer
(
this
);
tracksTimer
->
setSingleShot
(
true
);
tracksTimer
->
setInterval
(
1000
);
...
...
@@ -102,7 +101,6 @@ vvave::vvave(QObject *parent)
}
});
connect
(
artistTimer
,
&
QTimer
::
timeout
,
[
this
]()
{
if
(
m_newArtist
>
0
)
{
...
...
@@ -112,13 +110,6 @@ vvave::vvave(QObject *parent)
});
}
//// PUBLIC SLOTS
//vvave *vvave::qmlAttachedProperties(QObject *object)
//{
// Q_UNUSED(object)
// return vvave::instance();
//}
void
vvave
::
setFetchArtwork
(
bool
fetchArtwork
)
{
if
(
m_fetchArtwork
==
fetchArtwork
)
...
...
@@ -185,9 +176,18 @@ void vvave::scanDir(const QList<QUrl> &paths)
// fileLoader->setBatchCount(50);
connect
(
fileLoader
,
&
FMH
::
FileLoader
::
itemReady
,
db
,
&
CollectionDB
::
addTrack
);
connect
(
fileLoader
,
&
FMH
::
FileLoader
::
finished
,
fileLoader
,
&
FMH
::
FileLoader
::
deleteLater
);
connect
(
fileLoader
,
&
FMH
::
FileLoader
::
finished
,
fileLoader
,
[
this
,
fileLoader
](
FMH
::
MODEL_LIST
,
QList
<
QUrl
>
)
{
m_scanning
=
false
;
emit
scanningChanged
(
m_scanning
);
fileLoader
->
deleteLater
();
});
fileLoader
->
requestPath
(
paths
,
true
,
QStringList
()
<<
FMH
::
FILTER_LIST
[
FMH
::
FILTER_TYPE
::
AUDIO
]
<<
"*.m4a"
);
m_scanning
=
true
;
emit
scanningChanged
(
m_scanning
);
}
QStringList
vvave
::
sources
()
...
...
@@ -242,3 +242,8 @@ QList<QUrl> vvave::folders()
return
QUrl
::
fromStringList
(
FMH
::
modelToList
(
sources
,
FMH
::
MODEL_KEY
::
URL
));
}
bool
vvave
::
scanning
()
const
{
return
m_scanning
;
}
vvave.h
View file @
baa154ee
...
...
@@ -17,9 +17,9 @@ class vvave : public QObject
Q_PROPERTY
(
bool
autoScan
READ
autoScan
WRITE
setAutoScan
NOTIFY
autoScanChanged
)
Q_PROPERTY
(
bool
fetchArtwork
READ
fetchArtwork
WRITE
setFetchArtwork
NOTIFY
fetchArtworkChanged
)
public:
// static vvave *qmlAttachedProperties(QObject *object);
Q_PROPERTY
(
bool
scanning
READ
scanning
NOTIFY
scanningChanged
FINAL
)
public:
static
vvave
*
instance
()
{
static
vvave
vvave
;
...
...
@@ -37,6 +37,8 @@ public:
QList
<
QUrl
>
folders
();
bool
scanning
()
const
;
public
slots
:
void
openUrls
(
const
QStringList
&
urls
);
...
...
@@ -63,6 +65,8 @@ private:
bool
m_autoScan
=
false
;
bool
m_fetchArtwork
=
false
;
bool
m_scanning
=
false
;
signals:
void
sourceAdded
(
QUrl
source
);
void
sourceRemoved
(
QUrl
source
);
...
...
@@ -74,8 +78,7 @@ signals:
void
sourcesChanged
();
void
autoScanChanged
(
bool
autoScan
);
void
fetchArtworkChanged
(
bool
fetchArtwork
);
void
scanningChanged
(
bool
scanning
);
};
//QML_DECLARE_TYPEINFO(vvave, QML_HAS_ATTACHED_PROPERTIES)
#endif // VVAVE_H
widgets/FloatingDisk.qml
View file @
baa154ee
...
...
@@ -16,7 +16,7 @@ Item
height
:
Maui
.
Style
.
iconSizes
.
large
*
(
_mouseArea
.
containsPress
?
1.19
:
1.2
)
width
:
height
x
:
root
.
footer
.
x
+
Maui
.
Style
.
space
.
medium
x
:
root
.
width
-
width
-
Maui
.
Style
.
space
.
medium
y
:
parent
.
height
-
height
-
Maui
.
Style
.
space
.
medium
parent
:
ApplicationWindow
.
overlay
...
...
widgets/PlaybackBar.qml
View file @
baa154ee
...
...
@@ -51,15 +51,7 @@ Control
color
:
Kirigami
.
Theme
.
backgroundColor
opacity
:
0.8
}
}
Maui.Separator
{
position
:
Qt
.
Horizontal
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
}
}
}
ColumnLayout
...
...
@@ -139,12 +131,12 @@ Control
width
:
progressBar
.
availableWidth
height
:
implicitHeight
color
:
"
transparent
"
opacity
:
0.4
opacity
:
progressBar
.
pressed
?
0.5
:
1
Rectangle
{
width
:
progressBar
.
visualPosition
*
parent
.
width
height
:
progressBar
.
height
height
:
progressBar
.
pressed
?
progressBar
.
height
:
5
color
:
Kirigami
.
Theme
.
highlightColor
}
}
...
...
@@ -169,6 +161,19 @@ Control
// visible: player.state !== MediaPlayer.StoppedState
background
:
Item
{}
farLeftContent
:
ToolButton
{
visible
:
_drawer
.
collapsed
icon.name
:
_drawer
.
visible
?
"
sidebar-collapse
"
:
"
sidebar-expand
"
onClicked
:
_drawer
.
toggle
()
ToolTip.delay
:
1000
ToolTip.timeout
:
5000
ToolTip.visible
:
hovered
ToolTip.text
:
i18n
(
"
Toogle SideBar
"
)
}
rightContent
:
ToolButton
{
icon.name
:
_volumeSlider
.
value
===
0
?
"
player-volume-muted
"
:
"
player-volume
"
...
...
@@ -287,4 +292,12 @@ Control
]
}
}
Maui.Separator
{
position
:
Qt
.
Horizontal
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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