renamed files to be conform with the rest of the project

This commit is contained in:
johan 2013-08-13 19:45:17 +02:00
parent 3f4f1eff74
commit 463e7626b9
7 changed files with 22 additions and 25 deletions

View File

@ -2,7 +2,7 @@
# define the minimum cmake version (as required by cmake) # define the minimum cmake version (as required by cmake)
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set(CMAKE_TOOLCHAIN_FILE /opt/raspberrypi/Toolchain-RaspberryPi.cmake) #set(CMAKE_TOOLCHAIN_FILE /opt/raspberrypi/Toolchain-RaspberryPi.cmake)
# Define the main-project name # Define the main-project name
project(Hyperion) project(Hyperion)

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
project(hyperion-remote) project(hyperion-remote)
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork) find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
@ -11,21 +12,17 @@ LINK_DIRECTORIES(${LINK_DIRECTORIES} ${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnuea
include_directories(${QT_INCLUDES}) include_directories(${QT_INCLUDES})
set(hyperion-remote_HEADERS set(hyperion-remote_HEADERS
specialoptions.h CustomParameter.h
connection.h Connection.h
colortransform.h) ColorTransformValues.h)
set(hyperion-remote_SOURCES set(hyperion-remote_SOURCES
hyperion-remote.cpp hyperion-remote.cpp
connection.cpp) Connection.cpp)
qt4_wrap_cpp(HYPERION_REMOTE_MOC_SOURCES
${hyperion-remote_HEADERS})
add_executable(hyperion-remote add_executable(hyperion-remote
${hyperion-remote_HEADERS} ${hyperion-remote_HEADERS}
${hyperion-remote_SOURCES} ${hyperion-remote_SOURCES})
${HYPERION_REMOTE_MOC_SOURCES})
qt4_use_modules(hyperion-remote qt4_use_modules(hyperion-remote
Core Core

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
struct ColorTransform struct ColorTransformValues
{ {
double valueRed; double valueRed;
double valueGreen; double valueGreen;

View File

@ -1,6 +1,6 @@
#include <stdexcept> #include <stdexcept>
#include "connection.h" #include "Connection.h"
Connection::Connection(const std::string & a, bool printJson) : Connection::Connection(const std::string & a, bool printJson) :
_printJson(printJson), _printJson(printJson),
@ -63,7 +63,7 @@ bool Connection::clearAll()
return false; return false;
} }
bool Connection::setTransform(ColorTransform *threshold, ColorTransform *gamma, ColorTransform *blacklevel, ColorTransform *whitelevel) bool Connection::setTransform(ColorTransformValues *threshold, ColorTransformValues *gamma, ColorTransformValues *blacklevel, ColorTransformValues *whitelevel)
{ {
std::cout << "Set color transforms" << std::endl; std::cout << "Set color transforms" << std::endl;
return false; return false;

View File

@ -8,7 +8,7 @@
#include <json/json.h> #include <json/json.h>
#include "colortransform.h" #include "ColorTransformValues.h"
class Connection class Connection
{ {
@ -21,7 +21,7 @@ public:
bool listPriorities(); bool listPriorities();
bool clear(int priority); bool clear(int priority);
bool clearAll(); bool clearAll();
bool setTransform(ColorTransform * threshold, ColorTransform * gamma, ColorTransform * blacklevel, ColorTransform * whitelevel); bool setTransform(ColorTransformValues * threshold, ColorTransformValues * gamma, ColorTransformValues * blacklevel, ColorTransformValues * whitelevel);
private: private:
bool sendMessage(const Json::Value & message); bool sendMessage(const Json::Value & message);

View File

@ -5,11 +5,11 @@
#include <getoptPlusPlus/getoptpp.h> #include <getoptPlusPlus/getoptpp.h>
#include "colortransform.h" #include "ColorTransformValues.h"
typedef vlofgren::PODParameter<QColor> ColorParameter; typedef vlofgren::PODParameter<QColor> ColorParameter;
typedef vlofgren::PODParameter<QImage> ImageParameter; typedef vlofgren::PODParameter<QImage> ImageParameter;
typedef vlofgren::PODParameter<ColorTransform> TransformParameter; typedef vlofgren::PODParameter<ColorTransformValues> TransformParameter;
namespace vlofgren { namespace vlofgren {
template<> template<>
@ -67,9 +67,9 @@ namespace vlofgren {
} }
template<> template<>
ColorTransform TransformParameter::validate(const std::string& s) throw (Parameter::ParameterRejected) ColorTransformValues TransformParameter::validate(const std::string& s) throw (Parameter::ParameterRejected)
{ {
ColorTransform transform; ColorTransformValues transform;
// s should be split in 3 parts // s should be split in 3 parts
// seperators are either a ',' or a space // seperators are either a ',' or a space

View File

@ -4,8 +4,8 @@
#include <getoptPlusPlus/getoptpp.h> #include <getoptPlusPlus/getoptpp.h>
#include "specialoptions.h" #include "CustomParameter.h"
#include "connection.h" #include "Connection.h"
using namespace vlofgren; using namespace vlofgren;
@ -115,10 +115,10 @@ int main(int argc, char * argv[])
} }
else if (colorTransform) else if (colorTransform)
{ {
ColorTransform threshold = argThreshold.getValue(); ColorTransformValues threshold = argThreshold.getValue();
ColorTransform gamma = argGamma.getValue(); ColorTransformValues gamma = argGamma.getValue();
ColorTransform blacklevel = argBlacklevel.getValue(); ColorTransformValues blacklevel = argBlacklevel.getValue();
ColorTransform whitelevel = argWhitelevel.getValue(); ColorTransformValues whitelevel = argWhitelevel.getValue();
connection.setTransform( connection.setTransform(
argThreshold.isSet() ? &threshold : nullptr, argThreshold.isSet() ? &threshold : nullptr,