Commit 82ec352c authored by Leander Schulten's avatar Leander Schulten
Browse files

New

parent 31accc5d
import QtQuick 2.2
Rectangle{
id:underline
property real extendetWidth: 10
//property real clickX: 0
anchors.top:parent.bottom
anchors.left:parent.left
width: parent.contentWidth+extendetWidth
height: 2
radius: 1
color: "lightgreen"
//property bool hasFocus
Behavior on width {
NumberAnimation { easing.type: Easing.OutExpo; easing.amplitude: 5.0; easing.period: 2.0; duration: 800 }
}/*
Rectangle{
id:overlay
height: 2
radius: 1
color: "lightgreen"
onXChanged: ani.start()
NumberAnimation on x{
id:ani
duration: 800
easing.type: Easing.OutExpo
to: 0
alwaysRunToEnd: true
}
opacity: parent.hasFocus?1:0
Behavior on opacity{
NumberAnimation{duration:opacity==0?0:100}
}
}
NumberAnimation {
id:widthAnimation
target: overlay
property: "width"
duration: 800
easing.type: Easing.OutExpo
from:0
to:underline.width
}
onClickXChanged: function(){
if(!hasFocus){
overlay.x=clickX
widthAnimation.start();
}
}
onHasFocusChanged: console.log("focus change")
*/
}
#include "modelmanager.h"
#ifndef MODELMANAGER_H
#define MODELMANAGER_H
#include <QObject>
#include "device.h"
class ModelManager : public QObject{
Q_OBJECT
public:
Q_INVOKABLE void remove(QObject * item){
if(item)
delete item;
}
Q_INVOKABLE bool addDevice(int row, int startDMXChannel, QString name, QString desciption="",QPoint position = QPoint(-1,-1)){
qDebug()<<"addDevice : "<<row<<' ' << startDMXChannel<< ' ' << name << ' '<<desciption<<'\n';
DevicePrototype * prototype = IDBaseDataModel<DevicePrototype>::singletone()->data(row);
if(prototype){
new Device(prototype,startDMXChannel,name,desciption,position);
return true;
}
return false;
}
};
#endif // MODELMANAGER_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment