Skip to content

Commit

Permalink
Initial push
Browse files Browse the repository at this point in the history
  • Loading branch information
Pancho63 committed Jun 13, 2016
0 parents commit 5ed1813
Show file tree
Hide file tree
Showing 14 changed files with 4,782 additions and 0 deletions.
70 changes: 70 additions & 0 deletions MyStyleSheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
QWidget
{ background-color : black; color : white;
border-color : black;
border-style: outset;
border-width: 1px;
border-radius: 5px;}

QTabWidget
{ background-color : black; color : white;
border-radius: 5px;
border-color : white;
border-style: outset;
border-width: 0px;}

QPushButton{
border-color : white;
height: 50px;
}

QPushButton:pressed{ background-color: grey; border: none;}
QPushButton:disabled{color: grey; border: grey;}

QSlider::sub-page:disabled{background: black; border: grey;}
QSlider::groove:disabled{background: black; border: grey;}

QLabel {background: transparent;
border-color : transparent}


QLineEdit{border: 1px outset grey;
font-size: 18pt;}

QLineEdit::disabled {color:grey;}

QComboBox {
font-size: 18pt;
color: white;
background-color : grey;
border: 1px outset gray;
border-radius: 3px;
padding: 1px 10px 1px 3px;
min-width: 4em;
}

QComboBox:on { /* shift the text when the popup opens */
color: white;
background-color : grey;
padding-top: 3px;
padding-left: 4px;
}
/* QComboBox gets the "on" state when the popup is open */
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
color: white;
}

QComboBox::drop-down {border-width: 0px;
color: white;
}

QComboBox::down-arrow {image: url(noimg); border-width: 0px;}

QComboBox QAbstractItemView {
color: white;
background-color : grey;
border: 2px outset lightgray;
}

QTextEdit {font: bold;font-size: 18pt;background-color :transparent;}


53 changes: 53 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* Copyright (C) 2016 François Blondel
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
(this is the zlib license)
*/

#include "worker.h"
#include <QApplication>
#include <QFile>
#include <QScreen>
#include <QDesktopWidget>
#include <QTouchEvent>

int screenWidth;
int screenHeight;

int main(int argc, char *argv[])


{

qApp->setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv);

screenWidth = (QApplication::desktop()->width());
screenHeight = (QApplication::desktop()->height());

QFile f(":/MyStyleSheet.css");
if (f.open(QIODevice::ReadOnly))
{
qApp->setStyleSheet(f.readAll());
f.close();
}

Worker worker;

return a.exec();
}
55 changes: 55 additions & 0 deletions multipushbutton.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* Copyright (C) 2016 François Blondel
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
(this is the zlib license)
*/
#ifndef MULTIPUSHBUTTON_H
#define MULTIPUSHBUTTON_H
#include <QPushButton>
#include <QTouchEvent>

class multiPushButton : public QPushButton
{Q_OBJECT
public:
multiPushButton(QWidget* parent=0): QPushButton(parent) {}

protected:

bool event(QEvent *event)
{
if (event->type()==QMouseEvent::MouseButtonPress)
{emit buttonPressed();this->setChecked(true);return true;}

if (event->type()==QMouseEvent::MouseButtonRelease)
{emit buttonReleased();this->setChecked(false);return true;}

if (event->type()==QTouchEvent::QEvent::TouchBegin)
{emit buttonPressed();this->setChecked(true);return true;}

if (event->type()==QTouchEvent::QEvent::TouchEnd)
{emit buttonReleased();this->setChecked(false);return true;}

return QPushButton::event(event);
}


signals:
void buttonPressed();
void buttonReleased();
};
#endif // MULTIPUSHBUTTON_H
61 changes: 61 additions & 0 deletions oscosc.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-02-07T14:45:53
#
#-------------------------------------------------

QT += core
QT += network



QT += widgets


TARGET = DiLuz
TEMPLATE = app


SOURCES += main.cpp\
receiveosc.cpp \
worker.cpp \
window.cpp

HEADERS += receiveosc.h \
oscpkt.hh \
worker.h \
window.h \
qbouton.h \
slideh.h \
multipushbutton.h




DISTFILES += android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/libs.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \
android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/libs.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \
android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/libs.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \
android/QtActivity.java

ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

RESOURCES += ressource.qrc

Loading

0 comments on commit 5ed1813

Please sign in to comment.