Changeset - 371135090df8
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 9 years ago 2017-01-01 08:47:49
hy@ozderya.net
improved color setting and integrated qcolorwidgets library as external project
8 files changed with 380 insertions and 43 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -9,166 +9,168 @@
 
# (at your option) any later version.
 
#
 
# serialplot is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
cmake_minimum_required(VERSION 2.8.11)
 

	
 
project(serialplot)
 

	
 
set(PROGRAM_NAME ${CMAKE_PROJECT_NAME} CACHE STRING "Output program name")
 
set(PROGRAM_DISPLAY_NAME "SerialPlot" CACHE STRING "Display name (menus etc) of the program")
 

	
 
# Find includes in corresponding build directories
 
set(CMAKE_INCLUDE_CURRENT_DIR ON)
 

	
 
# Instruct CMake to run moc automatically when needed.
 
set(CMAKE_AUTOMOC ON)
 

	
 
# add local path for cmake modules
 
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
 

	
 
# Find the QtWidgets library
 
find_package(Qt5Widgets)
 

	
 
# If set, cmake will download Qwt over SVN, build and use it as a static library.
 
set(BUILD_QWT true CACHE BOOL "Download and build Qwt automatically.")
 
# Find QWT or use static manually provided by user
 
set(QWT_USE_STATIC false CACHE BOOL "Use a static version of Qwt provided by user.")
 
set(QWT_STATIC_LIBRARY "" CACHE FILEPATH "Path to the static Qwt library, libqwt.a.")
 
set(QWT_STATIC_INCLUDE "" CACHE PATH "Path to the Qwt include directory when building Qwt static.")
 

	
 
if (BUILD_QWT)
 
  include(BuildQwt)
 
else (BUILD_QWT)
 
  if (QWT_USE_STATIC)
 
	set(QWT_LIBRARY ${QWT_STATIC_LIBRARY})
 
	set(QWT_INCLUDE_DIR ${QWT_STATIC_INCLUDE})
 
  else (QWT_USE_STATIC)
 
	find_package(Qwt 6.1 REQUIRED)
 
  endif (QWT_USE_STATIC)
 
endif (BUILD_QWT)
 

	
 
include(BuildQColorWidgets)
 

	
 
# includes
 
include_directories("./src" ${QWT_INCLUDE_DIR})
 
include_directories("./src" ${QWT_INCLUDE_DIR} ${QCW_INCLUDE_DIR})
 

	
 
# wrap UI and resource files
 
qt5_wrap_ui(UI_FILES
 
  src/mainwindow.ui
 
  src/portcontrol.ui
 
  src/about_dialog.ui
 
  src/snapshotview.ui
 
  src/commandpanel.ui
 
  src/commandwidget.ui
 
  src/dataformatpanel.ui
 
  src/plotcontrolpanel.ui
 
  src/numberformatbox.ui
 
  src/endiannessbox.ui
 
  src/binarystreamreadersettings.ui
 
  src/asciireadersettings.ui
 
  src/framedreadersettings.ui
 
  )
 

	
 
if (WIN32)
 
  qt5_add_resources(RES_FILES misc/icons.qrc misc/winicons.qrc)
 
else (WIN32)
 
  qt5_add_resources(RES_FILES misc/icons.qrc)
 
endif (WIN32)
 

	
 
add_executable(${PROGRAM_NAME} WIN32
 
  src/main.cpp
 
  src/mainwindow.cpp
 
  src/portcontrol.cpp
 
  src/plot.cpp
 
  src/zoomer.cpp
 
  src/hidabletabwidget.cpp
 
  src/framebuffer.cpp
 
  src/scalepicker.cpp
 
  src/scalezoomer.cpp
 
  src/portlist.cpp
 
  src/snapshot.cpp
 
  src/snapshotview.cpp
 
  src/snapshotmanager.cpp
 
  src/plotsnapshotoverlay.cpp
 
  src/commandpanel.cpp
 
  src/commandwidget.cpp
 
  src/commandedit.cpp
 
  src/dataformatpanel.cpp
 
  src/plotcontrolpanel.cpp
 
  src/tooltipfilter.cpp
 
  src/sneakylineedit.cpp
 
  src/channelmanager.cpp
 
  src/channelinfomodel.cpp
 
  src/framebufferseries.cpp
 
  src/numberformatbox.cpp
 
  src/endiannessbox.cpp
 
  src/abstractreader.cpp
 
  src/binarystreamreader.cpp
 
  src/binarystreamreadersettings.cpp
 
  src/asciireader.cpp
 
  src/asciireadersettings.cpp
 
  src/demoreader.cpp
 
  src/framedreader.cpp
 
  src/framedreadersettings.cpp
 
  src/plotmanager.cpp
 
  src/numberformat.cpp
 
  misc/windows_icon.rc
 
  ${UI_FILES}
 
  ${RES_FILES}
 
  )
 

	
 
# Use the Widgets module from Qt 5.
 
target_link_libraries(${PROGRAM_NAME} ${QWT_LIBRARY})
 
target_link_libraries(${PROGRAM_NAME} ${QWT_LIBRARY} ${QCW_LIBRARY})
 
qt5_use_modules(${PROGRAM_NAME} Widgets SerialPort)
 

	
 
if (BUILD_QWT)
 
  add_dependencies(${PROGRAM_NAME} QWT)
 
endif (BUILD_QWT)
 

	
 
# set compiler flags
 
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 

	
 
# Enable C++11 support, fail if not supported
 
include(CheckCXXCompilerFlag)
 
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
 
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
 
if(COMPILER_SUPPORTS_CXX11)
 
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 
elseif(COMPILER_SUPPORTS_CXX0X)
 
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 
else()
 
  message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
 
endif()
 

	
 
# version number
 
set(MAJOR_VERSION 0 CACHE INT "Program major version number.")
 
set(MINOR_VERSION 8 CACHE INT "Program minor version number.")
 
set(PATCH_VERSION 1 CACHE INT "Program patch version number.")
 
set(VERSION_STRING "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
 

	
 
# get revision number from mercurial
 
find_program(MERCURIAL hg)
 

	
 
if (MERCURIAL)
 
  execute_process(COMMAND ${MERCURIAL} id -i
 
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 
    RESULT_VARIABLE MERCURIAL_RESULT
 
    OUTPUT_VARIABLE VERSION_REVISION
 
    OUTPUT_STRIP_TRAILING_WHITESPACE)
 
  if(NOT MERCURIAL_RESULT EQUAL 0)
 
    set(VERSION_SCM_REVISION false)
 
  endif(NOT MERCURIAL_RESULT EQUAL 0)
 
endif (MERCURIAL)
 

	
 
if (NOT VERSION_REVISION)
 
  set(VERSION_REVISION "0")
 
endif (NOT VERSION_REVISION)
 

	
 
message("SCM revision: ${VERSION_REVISION}")
 

	
 
# configure version file
cmake/modules/BuildQColorWidgets.cmake
Show inline comments
 
new file 100644
 
#
 
# Copyright © 2017 Hasan Yavuz Özderya
 
#
 
# This file is part of serialplot.
 
#
 
# serialplot is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# serialplot is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
include(ExternalProject)
 

	
 
ExternalProject_Add(QCW
 
  PREFIX qcw
 
  GIT_REPOSITORY https://github.com/mbasaglia/Qt-Color-Widgets
 
  INSTALL_COMMAND "")
 

	
 
ExternalProject_Get_Property(QCW binary_dir source_dir)
 
set(QCW_LIBRARY ${binary_dir}/libColorWidgets-qt5.a)
 
set(QCW_INCLUDE_DIR ${source_dir}/include)
cmake/modules/BuildQwt.cmake
Show inline comments
 
#
 
# Copyright © 2016 Hasan Yavuz Özderya
 
#
 
# This file is part of serialplot.
 
#
 
# serialplot is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# serialplot is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
include(ExternalProject)
 

	
 
ExternalProject_Add(QWT
 
  PREFIX qwt
 
  SVN_REPOSITORY svn://svn.code.sf.net/p/qwt/code/branches/qwt-6.1
 
  # disable QwtDesigner plugin and enable static build
 
  PATCH_COMMAND sed -i -r -e "s/QWT_CONFIG\\s*\\+=\\s*QwtDesigner/#&/"
 
                          -e "s/QWT_CONFIG\\s*\\+=\\s*QwtDll/#&/"
 
                          -e "s/QWT_CONFIG\\s*\\+=\\s*QwtSvg/#&/"
 
                          -e "s/QWT_CONFIG\\s*\\+=\\s*QwtOpenGL/#&/"
 
						  -e "s|QWT_INSTALL_PREFIX\\s*=.*|QWT_INSTALL_PREFIX = <INSTALL_DIR>|"
 
							 <SOURCE_DIR>/qwtconfig.pri
 
                             <SOURCE_DIR>/qwtconfig.pri
 
  UPDATE_COMMAND ""
 
  CONFIGURE_COMMAND qmake <SOURCE_DIR>/qwt.pro
 
  )
 

	
 
ExternalProject_Get_Property(QWT install_dir)
 
set(QWT_ROOT ${install_dir})
 
set(QWT_LIBRARY ${QWT_ROOT}/lib/libqwt.a)
 
set(QWT_INCLUDE_DIR ${QWT_ROOT}/include)
serialplot.pro.user
Show inline comments
 
new file 100644
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE QtCreatorProject>
 
<!-- Written by QtCreator 3.5.1, 2017-01-01T16:17:25. -->
 
<qtcreator>
 
 <data>
 
  <variable>EnvironmentId</variable>
 
  <value type="QByteArray">{75be7855-4b40-4a75-b2d8-ba783826b955}</value>
 
 </data>
 
 <data>
 
  <variable>ProjectExplorer.Project.ActiveTarget</variable>
 
  <value type="int">0</value>
 
 </data>
 
 <data>
 
  <variable>ProjectExplorer.Project.EditorSettings</variable>
 
  <valuemap type="QVariantMap">
 
   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
 
   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
 
   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
 
   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
 
    <value type="QString" key="language">Cpp</value>
 
    <valuemap type="QVariantMap" key="value">
 
     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
 
    </valuemap>
 
   </valuemap>
 
   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
 
    <value type="QString" key="language">QmlJS</value>
 
    <valuemap type="QVariantMap" key="value">
 
     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
 
    </valuemap>
 
   </valuemap>
 
   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
 
   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
 
   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
 
   <value type="int" key="EditorConfiguration.IndentSize">4</value>
 
   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
 
   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
 
   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
 
   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
 
   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
 
   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
 
   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
 
   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
 
   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
 
   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
 
   <value type="int" key="EditorConfiguration.TabSize">8</value>
 
   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
 
   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
 
   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
 
   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
 
   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
 
   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
 
  </valuemap>
 
 </data>
 
 <data>
 
  <variable>ProjectExplorer.Project.PluginSettings</variable>
 
  <valuemap type="QVariantMap"/>
 
 </data>
 
 <data>
 
  <variable>ProjectExplorer.Project.Target.0</variable>
 
  <valuemap type="QVariantMap">
 
   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
 
   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
 
   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5b76ccd6-39cb-4bf8-aef1-7eda73647436}</value>
 
   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
 
   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
 
   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
 
   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
 
    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/heyyo/working/qtbuilds/build-serialplot-Desktop-Debug</value>
 
    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 
      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
 
      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
 
     </valuemap>
 
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 
      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 
      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
 
      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
 
     </valuemap>
 
     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 
    </valuemap>
 
    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 
      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 
      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
 
      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
 
     </valuemap>
 
     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 
    </valuemap>
 
    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 
    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 
    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 
    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
 
    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
 
   </valuemap>
 
   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
 
    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/heyyo/working/qtbuilds/build-serialplot-Desktop-Release</value>
 
    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 
      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
 
      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
 
      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
 
     </valuemap>
 
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 
      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 
      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
 
      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
 
     </valuemap>
 
     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 
    </valuemap>
 
    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 
      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 
      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
 
      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 
      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
 
     </valuemap>
 
     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 
    </valuemap>
 
    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 
    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 
    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 
    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
 
    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
 
   </valuemap>
 
   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
 
   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
 
    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 
     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
 
    </valuemap>
 
    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
 
   </valuemap>
 
   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
 
   <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
 
   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
 
    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
 
    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
 
    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
 
    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
 
    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
 
    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
 
    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
 
    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 
    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
 
    <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
 
    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
 
    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
 
    <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
 
    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
 
    <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
 
    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
 
    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
 
    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
 
     <value type="int">0</value>
 
     <value type="int">1</value>
 
     <value type="int">2</value>
 
     <value type="int">3</value>
 
     <value type="int">4</value>
 
     <value type="int">5</value>
 
     <value type="int">6</value>
 
     <value type="int">7</value>
 
     <value type="int">8</value>
 
     <value type="int">9</value>
 
     <value type="int">10</value>
 
     <value type="int">11</value>
 
     <value type="int">12</value>
 
     <value type="int">13</value>
 
     <value type="int">14</value>
 
    </valuelist>
 
    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
 
    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">serialplot</value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
 
    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/heyyo/working/serialplot/serialplot.pro</value>
 
    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
 
    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">serialplot.pro</value>
 
    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
 
    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
 
    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
 
    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
 
    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
 
    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
 
    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
 
    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
 
    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
 
   </valuemap>
 
   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
 
  </valuemap>
 
 </data>
 
 <data>
 
  <variable>ProjectExplorer.Project.TargetCount</variable>
 
  <value type="int">1</value>
 
 </data>
 
 <data>
 
  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
 
  <value type="int">18</value>
 
 </data>
 
 <data>
 
  <variable>Version</variable>
 
  <value type="int">18</value>
 
 </data>
 
</qtcreator>
src/channelinfomodel.cpp
Show inline comments
 
/*
 
  Copyright © 2017 Hasan Yavuz Özderya
 

	
 
  This file is part of serialplot.
 

	
 
  serialplot is free software: you can redistribute it and/or modify
 
  it under the terms of the GNU General Public License as published by
 
  the Free Software Foundation, either version 3 of the License, or
 
  (at your option) any later version.
 

	
 
  serialplot is distributed in the hope that it will be useful,
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  GNU General Public License for more details.
 

	
 
  You should have received a copy of the GNU General Public License
 
  along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "channelinfomodel.h"
 

	
 
#include <QColor>
 
#include <QtDebug>
 

	
 
enum ChannelInfoColumn
 
{
 
    COLUMN_NAME = 0,
 
    COLUMN_VISIBILITY,
 
    COLUMN_COLOR,
 
    COLUMN_COUNT
 
};
 

	
 
const QColor colors[8] =
 
{
 
    QColor(237,97,68),
 
    QColor(92,200,96),
 
    QColor(225,98,207),
 
    QColor(163,195,58),
 
    QColor(148,123,239),
 
    QColor(212,182,52),
 
    QColor(238,82,133),
 
    QColor(219,136,44)
 
};
 

	
 
ChannelInfoModel::ChannelInfoModel(unsigned numberOfChannels, QObject* parent) :
 
    QAbstractTableModel(parent)
 
{
 
    _numOfChannels = 0;
 
    setNumOfChannels(numberOfChannels);
 
}
 

	
 
int ChannelInfoModel::rowCount(const QModelIndex &parent) const
 
{
 
    return _numOfChannels;
 
}
 

	
 
int ChannelInfoModel::columnCount(const QModelIndex & parent) const
 
{
 
    return COLUMN_COUNT;
 
}
 

	
 
Qt::ItemFlags ChannelInfoModel::flags(const QModelIndex &index) const
 
{
 
    if (index.column() == COLUMN_NAME)
 
    {
 
        return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemNeverHasChildren | Qt::ItemIsSelectable;
 
    }
 
    else if (index.column() == COLUMN_VISIBILITY)
 
    {
 
        return Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemNeverHasChildren | Qt::ItemIsSelectable;
 
    }
 
    else if (index.column() == COLUMN_COLOR)
 
    {
 
        return Qt::ItemIsEnabled | Qt::ItemNeverHasChildren | Qt::ItemIsSelectable;
 
    }
 

	
 
    return Qt::NoItemFlags;
 
}
 

	
 
QVariant ChannelInfoModel::data(const QModelIndex &index, int role) const
 
{
 
    // check index
 
    if (index.row() >= (int) _numOfChannels)
 
    {
 
        return QVariant();
 
    }
 

	
 
    // get color
 
    if (role == Qt::ForegroundRole)
 
    {
 
        return infos[index.row()].color;
 
    }
 

	
 
    // get name
 
    if (index.column() == COLUMN_NAME)
 
    {
 
        if (role == Qt::DisplayRole || role == Qt::EditRole)
 
        {
 
            return QVariant(infos[index.row()].name);
 
        }
 
        else if (role == Qt::ForegroundRole)
 
        {
 
            // TODO: support more colors than 8
 
            return colors[index.row() % 8];
 
        }
 
    }
 
    } // get visibility
 
    else if (index.column() == COLUMN_VISIBILITY)
 
    {
 
        if (role == Qt::CheckStateRole)
 
        {
 
            bool visible = infos[index.row()].visibility;
 
            return visible ? Qt::Checked : Qt::Unchecked;
 
        }
 
    }
 
    else if (index.column() == COLUMN_COLOR)
 
    {
 
        if (role == Qt::ForegroundRole || role == Qt::BackgroundRole)
 
        {
 
            return colors[index.row() % 8];
 
        }
 
    }
 

	
 
    return QVariant();
 
}
 

	
 
QVariant ChannelInfoModel::headerData(int section, Qt::Orientation orientation, int role) const
 
{
 
    if (orientation == Qt::Horizontal)
 
    {
 
        if (role == Qt::DisplayRole)
 
        {
 
            if (section == COLUMN_NAME)
 
            {
 
                return tr("Channel");
 
            }
 
            else if (section == COLUMN_VISIBILITY)
 
            {
 
                return tr("Visible");
 
            }
 
            else if (section == COLUMN_COLOR)
 
            {
 
                return tr("Color");
 
            }
 
        }
 
    }
 
    else                        // vertical
 
    {
 
        if (section < (int) _numOfChannels && role == Qt::DisplayRole)
 
        {
 
            return QString::number(section + 1);
 
        }
 
    }
 

	
 
    return QVariant();
 
}
 

	
 
bool ChannelInfoModel::setData(const QModelIndex &index, const QVariant &value, int role)
 
{
 
    // check index
 
    if (index.row() >= (int) _numOfChannels)
 
    {
 
        return false;
 
    }
 

	
 
    // set color
 
    if (role == Qt::ForegroundRole)
 
    {
 
        infos[index.row()].color = value.value<QColor>();
 
        emit dataChanged(index, index, QVector<int>({Qt::ForegroundRole}));
 
        return true;
 
    }
 

	
 
    // set name
 
    if (index.column() == COLUMN_NAME)
 
    {
 
        if (role == Qt::DisplayRole || role == Qt::EditRole)
 
        {
 
            infos[index.row()].name = value.toString();
 
            return true;
 
        }
 
    }
 
    } // set visibility
 
    else if (index.column() == COLUMN_VISIBILITY)
 
    {
 
        if (role == Qt::CheckStateRole)
 
        {
 
            bool checked = value.toInt() == Qt::Checked;
 
            infos[index.row()].visibility = checked;
 
            return true;
 
        }
 
    }
 

	
 
    // invalid index/role
 
    return false;
 
}
 

	
 
void ChannelInfoModel::setNumOfChannels(unsigned number)
 
{
 
    if (number == _numOfChannels) return;
 

	
 
    bool isInserting = number > _numOfChannels;
 
    if (isInserting)
 
    {
 
        beginInsertRows(QModelIndex(), _numOfChannels, number-1);
 
    }
 
    else
 
    {
 
        beginRemoveRows(QModelIndex(), number, _numOfChannels-1);
 
    }
 

	
 
    // we create channel info but never remove channel info to
 
    // remember user entered info
 
    if ((int) number > infos.length())
 
    {
 
        for (unsigned ci = _numOfChannels; ci < number; ci++)
 
        {
 
            infos.append({QString("Channel %1").arg(ci+1), true});
 
            infos.append({QString("Channel %1").arg(ci+1), true, colors[ci % 8]});
 
        }
 
    }
 

	
 
    // make sure newly available channels are visible, we don't
 
    // remember visibility option intentionally so that user doesn't
 
    // get confused
 
    if (number > _numOfChannels)
 
    {
 
        for (unsigned ci = _numOfChannels; ci < number; ci++)
 
        {
 
            infos[ci].visibility = true;
 
        }
 
    }
 

	
 
    _numOfChannels = number;
 

	
 
    if (isInserting)
 
    {
 
        endInsertRows();
 
    }
 
    else
 
    {
 
        endRemoveRows();
 
    }
 
}
src/channelinfomodel.h
Show inline comments
 
/*
 
  Copyright © 2017 Hasan Yavuz Özderya
 

	
 
  This file is part of serialplot.
 

	
 
  serialplot is free software: you can redistribute it and/or modify
 
  it under the terms of the GNU General Public License as published by
 
  the Free Software Foundation, either version 3 of the License, or
 
  (at your option) any later version.
 

	
 
  serialplot is distributed in the hope that it will be useful,
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  GNU General Public License for more details.
 

	
 
  You should have received a copy of the GNU General Public License
 
  along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#ifndef CHANNELINFOMODEL_H
 
#define CHANNELINFOMODEL_H
 

	
 
#include <QAbstractTableModel>
 
#include <QStringList>
 
#include <QColor>
 

	
 
class ChannelInfoModel : public QAbstractTableModel
 
{
 
    Q_OBJECT
 

	
 
public:
 
    explicit ChannelInfoModel(unsigned numberOfChannels, QObject *parent = 0);
 

	
 
    // implemented from QAbstractItemModel
 
    int           rowCount(const QModelIndex &parent = QModelIndex()) const;
 
    int           columnCount(const QModelIndex &parent = QModelIndex()) const;
 
    QVariant      data(const QModelIndex &index, int role = Qt::DisplayRole) const;
 
    bool          setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
 
    Qt::ItemFlags flags(const QModelIndex &index) const;
 
    QVariant      headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
 

	
 
    void setNumOfChannels(unsigned number);
 

	
 
private:
 
    struct ChannelInfo
 
    {
 
        QString name;
 
        bool visibility;
 
        QColor color;
 
    };
 

	
 
    unsigned _numOfChannels;     ///< @note this is not necessarily the length of `infos`
 

	
 
    /**
 
     * Channel info is added here but never removed so that we can
 
     * remember user entered names.
 
     */
 
    QList<ChannelInfo> infos;
 
};
 

	
 
#endif // CHANNELINFOMODEL_H
src/main.cpp
Show inline comments
 
/*
 
  Copyright © 2015 Hasan Yavuz Özderya
 

	
 
  This file is part of serialplot.
 

	
 
  serialplot is free software: you can redistribute it and/or modify
 
  it under the terms of the GNU General Public License as published by
 
  the Free Software Foundation, either version 3 of the License, or
 
  (at your option) any later version.
 

	
 
  serialplot is distributed in the hope that it will be useful,
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  GNU General Public License for more details.
 

	
 
  You should have received a copy of the GNU General Public License
 
  along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include <QApplication>
 
#include <QtGlobal>
 

	
 
#include "mainwindow.h"
 
#include "tooltipfilter.h"
 
#include "version.h"
 

	
 
// test code
 
#include <QTableView>
 
#include <QSpinBox>
 
#include <QColorDialog>
 
#include "channelinfomodel.h"
 
#include "utils.h"
 

	
 
#include "color_selector.hpp"
 
#include "color_dialog.hpp"
 

	
 
MainWindow* pMainWindow;
 

	
 
void messageHandler(QtMsgType type, const QMessageLogContext &context,
 
                    const QString &msg)
 
{
 
    // TODO: don't call MainWindow::messageHandler if window is destroyed
 
    pMainWindow->messageHandler(type, context, msg);
 
}
 

	
 
int main(int argc, char *argv[])
 
{
 
    QApplication a(argc, argv);
 
    MainWindow w;
 
    pMainWindow = &w;
 

	
 
    qInstallMessageHandler(messageHandler);
 

	
 
    ToolTipFilter ttf;
 
    a.installEventFilter(&ttf);
 

	
 
    // log application information
 
    qDebug() << "SerialPlot" << VERSION_STRING;
 
    qDebug() << "Revision" << VERSION_REVISION;
 

	
 
    w.show();
 

	
 
    // test code
 
    ChannelInfoModel cim(10, &a);
 
    ChannelInfoModel cim(2, &a);
 
    QTableView tv;
 
    QSpinBox cb;
 

	
 
    QObject::connect(&cb, SELECT<int>::OVERLOAD_OF(&QSpinBox::valueChanged), [&cim](int value)
 
                     {
 
                         cim.setNumOfChannels(value);
 
                     });
 

	
 
    tv.setModel(&cim);
 

	
 
    tv.show();
 
    // cb.show();
 

	
 
    // cim.setNumOfChannels(3);
 
    // cim.setNumOfChannels(10);
 
    // cim.setNumOfChannels(7);
 
    cim.setNumOfChannels(3);
 
    cim.setNumOfChannels(7);
 
    cim.setNumOfChannels(10);
 

	
 

	
 
    color_widgets::ColorSelector cpicker;
 
    cpicker.setColor(QColor("red"));
 
    cpicker.show();
 

	
 
    QObject::connect(tv.selectionModel(), &QItemSelectionModel::currentRowChanged,
 
                     [&cim, &cpicker](const QModelIndex &current, const QModelIndex &previous)
 
                     {
 
                         cpicker.setColor(cim.data(current, Qt::ForegroundRole).value<QColor>());
 
                     });
 

	
 
    QObject::connect(&cpicker, &color_widgets::ColorSelector::colorChanged,
 
                     [&cim, &tv](QColor color)
 
                     {
 
                         auto index = tv.selectionModel()->currentIndex();
 
                         index = index.sibling(index.row(), 0);
 
                         cim.setData(index, color, Qt::ForegroundRole);
 
                     });
 

	
 
    return a.exec();
 
}
src/plotcontrolpanel.ui
Show inline comments
 
<?xml version="1.0" encoding="UTF-8"?>
 
<ui version="4.0">
 
 <class>PlotControlPanel</class>
 
 <widget class="QWidget" name="PlotControlPanel">
 
  <property name="geometry">
 
   <rect>
 
    <x>0</x>
 
    <y>0</y>
 
    <width>590</width>
 
    <height>187</height>
 
   </rect>
 
  </property>
 
  <property name="windowTitle">
 
   <string>Form</string>
 
  </property>
 
  <layout class="QHBoxLayout" name="horizontalLayout">
 
   <item>
 
    <layout class="QVBoxLayout" name="verticalLayout">
 
     <item>
 
      <widget class="QLabel" name="label_2">
 
       <property name="styleSheet">
 
        <string notr="true">font-weight: bold;</string>
 
       </property>
 
       <property name="text">
 
        <string>Channel Names:</string>
 
       </property>
 
      </widget>
 
      <layout class="QHBoxLayout" name="horizontalLayout_2">
 
       <item>
 
        <widget class="QLabel" name="label_4">
 
         <property name="text">
 
          <string>Channel Names:</string>
 
         </property>
 
        </widget>
 
       </item>
 
       <item>
 
        <widget class="color_widgets::ColorSelector" name="colorSelector" native="true">
 
         <property name="sizePolicy">
 
          <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
 
           <horstretch>0</horstretch>
 
           <verstretch>0</verstretch>
 
          </sizepolicy>
 
         </property>
 
        </widget>
 
       </item>
 
      </layout>
 
     </item>
 
     <item>
 
      <widget class="QListView" name="lvChannelNames">
 
       <property name="maximumSize">
 
        <size>
 
         <width>16777215</width>
 
         <height>170</height>
 
        </size>
 
       </property>
 
      </widget>
 
     </item>
 
    </layout>
 
   </item>
 
   <item>
 
    <widget class="Line" name="line">
 
     <property name="orientation">
 
      <enum>Qt::Vertical</enum>
 
     </property>
 
    </widget>
 
   </item>
 
   <item>
 
    <layout class="QFormLayout" name="formLayout_2">
 
     <property name="fieldGrowthPolicy">
 
      <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
 
     </property>
 
     <item row="0" column="0">
 
      <widget class="QLabel" name="label_3">
 
       <property name="text">
 
        <string>Number Of Samples:</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="0" column="1">
 
      <widget class="QSpinBox" name="spNumOfSamples">
 
       <property name="toolTip">
 
        <string>length of X axis</string>
 
       </property>
 
       <property name="keyboardTracking">
 
        <bool>false</bool>
 
       </property>
 
       <property name="minimum">
 
        <number>2</number>
 
       </property>
 
       <property name="maximum">
 
        <number>1000000</number>
 
       </property>
 
       <property name="value">
 
        <number>1000</number>
 
@@ -116,51 +127,59 @@
 
       <property name="value">
 
        <double>1000.000000000000000</double>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="3" column="0">
 
      <widget class="QLabel" name="lYmin">
 
       <property name="enabled">
 
        <bool>false</bool>
 
       </property>
 
       <property name="text">
 
        <string>Ymin</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="3" column="1">
 
      <widget class="QDoubleSpinBox" name="spYmin">
 
       <property name="enabled">
 
        <bool>false</bool>
 
       </property>
 
       <property name="maximumSize">
 
        <size>
 
         <width>75</width>
 
         <height>16777215</height>
 
        </size>
 
       </property>
 
       <property name="toolTip">
 
        <string>lower limit of Y axis</string>
 
       </property>
 
       <property name="value">
 
        <double>0.000000000000000</double>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="4" column="0">
 
      <widget class="QLabel" name="label">
 
       <property name="text">
 
        <string>Select Range Preset:</string>
 
       </property>
 
      </widget>
 
     </item>
 
     <item row="4" column="1">
 
      <widget class="QComboBox" name="cbRangePresets"/>
 
     </item>
 
    </layout>
 
   </item>
 
  </layout>
 
 </widget>
 
 <customwidgets>
 
  <customwidget>
 
   <class>color_widgets::ColorSelector</class>
 
   <extends>QWidget</extends>
 
   <header>color_selector.hpp</header>
 
   <container>1</container>
 
  </customwidget>
 
 </customwidgets>
 
 <resources/>
 
 <connections/>
 
</ui>
0 comments (0 inline, 0 general)