mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 08:22:33 +02:00
Add basic filedropper
This commit is contained in:
parent
f482a6a43a
commit
1767bafa1f
66
qml/Components/FileDropper.qml
Normal file
66
qml/Components/FileDropper.qml
Normal file
@ -0,0 +1,66 @@
|
||||
import QtQuick 2.7
|
||||
|
||||
DropArea {
|
||||
id:dropper
|
||||
state:"invisible"
|
||||
|
||||
onEntered: {
|
||||
dropper.state = "visible"
|
||||
}
|
||||
|
||||
onExited: {
|
||||
dropper.state = "invisible"
|
||||
}
|
||||
|
||||
onDropped: {
|
||||
print(drop.urls)
|
||||
print(drop.urls)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Rectangle {
|
||||
id:fill
|
||||
anchors.fill: parent
|
||||
opacity: .8
|
||||
}
|
||||
states: [
|
||||
State {
|
||||
name: "visible"
|
||||
},
|
||||
State {
|
||||
name: "invisible"
|
||||
|
||||
PropertyChanges {
|
||||
target: fill
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "visible"
|
||||
to: "invisible"
|
||||
|
||||
NumberAnimation {
|
||||
target: fill
|
||||
property: "opacity"
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
from: "invisible"
|
||||
to: "visible"
|
||||
|
||||
NumberAnimation {
|
||||
target: fill
|
||||
property: "opacity"
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
6
src/packagefilehandler.cpp
Normal file
6
src/packagefilehandler.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "packagefilehandler.h"
|
||||
|
||||
PackageFileHandler::PackageFileHandler()
|
||||
{
|
||||
|
||||
}
|
12
src/packagefilehandler.h
Normal file
12
src/packagefilehandler.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef PACKAGEFILEHANDLER_H
|
||||
#define PACKAGEFILEHANDLER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class PackageFileHandler
|
||||
{
|
||||
public:
|
||||
PackageFileHandler();
|
||||
};
|
||||
|
||||
#endif // PACKAGEFILEHANDLER_H
|
Loading…
Reference in New Issue
Block a user