diff --git a/.appveyor.yml b/.appveyor.yml --- a/.appveyor.yml +++ b/.appveyor.yml @@ -46,51 +46,51 @@ build_script: - cmd: >- mkdir %CMAKE_INSTALL_ROOT% - + mkdir work - + cinst ninja - + cd work - + git clone -q git://anongit.kde.org/extra-cmake-modules.git - + cd extra-cmake-modules - + cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% - + ninja install - + cd %APPVEYOR_BUILD_FOLDER% - + mkdir %APPVEYOR_BUILD_FOLDER%-build - + cd %APPVEYOR_BUILD_FOLDER%-build - + cmake %APPVEYOR_BUILD_FOLDER% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% -DBUILD_GUI=ON - + cmake --build . --target ALL_BUILD --config %CONFIGURATION% - + mkdir AtCore_Test_Client-%commit%-win32 - - mkdir AtCore_Test_Client-%commit%-win32\plugins - + + mkdir AtCore_Test_Client-%commit%-win32\plugins + move %APPVEYOR_BUILD_FOLDER%-build\bin\%CONFIGURATION%\AtCore.dll AtCore_Test_Client-%commit%-win32\ - + move %APPVEYOR_BUILD_FOLDER%-build\bin\%CONFIGURATION%\AtCoreWidgets.dll AtCore_Test_Client-%commit%-win32\ - + move %APPVEYOR_BUILD_FOLDER%-build\bin\%CONFIGURATION%\atcore-gui.exe AtCore_Test_Client-%commit%-win32\ - + move %APPVEYOR_BUILD_FOLDER%-build\bin\%CONFIGURATION%\* AtCore_Test_Client-%commit%-win32\plugins\ - + windeployqt --compiler-runtime AtCore_Test_Client-%commit%-win32/atcore-gui.exe - + for %%I in (%ATCORE_LIBS%) do copy %QTBIN%\%%I AtCore_Test_Client-%commit%-win32\ - + 7z a -tzip AtCore_Test_Client-win.zip AtCore_Test_Client-%commit%-win32 -r - + copy %APPVEYOR_BUILD_FOLDER%-build\AtCore_Test_Client-win.zip %APPVEYOR_BUILD_FOLDER%\AtCore_Test_Client-win.zip - + artifacts: - path: AtCore_Test_Client-win.zip name: AtCore diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -44,12 +44,10 @@ script: - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then source /opt/qt*/bin/qt*-env.sh; - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_GUI=ON CMakeLists.txt; + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_GUI=ON -DDEPLOY_PLUGINS_WITH_BINARY=ON CMakeLists.txt; make; sudo make install; make DESTDIR=appdir/ install; find appdir/; - mkdir -p appdir/usr/plugins; - mv appdir/usr/lib/x86_64-linux-gnu/plugins/AtCore/ appdir/usr/plugins/AtCore; rm -rf appdir/usr/include appdir/usr/mkspecs appdir/usr/lib/x86_64-linux-gnu/; wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"; chmod a+x linuxdeployqt*.AppImage; diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -29,9 +29,12 @@ See: [Building and Deploying] ## Importing AtCore in your CMakeList -CMake should find AtCore using the following in your CMakeLists +CMake should find %AtCore and link it to MYAPP using the following in your CMakeLists ```CMake include (AtCore REQUIRED COMPONATES AtCore ) +include (AtCore REQUIRED COMPONATES AtCoreWidgets ) +... +target_link_libraries(MYAPP AtCore::AtCore AtCore::AtCoreWidgets ... ) ``` ## Getting Involved diff --git a/src/widgets/plotwidget.cpp b/src/widgets/plotwidget.cpp --- a/src/widgets/plotwidget.cpp +++ b/src/widgets/plotwidget.cpp @@ -27,7 +27,7 @@ , _chart(new QChartView(this)) , _axisX(new QDateTimeAxis(this)) , _axisY(new QValueAxis(this)) - , m_maximumPoints(24) + , m_maximumPoints(120) { _axisX->setTickCount(3); diff --git a/src/widgets/sdwidget.cpp b/src/widgets/sdwidget.cpp --- a/src/widgets/sdwidget.cpp +++ b/src/widgets/sdwidget.cpp @@ -36,14 +36,20 @@ newButton = new QPushButton(tr("Print Selected")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, [this] { - emit(printSdFile(listSdFiles->currentItem()->text())); + if (listSdFiles->currentRow() != -1) + { + emit(printSdFile(listSdFiles->currentItem()->text())); + } }); newButton = new QPushButton(tr("Delete Selected")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, [this] { - emit(deleteSdFile(listSdFiles->currentItem()->text())); - listSdFiles->setCurrentRow(-1); + if (listSdFiles->currentRow() != -1) + { + emit(deleteSdFile(listSdFiles->currentItem()->text())); + listSdFiles->setCurrentRow(-1); + } }); auto groupFiles = new QGroupBox(tr("Files On Sd Card"));