master #68
124
CMakeLists.txt
124
CMakeLists.txt
@@ -9,15 +9,81 @@ project(libs)
|
|||||||
set(PIP_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pip/cmake")
|
set(PIP_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pip/cmake")
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${PIP_CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/qad/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${PIP_CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/qad/cmake")
|
||||||
set(LIBPROJECT 1)
|
set(LIBPROJECT 1)
|
||||||
|
set(_qt_libs )
|
||||||
|
set(_qt_apps )
|
||||||
|
set(_qt_plugs)
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
include(SDKMacros)
|
include(SDKMacros)
|
||||||
|
include(QADMacros)
|
||||||
include(DeployMacros)
|
include(DeployMacros)
|
||||||
|
|
||||||
if(NOT DEFINED BUILD_NUMBER)
|
if(NOT DEFINED BUILD_NUMBER)
|
||||||
set(BUILD_NUMBER 9999)
|
set(BUILD_NUMBER 9999)
|
||||||
endif()
|
endif()
|
||||||
if("x${BUILD_NUMBER}" STREQUAL "x")
|
if("x${BUILD_NUMBER}" STREQUAL "x")
|
||||||
set(BUILD_NUMBER 0)
|
set(BUILD_NUMBER 0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if(STATIC_LIB)
|
||||||
|
set(QAD_LIB_TYPE STATIC)
|
||||||
|
add_definitions(-DQAD_STATIC_DEFINE)
|
||||||
|
set(QAD_LIB_TYPE_MSG "Static")
|
||||||
|
else()
|
||||||
|
set(QAD_LIB_TYPE SHARED)
|
||||||
|
set(QAD_LIB_TYPE_MSG "Shared")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_QAD_MAJOR 1)
|
||||||
|
set(_QAD_MINOR 9)
|
||||||
|
set(_QAD_REVISION 0)
|
||||||
|
set(_QAD_SUFFIX )
|
||||||
|
set(_QAD_COMPANY SHS)
|
||||||
|
set(_QAD_DOMAIN org.SHS)
|
||||||
|
set(QAD_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/qad/qad_version.h")
|
||||||
|
set_version(QAD
|
||||||
|
MAJOR "${_QAD_MAJOR}"
|
||||||
|
MINOR "${_QAD_MINOR}"
|
||||||
|
REVISION "${_QAD_REVISION}"
|
||||||
|
BUILD "${BUILD_NUMBER}"
|
||||||
|
SUFFIX "${_QAD_SUFFIX}"
|
||||||
|
OUTPUT "${QAD_VERSION_FILE}")
|
||||||
|
set_deploy_property(QAD ${QAD_LIB_TYPE}
|
||||||
|
FULLNAME "${_QAD_DOMAIN}.*"
|
||||||
|
COMPANY "${_QAD_COMPANY}")
|
||||||
|
|
||||||
|
|
||||||
|
if(STATIC_LIB)
|
||||||
|
set(PIQt_LIB_TYPE STATIC)
|
||||||
|
add_definitions(-DPIQt_STATIC_DEFINE)
|
||||||
|
set(PIQt_LIB_TYPE_MSG "Static")
|
||||||
|
else()
|
||||||
|
set(PIQt_LIB_TYPE SHARED)
|
||||||
|
set(PIQt_LIB_TYPE_MSG "Shared")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_PIQt_MAJOR 1)
|
||||||
|
set(_PIQt_MINOR 0)
|
||||||
|
set(_PIQt_REVISION 0)
|
||||||
|
set(_PIQt_SUFFIX )
|
||||||
|
set(_PIQt_COMPANY SHS)
|
||||||
|
set(_PIQt_DOMAIN org.SHS)
|
||||||
|
if(NOT DEFINED BUILD_NUMBER)
|
||||||
|
set(BUILD_NUMBER 9999)
|
||||||
|
endif()
|
||||||
|
set(PIQt_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/piqt/piqt_version.h")
|
||||||
|
set_version(PIQt
|
||||||
|
MAJOR "${_PIQt_MAJOR}"
|
||||||
|
MINOR "${_PIQt_MINOR}"
|
||||||
|
REVISION "${_PIQt_REVISION}"
|
||||||
|
BUILD "${BUILD_NUMBER}"
|
||||||
|
SUFFIX "${_PIQt_SUFFIX}"
|
||||||
|
OUTPUT "${PIQt_VERSION_FILE}")
|
||||||
|
set_deploy_property(PIQt ${_PIQt_LIB_TYPE}
|
||||||
|
FULLNAME "${_PIQt_DOMAIN}.*"
|
||||||
|
COMPANY "${_PIQt_COMPANY}")
|
||||||
|
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/pip)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/pip)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/qad)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/qad)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/piqt)
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/piqt)
|
||||||
@@ -141,11 +207,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(UTILS)
|
#if(UTILS)
|
||||||
message(STATUS "Building with utils")
|
# message(STATUS "Building with utils")
|
||||||
else()
|
#else()
|
||||||
message(STATUS "Building only libraries")
|
# message(STATUS "Building only libraries")
|
||||||
endif()
|
#endif()
|
||||||
|
|
||||||
add_subdirectory(pip)
|
add_subdirectory(pip)
|
||||||
foreach(F ${PIP_MAIN_FOLDERS})
|
foreach(F ${PIP_MAIN_FOLDERS})
|
||||||
@@ -155,7 +221,7 @@ else()
|
|||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cd_utils" "${CMAKE_CURRENT_BINARY_DIR}/cd_utils")
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cd_utils" "${CMAKE_CURRENT_BINARY_DIR}/cd_utils")
|
||||||
set(_DIRS)
|
set(_DIRS)
|
||||||
if (SomeQtFound)
|
if (SomeQtFound)
|
||||||
message(STATUS "Building Qt-derived targets for ${QtVersions}")
|
#message(STATUS "Building Qt-derived targets for ${QtVersions}")
|
||||||
add_subdirectory(qad)
|
add_subdirectory(qad)
|
||||||
include_directories(${qad_includes})
|
include_directories(${qad_includes})
|
||||||
add_subdirectory(piqt)
|
add_subdirectory(piqt)
|
||||||
@@ -173,6 +239,52 @@ else()
|
|||||||
list(APPEND QT_MULTILIB_LIST ${_D})
|
list(APPEND QT_MULTILIB_LIST ${_D})
|
||||||
add_subdirectory(${_D})
|
add_subdirectory(${_D})
|
||||||
endforeach(_D)
|
endforeach(_D)
|
||||||
|
|
||||||
|
macro(align_list _list _out)
|
||||||
|
set(_max_len 0)
|
||||||
|
foreach(_m ${_list})
|
||||||
|
string(LENGTH "${_m}" _clen)
|
||||||
|
if (_clen GREATER _max_len)
|
||||||
|
set(_max_len ${_clen})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
set(${_out})
|
||||||
|
foreach(_m ${_list})
|
||||||
|
set(_am "${_m}")
|
||||||
|
while(TRUE)
|
||||||
|
string(LENGTH "${_am}" _clen)
|
||||||
|
if (_clen GREATER_EQUAL ${_max_len})
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
string(APPEND _am " ")
|
||||||
|
endwhile()
|
||||||
|
list(APPEND ${_out} "${_am}")
|
||||||
|
endforeach()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(print_list _list _name)
|
||||||
|
if (NOT "x${_list}" STREQUAL "x")
|
||||||
|
message("")
|
||||||
|
message(" ${_name}:")
|
||||||
|
#align_list("${_list}" _alist)
|
||||||
|
foreach(_m ${_list})
|
||||||
|
message(" * ${_m}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
message("----------QAD-----------")
|
||||||
|
message(" Build for ${QtVersions}")
|
||||||
|
message(" QAD Version: ${QAD_VERSION}")
|
||||||
|
message(" QAD Linkage: ${QAD_LIB_TYPE_MSG}")
|
||||||
|
message(" PIQt Version: ${PIQt_VERSION}")
|
||||||
|
message(" PIQt Linkage: ${PIQt_LIB_TYPE_MSG}")
|
||||||
|
print_list("${_qt_libs}" "Libraries")
|
||||||
|
print_list("${_qt_apps}" "Applications")
|
||||||
|
print_list("${_qt_plugs}" "Plugins")
|
||||||
|
message("-----------------------")
|
||||||
|
message("")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "None of Qt found, skip Qt-derived targets")
|
message(STATUS "None of Qt found, skip Qt-derived targets")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -52,6 +52,20 @@ macro(sdk_install _DIR IS_APP _TARGET _H_FILES _QM_FILES)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(copy_to_parent _inc_var)
|
||||||
|
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||||
|
set(_qt_libs ${_qt_libs} PARENT_SCOPE)
|
||||||
|
set(_qt_apps ${_qt_apps} PARENT_SCOPE)
|
||||||
|
set(_qt_plugs ${_qt_plugs} PARENT_SCOPE)
|
||||||
|
if (NOT "x${_inc_var}" STREQUAL "x")
|
||||||
|
set(${_inc_var} ${${_inc_var}} PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
if (LIB)
|
||||||
|
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
macro(add_directories_with_include multilib_prefix)
|
macro(add_directories_with_include multilib_prefix)
|
||||||
set(DIRS)
|
set(DIRS)
|
||||||
file(GLOB _dl "[^.]*")
|
file(GLOB _dl "[^.]*")
|
||||||
@@ -75,11 +89,7 @@ macro(add_directories_with_include multilib_prefix)
|
|||||||
add_subdirectory(${_d})
|
add_subdirectory(${_d})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
copy_to_parent(${inc_var})
|
||||||
set(${inc_var} ${${inc_var}} PARENT_SCOPE)
|
|
||||||
if (LIB)
|
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
@@ -92,8 +102,6 @@ macro(add_directories multilib_prefix)
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if (LIB)
|
copy_to_parent(${multilib_prefix}includes)
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|||||||
0
cmake_android.sh
Executable file → Normal file
0
cmake_android.sh
Executable file → Normal file
0
make_libs.sh
Executable file → Normal file
0
make_libs.sh
Executable file → Normal file
2
pip
2
pip
Submodule pip updated: cc580d9385...a4b3edb3e1
@@ -1,35 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||||
set(_PIQt_MAJOR 1)
|
|
||||||
set(_PIQt_MINOR 0)
|
|
||||||
set(_PIQt_REVISION 0)
|
|
||||||
set(_PIQt_SUFFIX )
|
|
||||||
set(_PIQt_COMPANY SHS)
|
|
||||||
set(_PIQt_DOMAIN org.SHS)
|
|
||||||
if(NOT DEFINED BUILD_NUMBER)
|
|
||||||
set(BUILD_NUMBER 9999)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(QADMacros)
|
|
||||||
|
|
||||||
if(STATIC_LIB)
|
|
||||||
set(PIQt_LIB_TYPE STATIC)
|
|
||||||
add_definitions(-DPIQt_STATIC_DEFINE)
|
|
||||||
else()
|
|
||||||
set(PIQt_LIB_TYPE SHARED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(PIQt_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/piqt_version.h")
|
|
||||||
set_version(PIQt
|
|
||||||
MAJOR "${_PIQt_MAJOR}"
|
|
||||||
MINOR "${_PIQt_MINOR}"
|
|
||||||
REVISION "${_PIQt_REVISION}"
|
|
||||||
BUILD "${BUILD_NUMBER}"
|
|
||||||
SUFFIX "${_PIQt_SUFFIX}"
|
|
||||||
OUTPUT "${PIQt_VERSION_FILE}")
|
|
||||||
set_deploy_property(PIQt ${_PIQt_LIB_TYPE}
|
|
||||||
FULLNAME "${_PIQt_DOMAIN}.*"
|
|
||||||
COMPANY "${_PIQt_COMPANY}")
|
|
||||||
|
|
||||||
macro(piqt_library NAME _MODULES _LIBS)
|
macro(piqt_library NAME _MODULES _LIBS)
|
||||||
_qt_project(${NAME} FALSE "PIQt" "${_MODULES}" "pip;${_LIBS}" ${ARGN})
|
_qt_project(${NAME} FALSE "PIQt" "${_MODULES}" "pip;${_LIBS}" ${ARGN})
|
||||||
@@ -48,10 +18,4 @@ if (UTILS)
|
|||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
copy_to_parent(piqt_includes)
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
|
||||||
set(piqt_includes ${piqt_includes} PARENT_SCOPE)
|
|
||||||
if (LIB)
|
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="Graphic" name="graphic">
|
<widget class="Graphic" name="graphic">
|
||||||
<property name="buttons">
|
<property name="buttons">
|
||||||
<set>Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::OnlyExpandY|Graphic::Pause|Graphic::Save</set>
|
<set>Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::Pause|Graphic::Save</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="borderInputsVisible">
|
<property name="borderInputsVisible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="/">
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -7,7 +7,7 @@ else()
|
|||||||
set(APP_ICON "icons/qpicalculator.png")
|
set(APP_ICON "icons/qpicalculator.png")
|
||||||
endif()
|
endif()
|
||||||
set(APP_INFO "Small calculator ang grapher")
|
set(APP_INFO "Small calculator ang grapher")
|
||||||
qad_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic")
|
qad_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic;pip;piqt")
|
||||||
if (Qt5_FOUND)
|
if (Qt5_FOUND)
|
||||||
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
|
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
|
||||||
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
|
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
|
||||||
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,4 +1,5 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "piqt.h"
|
||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow() {
|
MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow() {
|
||||||
@@ -62,7 +63,7 @@ void MainWindow::redrawGraphics() {
|
|||||||
graphic->setGraphicName(ti->text(1), i);
|
graphic->setGraphicName(ti->text(1), i);
|
||||||
pol.clear();
|
pol.clear();
|
||||||
if (ti->checkState(0) == Qt::Checked) {
|
if (ti->checkState(0) == Qt::Checked) {
|
||||||
if (evaluator.check(ti->text(1))) {
|
if (evaluator.check(Q2PIString(ti->text(1)))) {
|
||||||
cx = sx;
|
cx = sx;
|
||||||
while (cx < fx) {
|
while (cx < fx) {
|
||||||
evaluator.setVariable(vi, complexd(cx, 0.));
|
evaluator.setVariable(vi, complexd(cx, 0.));
|
||||||
@@ -140,19 +141,19 @@ void MainWindow::saving(QPIConfig & conf) {
|
|||||||
|
|
||||||
|
|
||||||
void MainWindow::on_lineInput_textChanged(QString text) {
|
void MainWindow::on_lineInput_textChanged(QString text) {
|
||||||
if (evaluator.check(text)) lineInput->setPalette(npal);
|
if (evaluator.check(Q2PIString(text))) lineInput->setPalette(npal);
|
||||||
else lineInput->setPalette(epal);
|
else lineInput->setPalette(epal);
|
||||||
labelParsed->setText(evaluator.expression());
|
labelParsed->setText(PI2QString(evaluator.expression()));
|
||||||
labelError->setText(evaluator.error());
|
labelError->setText(PI2QString(evaluator.error()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_lineInput_returnPressed() {
|
void MainWindow::on_lineInput_returnPressed() {
|
||||||
bool ret = evaluator.check(lineInput->text());
|
bool ret = evaluator.check(Q2PIString(lineInput->text()));
|
||||||
if (ret) lineInput->setPalette(npal);
|
if (ret) lineInput->setPalette(npal);
|
||||||
else lineInput->setPalette(epal);
|
else lineInput->setPalette(epal);
|
||||||
labelParsed->setText(evaluator.expression());
|
labelParsed->setText(PI2QString(evaluator.expression()));
|
||||||
labelError->setText(evaluator.error());
|
labelError->setText(PI2QString(evaluator.error()));
|
||||||
if (!ret) return;
|
if (!ret) return;
|
||||||
complexd val = evaluator.evaluate();
|
complexd val = evaluator.evaluate();
|
||||||
evaluator.setVariable(ans, val);
|
evaluator.setVariable(ans, val);
|
||||||
@@ -182,6 +183,16 @@ void MainWindow::on_lineInput_returnPressed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_treeGraphics_itemSelectionChanged() {
|
||||||
|
buttonGraphicDel->setDisabled(treeGraphics->selectedItems().isEmpty());
|
||||||
|
if (treeGraphics->currentItem()) {
|
||||||
|
int ind = treeGraphics->indexOfTopLevelItem(treeGraphics->currentItem());
|
||||||
|
if (ind < 0 || ind >= graphic->graphicsCount()) return;
|
||||||
|
graphic->setCurrentGraphic(ind);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column) {
|
void MainWindow::on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column) {
|
||||||
Qt::ItemFlags f = item->flags();
|
Qt::ItemFlags f = item->flags();
|
||||||
if (column != 1) f &= ~Qt::ItemIsEditable;
|
if (column != 1) f &= ~Qt::ItemIsEditable;
|
||||||
@@ -254,7 +265,7 @@ void MainWindow::on_tabWidget_currentChanged(int index) {
|
|||||||
vn = treeVariables->topLevelItem(i)->text(0);
|
vn = treeVariables->topLevelItem(i)->text(0);
|
||||||
vv = treeVariables->topLevelItem(i)->text(1);
|
vv = treeVariables->topLevelItem(i)->text(1);
|
||||||
eval.check(vv);
|
eval.check(vv);
|
||||||
evaluator.setVariable(vn, eval.evaluate());
|
evaluator.setVariable(Q2PIString(vn), eval.evaluate());
|
||||||
}
|
}
|
||||||
if (index == 0) on_lineInput_returnPressed();
|
if (index == 0) on_lineInput_returnPressed();
|
||||||
if (index == 2) redrawGraphics();
|
if (index == 2) redrawGraphics();
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "qpievaluator.h"
|
#include "pievaluator.h"
|
||||||
#include "session_manager.h"
|
#include "session_manager.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ private:
|
|||||||
void updateGraphics();
|
void updateGraphics();
|
||||||
void redrawGraphics();
|
void redrawGraphics();
|
||||||
|
|
||||||
QPIEvaluator evaluator;
|
PIEvaluator evaluator;
|
||||||
QPalette npal, epal;
|
QPalette npal, epal;
|
||||||
SessionManager session;
|
SessionManager session;
|
||||||
int ans;
|
int ans;
|
||||||
@@ -39,7 +39,7 @@ private slots:
|
|||||||
void on_lineInput_returnPressed();
|
void on_lineInput_returnPressed();
|
||||||
void on_treeHistory_itemDoubleClicked(QTreeWidgetItem * item, int column) {lineInput->setText(item->text(0));}
|
void on_treeHistory_itemDoubleClicked(QTreeWidgetItem * item, int column) {lineInput->setText(item->text(0));}
|
||||||
void on_treeVariables_itemSelectionChanged() {buttonVarDel->setDisabled(treeVariables->selectedItems().isEmpty());}
|
void on_treeVariables_itemSelectionChanged() {buttonVarDel->setDisabled(treeVariables->selectedItems().isEmpty());}
|
||||||
void on_treeGraphics_itemSelectionChanged() {buttonGraphicDel->setDisabled(treeGraphics->selectedItems().isEmpty());}
|
void on_treeGraphics_itemSelectionChanged();
|
||||||
void on_treeGraphics_itemChanged(QTreeWidgetItem * , int col) { if (active_) redrawGraphics();}
|
void on_treeGraphics_itemChanged(QTreeWidgetItem * , int col) { if (active_) redrawGraphics();}
|
||||||
void on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column);
|
void on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column);
|
||||||
void on_buttonVarAdd_clicked();
|
void on_buttonVarAdd_clicked();
|
||||||
@@ -1,23 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||||
project(qad)
|
project(qad)
|
||||||
set(_QAD_MAJOR 1)
|
|
||||||
set(_QAD_MINOR 7)
|
|
||||||
set(_QAD_REVISION 0)
|
|
||||||
set(_QAD_SUFFIX )
|
|
||||||
set(_QAD_COMPANY SHS)
|
|
||||||
set(_QAD_DOMAIN org.SHS)
|
|
||||||
|
|
||||||
include(QADMacros)
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
if(STATIC_LIB)
|
|
||||||
set(QAD_LIB_TYPE STATIC)
|
|
||||||
add_definitions(-DQAD_STATIC_DEFINE)
|
|
||||||
else()
|
|
||||||
set(QAD_LIB_TYPE SHARED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED ANDROID_PLATFORM)
|
if (NOT DEFINED ANDROID_PLATFORM)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
@@ -30,38 +16,7 @@ endif()
|
|||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
||||||
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
||||||
endif()
|
endif()
|
||||||
set(QAD_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/qad_version.h")
|
#message(STATUS "Building QAD version ${QAD_VERSION} (${QAD_LIB_TYPE})")
|
||||||
set_version(QAD
|
|
||||||
MAJOR "${_QAD_MAJOR}"
|
|
||||||
MINOR "${_QAD_MINOR}"
|
|
||||||
REVISION "${_QAD_REVISION}"
|
|
||||||
BUILD "${BUILD_NUMBER}"
|
|
||||||
SUFFIX "${_QAD_SUFFIX}"
|
|
||||||
OUTPUT "${QAD_VERSION_FILE}")
|
|
||||||
set_deploy_property(QAD ${QAD_LIB_TYPE}
|
|
||||||
FULLNAME "${_QAD_DOMAIN}.*"
|
|
||||||
COMPANY "${_QAD_COMPANY}")
|
|
||||||
message(STATUS "Building QAD version ${QAD_VERSION} (${QAD_LIB_TYPE})")
|
|
||||||
|
|
||||||
|
|
||||||
if (NOT LIBPROJECT)
|
|
||||||
if (LIB)
|
|
||||||
if(WIN32)
|
|
||||||
if(MINGW)
|
|
||||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if (DEFINED ANDROID_PLATFORM)
|
|
||||||
set(CMAKE_INSTALL_PREFIX ${ANDROID_SYSTEM_LIBRARY_PATH}/usr)
|
|
||||||
else()
|
|
||||||
set(CMAKE_INSTALL_PREFIX /usr/local)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
|
||||||
else()
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
|
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
|
||||||
|
|
||||||
@@ -81,9 +36,5 @@ if (UTILS)
|
|||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
copy_to_parent(qad_includes)
|
||||||
set(qad_includes ${qad_includes} PARENT_SCOPE)
|
|
||||||
if (LIB)
|
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ macro(_qt_install _TARGET IS_APP _DIR _HDR_VAR _QM_FILES)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
macro(qad_plugin NAME _MODULES _LIBS)
|
macro(_qt_plugin NAME _MODULES _LIBS)
|
||||||
if (NOT STATIC_LIB)
|
if (NOT STATIC_LIB)
|
||||||
if(DESIGNER_PLUGINS)
|
if(DESIGNER_PLUGINS)
|
||||||
set(PROJ_NAME qad_${NAME}_plugin)
|
set(PROJ_NAME ${NAME}_plugin)
|
||||||
include_directories("..")
|
include_directories("..")
|
||||||
add_definitions(-DQT_PLUGIN)
|
add_definitions(-DQT_PLUGIN)
|
||||||
add_definitions(-DQT_NO_DEBUG)
|
add_definitions(-DQT_NO_DEBUG)
|
||||||
@@ -17,12 +17,14 @@ macro(qad_plugin NAME _MODULES _LIBS)
|
|||||||
qt_sources(SRC)
|
qt_sources(SRC)
|
||||||
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||||
qt_add_library(${PROJ_NAME} SHARED out_CPP)
|
qt_add_library(${PROJ_NAME} SHARED out_CPP)
|
||||||
qt_target_link_libraries(${PROJ_NAME} ${_LIBS} qad_${NAME} ${_${NAME}_PLUGIN_LIBS})
|
qt_target_link_libraries(${PROJ_NAME} ${_LIBS} ${_${NAME}_PLUGIN_LIBS})
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
qt_install(TARGETS ${PROJ_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
qt_install(TARGETS ${PROJ_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
||||||
else()
|
else()
|
||||||
qt_install(TARGETS ${PROJ_NAME} DESTINATION QtPlugins/designer)
|
qt_install(TARGETS ${PROJ_NAME} DESTINATION QtPlugins/designer)
|
||||||
endif()
|
endif()
|
||||||
|
list(APPEND _qt_plugs ${NAME})
|
||||||
|
copy_to_parent("")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
@@ -35,12 +37,14 @@ macro(_qt_project NAME IS_APP DOMAIN _MODULES _LIBS)
|
|||||||
import_version(${PROJ_NAME} ${DOMAIN})
|
import_version(${PROJ_NAME} ${DOMAIN})
|
||||||
import_deploy_properties(${PROJ_NAME} ${DOMAIN})
|
import_deploy_properties(${PROJ_NAME} ${DOMAIN})
|
||||||
if (${IS_APP})
|
if (${IS_APP})
|
||||||
|
list(APPEND _qt_apps ${PROJ_NAME})
|
||||||
set_deploy_property(${PROJ_NAME}
|
set_deploy_property(${PROJ_NAME}
|
||||||
LABEL ${PROJ_NAME}
|
LABEL ${PROJ_NAME}
|
||||||
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
||||||
INFO "${APP_INFO}"
|
INFO "${APP_INFO}"
|
||||||
ICON "${APP_ICON}")
|
ICON "${APP_ICON}")
|
||||||
else()
|
else()
|
||||||
|
list(APPEND _qt_libs ${PROJ_NAME})
|
||||||
set_deploy_property(${PROJ_NAME} SHARED
|
set_deploy_property(${PROJ_NAME} SHARED
|
||||||
LABEL ${PROJ_NAME}
|
LABEL ${PROJ_NAME}
|
||||||
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
|
||||||
@@ -55,23 +59,17 @@ macro(_qt_project NAME IS_APP DOMAIN _MODULES _LIBS)
|
|||||||
if(NOT STATIC_LIB)
|
if(NOT STATIC_LIB)
|
||||||
qt_target_compile_definitions(${PROJ_NAME} PRIVATE ${DOMAIN}_SHARED_DEFINE)
|
qt_target_compile_definitions(${PROJ_NAME} PRIVATE ${DOMAIN}_SHARED_DEFINE)
|
||||||
endif()
|
endif()
|
||||||
qt_get_target(${PROJ_NAME} _some_target)
|
qt_generate_export_header(${PROJ_NAME})
|
||||||
qt_get_target(${PROJ_NAME} _targets)
|
|
||||||
foreach(_t ${_targets})
|
|
||||||
set_target_properties(${_t} PROPERTIES DEFINE_SYMBOL ${PROJ_NAME}_EXPORTS)
|
|
||||||
endforeach()
|
|
||||||
set_target_properties(${_some_target} PROPERTIES DEFINE_SYMBOL ${PROJ_NAME}_EXPORTS)
|
|
||||||
generate_export_header(${_some_target} BASE_NAME "${PROJ_NAME}")
|
|
||||||
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/${PROJ_NAME}_export.h")
|
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/${PROJ_NAME}_export.h")
|
||||||
endif()
|
endif()
|
||||||
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
|
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
|
||||||
list(APPEND QT_MULTILIB_LIST ${PROJ_NAME})
|
list(APPEND QT_MULTILIB_LIST ${PROJ_NAME})
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
#message(STATUS "Building ${PROJ_NAME}")
|
||||||
message(STATUS "Building ${PROJ_NAME}")
|
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||||
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
||||||
add_subdirectory(plugin)
|
add_subdirectory(plugin)
|
||||||
endif()
|
endif()
|
||||||
|
copy_to_parent("")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
@@ -85,3 +83,8 @@ macro(qad_application NAME _MODULES _LIBS)
|
|||||||
_qt_project(${NAME} TRUE "QAD" "${_MODULES}" "${_LIBS}")
|
_qt_project(${NAME} TRUE "QAD" "${_MODULES}" "${_LIBS}")
|
||||||
_qt_install(${NAME} TRUE "qad" "" "out_QM")
|
_qt_install(${NAME} TRUE "qad" "" "out_QM")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(qad_plugin NAME _MODULES _LIBS)
|
||||||
|
_qt_plugin(qad_${NAME} "${_MODULES}" "qad_${NAME};${_LIBS}")
|
||||||
|
endmacro()
|
||||||
|
|||||||
@@ -118,6 +118,13 @@ qt_get_targets(<name> <var>)
|
|||||||
Write all real <name> Qt target names to <var>
|
Write all real <name> Qt target names to <var>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
qt_generate_export_header(<name> ...)
|
||||||
|
|
||||||
|
Call generate_export_header on Qt multitarget
|
||||||
|
|
||||||
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
|
||||||
@@ -791,3 +798,14 @@ macro(qt_get_targets _NAME _OUT)
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
macro(qt_generate_export_header _NAME)
|
||||||
|
qt_get_target(${_NAME} _some_target)
|
||||||
|
qt_get_target(${_NAME} _targets)
|
||||||
|
foreach(_t ${_targets})
|
||||||
|
set_target_properties(${_t} PROPERTIES DEFINE_SYMBOL ${_NAME}_EXPORTS)
|
||||||
|
endforeach()
|
||||||
|
set_target_properties(${_some_target} PROPERTIES DEFINE_SYMBOL ${_NAME}_EXPORTS)
|
||||||
|
generate_export_header(${_some_target} BASE_NAME "${_NAME}" ${ARGN})
|
||||||
|
endmacro()
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
<string>OK</string>
|
<string>OK</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_application.qrc">
|
||||||
<normaloff>:/icons/dialog-ok-apply.png</normaloff>:/icons/dialog-ok-apply.png</iconset>
|
<normaloff>:/icons/dialog-ok-apply.png</normaloff>:/icons/dialog-ok-apply.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -131,7 +131,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../widgets/qad_widgets.qrc"/>
|
|
||||||
<include location="qad_application.qrc"/>
|
<include location="qad_application.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
@@ -1,34 +1,17 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>../../icons/application-exit.png</file>
|
<file>../../icons/dialog-ok-apply.png</file>
|
||||||
<file>../../icons/dialog-close.png</file>
|
|
||||||
<file>../../icons/configure.png</file>
|
<file>../../icons/configure.png</file>
|
||||||
<file>../../icons/document-edit.png</file>
|
|
||||||
<file>../../icons/document-new.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/document-save-all.png</file>
|
|
||||||
<file>../../icons/document-save-as.png</file>
|
|
||||||
<file>../../icons/document-open.png</file>
|
|
||||||
<file>../../icons/document-open-recent.png</file>
|
|
||||||
<file>../../icons/document-close.png</file>
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
<file>../../icons/edit-clear.png</file>
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
<file>../../icons/edit-find.png</file>
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
<file>../../icons/edit-copy.png</file>
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/edit-undo.png</file>
|
|
||||||
<file>../../icons/edit-redo.png</file>
|
|
||||||
<file>../../icons/border-line.png</file>
|
|
||||||
<file>../../icons/edockwidget.png</file>
|
<file>../../icons/edockwidget.png</file>
|
||||||
<file>../../icons/historyview.png</file>
|
<file>../../icons/historyview.png</file>
|
||||||
|
<file>../../icons/logview.png</file>
|
||||||
<file>../../icons/clear-history.png</file>
|
<file>../../icons/clear-history.png</file>
|
||||||
<file>../../icons/layer-visible-off.png</file>
|
<file>../../icons/layer-visible-off.png</file>
|
||||||
<file>../../icons/layer-visible-on.png</file>
|
<file>../../icons/layer-visible-on.png</file>
|
||||||
<file>../../icons/logview.png</file>
|
|
||||||
<file>../../icons/qt.png</file>
|
<file>../../icons/qt.png</file>
|
||||||
<file>../../icons/select-all.png</file>
|
<file>../../icons/select-all.png</file>
|
||||||
<file>../../icons/select-none.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -194,7 +194,7 @@
|
|||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
<string>Clone</string>
|
<string>Clone</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
<string>Remove selected</string>
|
<string>Remove selected</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -243,7 +243,7 @@
|
|||||||
<string>Remove all</string>
|
<string>Remove all</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -346,7 +346,7 @@
|
|||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
<string>Save as ...</string>
|
<string>Save as ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -406,7 +406,7 @@
|
|||||||
<string>Load ...</string>
|
<string>Load ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../application/qad_application.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
@@ -433,7 +433,7 @@
|
|||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -443,7 +443,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
<action name="actionRemove_items">
|
<action name="actionRemove_items">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -467,8 +467,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../utils/qad_utils.qrc"/>
|
|
||||||
<include location="../application/qad_application.qrc"/>
|
|
||||||
<include location="qad_blockview.qrc"/>
|
<include location="qad_blockview.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<string>Edit text ...</string>
|
<string>Edit text ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../application/qad_application.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-edit.png</normaloff>:/icons/document-edit.png</iconset>
|
<normaloff>:/icons/document-edit.png</normaloff>:/icons/document-edit.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolButtonStyle">
|
<property name="toolButtonStyle">
|
||||||
@@ -591,7 +591,7 @@
|
|||||||
<string>Load image ...</string>
|
<string>Load image ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../application/qad_application.qrc">
|
<iconset resource="qad_blockview.qrc">
|
||||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -814,7 +814,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../application/qad_application.qrc"/>
|
|
||||||
<include location="qad_blockview.qrc"/>
|
<include location="qad_blockview.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -1,39 +1,16 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>../../icons/draw-line.png</file>
|
|
||||||
<file>../../icons/align-hor.png</file>
|
|
||||||
<file>../../icons/align-ver.png</file>
|
|
||||||
<file>../../icons/dialog-close.png</file>
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
|
||||||
<file>../../icons/edit-guides.png</file>
|
|
||||||
<file>../../icons/view-grid.png</file>
|
|
||||||
<file>../../icons/zoom-fit-best.png</file>
|
|
||||||
<file>../../icons/configure.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/item.png</file>
|
|
||||||
<file>../../icons/node-add.png</file>
|
|
||||||
<file>../../icons/node.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/expand_s_x.png</file>
|
|
||||||
<file>../../icons/expand_s_y.png</file>
|
|
||||||
<file>../../icons/expand_x.png</file>
|
|
||||||
<file>../../icons/expand_y.png</file>
|
|
||||||
<file>../../icons/border-line.png</file>
|
|
||||||
<file>../../icons/legend.png</file>
|
|
||||||
<file>../../icons/blockview.png</file>
|
<file>../../icons/blockview.png</file>
|
||||||
<file>../../icons/view-fullscreen.png</file>
|
<file>../../icons/draw-line.png</file>
|
||||||
<file>../../icons/draw-ellipse.png</file>
|
<file>../../icons/draw-ellipse.png</file>
|
||||||
<file>../../icons/draw-rectangle.png</file>
|
<file>../../icons/draw-rectangle.png</file>
|
||||||
<file>../../icons/draw-text.png</file>
|
<file>../../icons/draw-text.png</file>
|
||||||
<file>../../icons/view-preview.png</file>
|
<file>../../icons/z-bottom.png</file>
|
||||||
<file>../../icons/format-fill-color.png</file>
|
<file>../../icons/z-down.png</file>
|
||||||
<file>../../icons/format-stroke-color.png</file>
|
<file>../../icons/z-top.png</file>
|
||||||
<file>../../icons/document-open.png</file>
|
<file>../../icons/z-up.png</file>
|
||||||
|
<file>../../icons/align-hor.png</file>
|
||||||
|
<file>../../icons/align-ver.png</file>
|
||||||
<file>../../icons/align-bottom-center.png</file>
|
<file>../../icons/align-bottom-center.png</file>
|
||||||
<file>../../icons/align-bottom-left.png</file>
|
<file>../../icons/align-bottom-left.png</file>
|
||||||
<file>../../icons/align-bottom-right.png</file>
|
<file>../../icons/align-bottom-right.png</file>
|
||||||
@@ -43,9 +20,15 @@
|
|||||||
<file>../../icons/align-top-center.png</file>
|
<file>../../icons/align-top-center.png</file>
|
||||||
<file>../../icons/align-top-left.png</file>
|
<file>../../icons/align-top-left.png</file>
|
||||||
<file>../../icons/align-top-right.png</file>
|
<file>../../icons/align-top-right.png</file>
|
||||||
<file>../../icons/z-bottom.png</file>
|
<file>../../icons/dialog-close.png</file>
|
||||||
<file>../../icons/z-down.png</file>
|
<file>../../icons/edit-clear.png</file>
|
||||||
<file>../../icons/z-top.png</file>
|
<file>../../icons/edit-delete.png</file>
|
||||||
<file>../../icons/z-up.png</file>
|
<file>../../icons/edit-copy.png</file>
|
||||||
|
<file>../../icons/document-save.png</file>
|
||||||
|
<file>../../icons/document-open.png</file>
|
||||||
|
<file>../../icons/document-edit.png</file>
|
||||||
|
<file>../../icons/view-preview.png</file>
|
||||||
|
<file>../../icons/format-fill-color.png</file>
|
||||||
|
<file>../../icons/format-stroke-color.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -17,9 +17,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
find_library(MARKDOWN_LIBRARY markdown)
|
find_library(MARKDOWN_LIBRARY markdown)
|
||||||
if (MARKDOWN_LIBRARY)
|
if (MARKDOWN_LIBRARY)
|
||||||
if(_mkd_header_found)
|
qad_library(doc "Core" "${MARKDOWN_LIBRARY}")
|
||||||
qad_library(doc "Core" "${MARKDOWN_LIBRARY}")
|
if(NOT _mkd_header_found)
|
||||||
else()
|
|
||||||
message(STATUS "Found markdown library, but *.h missing!")
|
message(STATUS "Found markdown library, but *.h missing!")
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
add_definitions("-DNO_MARKDOWN")
|
||||||
|
qad_library(doc "Core" "")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "markdown.h"
|
#include "markdown.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#ifndef NO_MARKDOWN
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include MARKDOWN_HEADER
|
#include MARKDOWN_HEADER
|
||||||
}
|
}
|
||||||
@@ -77,3 +78,10 @@ QString md2html(const QByteArray & src) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
QString md2html(const QByteArray & src) {
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include <QTapAndHoldGesture>
|
#include <QTapAndHoldGesture>
|
||||||
#include <QPanGesture>
|
#include <QPanGesture>
|
||||||
#include <QPinchGesture>
|
#include <QPinchGesture>
|
||||||
|
#include <QActionGroup>
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||||
# include <QRandomGenerator>
|
# include <QRandomGenerator>
|
||||||
#endif
|
#endif
|
||||||
@@ -37,6 +38,20 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this),
|
|||||||
#endif
|
#endif
|
||||||
ui = new Ui::Graphic();
|
ui = new Ui::Graphic();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
QActionGroup * agroup = new QActionGroup(this);
|
||||||
|
agroup->addAction(ui->actionGuidesFree );
|
||||||
|
agroup->addAction(ui->actionGuidesTraceX);
|
||||||
|
agroup->addAction(ui->actionGuidesTraceY);
|
||||||
|
ui->actionGuidesFree ->setProperty("_value", (int)Free );
|
||||||
|
ui->actionGuidesTraceX->setProperty("_value", (int)TraceX);
|
||||||
|
ui->actionGuidesTraceY->setProperty("_value", (int)TraceY);
|
||||||
|
ui->actionGuidesFree->setChecked(true);
|
||||||
|
connect(agroup, SIGNAL(triggered(QAction*)), this, SLOT(actionGuidesTriggered(QAction*)));
|
||||||
|
ui->checkGuides->addAction(ui->actionGuidesFree );
|
||||||
|
ui->checkGuides->addAction(ui->actionGuidesTraceX);
|
||||||
|
ui->checkGuides->addAction(ui->actionGuidesTraceY);
|
||||||
|
ui->buttonAutofit->addAction(ui->actionExpandX);
|
||||||
|
ui->buttonAutofit->addAction(ui->actionExpandY);
|
||||||
line_x_min.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
line_x_min.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
line_x_max.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
line_x_max.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
((QBoxLayout * )ui->widgetLY->layout())->insertWidget(0, &line_y_min);
|
((QBoxLayout * )ui->widgetLY->layout())->insertWidget(0, &line_y_min);
|
||||||
@@ -76,6 +91,7 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this),
|
|||||||
emaxx = emaxy = DBL_MIN;
|
emaxx = emaxy = DBL_MIN;
|
||||||
grad_x = grad_y = Auto;
|
grad_x = grad_y = Auto;
|
||||||
axis_type_x = Numeric;
|
axis_type_x = Numeric;
|
||||||
|
floating_axis_type = Free;
|
||||||
min_repaint_int = 25;
|
min_repaint_int = 25;
|
||||||
inc_x = 1.;
|
inc_x = 1.;
|
||||||
buffer = 0;
|
buffer = 0;
|
||||||
@@ -374,10 +390,7 @@ void Graphic::canvasMousePressEvent(QMouseEvent * e) {
|
|||||||
emit graphicMousePressEvent(canvas2real(QPointF(e->pos())), e->button());
|
emit graphicMousePressEvent(canvas2real(QPointF(e->pos())), e->button());
|
||||||
if (!navigation) return;
|
if (!navigation) return;
|
||||||
if (gestures && !need_mouse_pan) return;
|
if (gestures && !need_mouse_pan) return;
|
||||||
#ifdef HAS_GL
|
setGuidesCursor();
|
||||||
canvas_gl->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
#endif
|
|
||||||
ui->canvas_raster->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
prevpos = e->pos();
|
prevpos = e->pos();
|
||||||
startpos = prevpos;
|
startpos = prevpos;
|
||||||
startpos_r = canvas2real(startpos);
|
startpos_r = canvas2real(startpos);
|
||||||
@@ -393,7 +406,7 @@ void Graphic::canvasMousePressEvent(QMouseEvent * e) {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
prevaction = curaction;
|
prevaction = curaction;
|
||||||
curaction = gaMove;
|
setCurrentAction(gaMove);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -419,10 +432,7 @@ void Graphic::canvasMouseReleaseEvent(QMouseEvent * e) {
|
|||||||
if (gestures) return;
|
if (gestures) return;
|
||||||
need_mouse_pan = false;
|
need_mouse_pan = false;
|
||||||
if (!navigation) return;
|
if (!navigation) return;
|
||||||
#ifdef HAS_GL
|
setGuidesCursor();
|
||||||
canvas_gl->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
#endif
|
|
||||||
ui->canvas_raster->setCursor(guides ? Qt::BlankCursor : Qt::ArrowCursor);
|
|
||||||
QPointF tlp, brp;
|
QPointF tlp, brp;
|
||||||
QRect sr;
|
QRect sr;
|
||||||
sr = QRect(startpos, curpos).normalized();
|
sr = QRect(startpos, curpos).normalized();
|
||||||
@@ -585,18 +595,12 @@ void Graphic::setMaxVisibleTime(double val) {
|
|||||||
|
|
||||||
|
|
||||||
void Graphic::setOnlyExpandY(bool yes) {
|
void Graphic::setOnlyExpandY(bool yes) {
|
||||||
only_expand_y = yes;
|
ui->actionExpandY->setChecked(yes);
|
||||||
ui->checkExpandY->blockSignals(true);
|
|
||||||
ui->checkExpandY->setCheckable(yes);
|
|
||||||
ui->checkExpandY->blockSignals(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::setOnlyExpandX(bool yes) {
|
void Graphic::setOnlyExpandX(bool yes) {
|
||||||
only_expand_x = yes;
|
ui->actionExpandX->setChecked(yes);
|
||||||
ui->checkExpandX->blockSignals(true);
|
|
||||||
ui->checkExpandX->setCheckable(yes);
|
|
||||||
ui->checkExpandX->blockSignals(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -647,8 +651,6 @@ void Graphic::setButtons(Graphic::Buttons b) {
|
|||||||
ui->buttonAutofit->setVisible(b.testFlag(Autofit));
|
ui->buttonAutofit->setVisible(b.testFlag(Autofit));
|
||||||
ui->checkGrid->setVisible(b.testFlag(Grid));
|
ui->checkGrid->setVisible(b.testFlag(Grid));
|
||||||
ui->checkGuides->setVisible(b.testFlag(CursorAxis));
|
ui->checkGuides->setVisible(b.testFlag(CursorAxis));
|
||||||
ui->checkExpandY->setVisible(b.testFlag(OnlyExpandY));
|
|
||||||
ui->checkExpandX->setVisible(b.testFlag(OnlyExpandX));
|
|
||||||
ui->buttonFullscreen->setVisible(b.testFlag(Fullscreen));
|
ui->buttonFullscreen->setVisible(b.testFlag(Fullscreen));
|
||||||
ui->checkBorderInputs->setVisible(b.testFlag(BorderInputs));
|
ui->checkBorderInputs->setVisible(b.testFlag(BorderInputs));
|
||||||
ui->checkLegend->setVisible(b.testFlag(Legend));
|
ui->checkLegend->setVisible(b.testFlag(Legend));
|
||||||
@@ -1149,14 +1151,58 @@ void Graphic::drawGuides() {
|
|||||||
painter->resetTransform();
|
painter->resetTransform();
|
||||||
painter->setClipping(true);
|
painter->setClipping(true);
|
||||||
painter->setClipRect(QRect(gridborder.x(), 0, wid - gridborder.x(), hei - gridborder.y()));
|
painter->setClipRect(QRect(gridborder.x(), 0, wid - gridborder.x(), hei - gridborder.y()));
|
||||||
painter->drawLine(0, curpos.y(), wid, curpos.y());
|
QPoint apos = curpos;
|
||||||
painter->drawLine(curpos.x(), 0, curpos.x(), hei);
|
QPointF rpos = canvas2real(apos);
|
||||||
QString str = pointCoords(canvas2real(curpos)) + fp_size;
|
QString str;
|
||||||
|
str = pointCoords(rpos) + fp_size;
|
||||||
|
switch (floating_axis_type) {
|
||||||
|
case TraceX:
|
||||||
|
if (curGraphic >= 0 && curGraphic < graphics.size()) {
|
||||||
|
QPolygonF & pol(pause_ ? graphics[curGraphic].polyline_pause : graphics[curGraphic].polyline);
|
||||||
|
double cursor = rpos.x(), min_dist = -1, dist = 0.;
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < pol.size(); ++i) {
|
||||||
|
dist = qAbs<double>(pol[i].x() - cursor);
|
||||||
|
if (min_dist > dist || min_dist < 0) {
|
||||||
|
min_dist = dist;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (index >= 0) {
|
||||||
|
rpos = pol[index];
|
||||||
|
apos = real2canvas(rpos).toPoint();
|
||||||
|
str = pointCoords(pol[index]) + fp_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TraceY:
|
||||||
|
if (curGraphic >= 0 && curGraphic < graphics.size()) {
|
||||||
|
QPolygonF & pol(pause_ ? graphics[curGraphic].polyline_pause : graphics[curGraphic].polyline);
|
||||||
|
double cursor = rpos.y(), min_dist = -1, dist = 0.;
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < pol.size(); ++i) {
|
||||||
|
dist = qAbs<double>(pol[i].y() - cursor);
|
||||||
|
if (min_dist > dist || min_dist < 0) {
|
||||||
|
min_dist = dist;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (index >= 0) {
|
||||||
|
rpos = pol[index];
|
||||||
|
apos = real2canvas(rpos).toPoint();
|
||||||
|
str = pointCoords(pol[index]) + fp_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
painter->drawLine(0, apos.y(), wid, apos.y());
|
||||||
|
painter->drawLine(apos.x(), 0, apos.x(), hei);
|
||||||
|
QPoint p = apos + QPoint(font_sz.height() / 4., -font_sz.height() / 4.);
|
||||||
QFontMetrics fm(font());
|
QFontMetrics fm(font());
|
||||||
QRect r = fm.boundingRect(str);
|
QRect r = fm.boundingRect(str);
|
||||||
QPoint p = curpos + QPoint(font_sz.height() / 4., -font_sz.height() / 4.);
|
if (r.width() + apos.x() > wid - font_sz.height() / 2.) p.setX(apos.x() - r.width() - font_sz.height() / 4.);
|
||||||
if (r.width() + curpos.x() > wid - font_sz.height() / 2.) p.setX(curpos.x() - r.width() - font_sz.height() / 4.);
|
if (apos.y() - r.height() < font_sz.height() / 8.) p.setY(apos.y() + r.height() - font_sz.height() / 8.);
|
||||||
if (curpos.y() - r.height() < font_sz.height() / 8.) p.setY(curpos.y() + r.height() - font_sz.height() / 8.);
|
|
||||||
painter->setPen(text_color);
|
painter->setPen(text_color);
|
||||||
painter->drawText(p, str);
|
painter->drawText(p, str);
|
||||||
}
|
}
|
||||||
@@ -1287,8 +1333,7 @@ void Graphic::setCurrentAction(GraphicAction action) {
|
|||||||
curaction = action;
|
curaction = action;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case gaNone:
|
case gaNone:
|
||||||
if (guides) setCanvasCursor(Qt::BlankCursor);
|
setGuidesCursor();
|
||||||
else setCanvasCursor(Qt::ArrowCursor);
|
|
||||||
break;
|
break;
|
||||||
case gaZoomInRect:
|
case gaZoomInRect:
|
||||||
setCanvasCursor(Qt::CrossCursor);
|
setCanvasCursor(Qt::CrossCursor);
|
||||||
@@ -1314,6 +1359,14 @@ void Graphic::setCanvasCursor(QCursor cursor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Graphic::setGuidesCursor() {
|
||||||
|
if (guides) {
|
||||||
|
setCanvasCursor(floating_axis_type == Free ? Qt::BlankCursor : Qt::CrossCursor);
|
||||||
|
} else
|
||||||
|
setCanvasCursor(Qt::ArrowCursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::swapToBuffer() {
|
void Graphic::swapToBuffer() {
|
||||||
QImage timg;
|
QImage timg;
|
||||||
#ifdef HAS_GL
|
#ifdef HAS_GL
|
||||||
@@ -1461,8 +1514,7 @@ void Graphic::on_buttonConfigure_clicked() {
|
|||||||
|
|
||||||
void Graphic::on_checkGuides_toggled(bool checked) {
|
void Graphic::on_checkGuides_toggled(bool checked) {
|
||||||
guides = checked;
|
guides = checked;
|
||||||
if (guides) setCanvasCursor(Qt::BlankCursor);
|
setGuidesCursor();
|
||||||
else setCanvasCursor(Qt::ArrowCursor);
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1733,13 +1785,19 @@ void Graphic::setLegendVisible(bool visible) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Graphic::on_checkExpandY_toggled(bool checked) {
|
void Graphic::on_actionExpandX_triggered(bool checked) {
|
||||||
only_expand_y = checked;
|
|
||||||
ui->checkExpandY->setIcon(checked ? icon_exp_y : icon_exp_sy);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Graphic::on_checkExpandX_toggled(bool checked) {
|
|
||||||
only_expand_x = checked;
|
only_expand_x = checked;
|
||||||
ui->checkExpandX->setIcon(checked ? icon_exp_x : icon_exp_sx);
|
ui->actionExpandX->setIcon(checked ? icon_exp_x : icon_exp_sx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Graphic::on_actionExpandY_triggered(bool checked) {
|
||||||
|
only_expand_y = checked;
|
||||||
|
ui->actionExpandY->setIcon(checked ? icon_exp_y : icon_exp_sy);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Graphic::actionGuidesTriggered(QAction * a) {
|
||||||
|
ui->checkGuides->setChecked(true);
|
||||||
|
setFloatingAxisType((FloatingAxisType)a->property("_value").toInt());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class QAD_GRAPHIC_EXPORT Graphic: public QFrame
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_FLAGS(Buttons)
|
Q_FLAGS(Buttons)
|
||||||
Q_ENUMS(Alignment Graduation AxisType)
|
Q_ENUMS(Alignment Graduation AxisType FloatingAxisType)
|
||||||
|
|
||||||
Q_PROPERTY(QString caption READ caption WRITE setCaption)
|
Q_PROPERTY(QString caption READ caption WRITE setCaption)
|
||||||
Q_PROPERTY(QString labelX READ labelX WRITE setLabelX)
|
Q_PROPERTY(QString labelX READ labelX WRITE setLabelX)
|
||||||
@@ -113,6 +113,7 @@ class QAD_GRAPHIC_EXPORT Graphic: public QFrame
|
|||||||
Q_PROPERTY(double graduationStepX READ graduationStepX WRITE setGraduationStepX)
|
Q_PROPERTY(double graduationStepX READ graduationStepX WRITE setGraduationStepX)
|
||||||
Q_PROPERTY(double graduationStepY READ graduationStepY WRITE setGraduationStepY)
|
Q_PROPERTY(double graduationStepY READ graduationStepY WRITE setGraduationStepY)
|
||||||
Q_PROPERTY(AxisType axisType READ axisType WRITE setAxisType)
|
Q_PROPERTY(AxisType axisType READ axisType WRITE setAxisType)
|
||||||
|
Q_PROPERTY(FloatingAxisType floatingAxisType READ floatingAxisType WRITE setFloatingAxisType)
|
||||||
|
|
||||||
Q_PROPERTY(Graphic::GraphicsData graphicsData READ graphicsData WRITE setGraphicsData)
|
Q_PROPERTY(Graphic::GraphicsData graphicsData READ graphicsData WRITE setGraphicsData)
|
||||||
Q_PROPERTY(QByteArray graphicsDataRaw READ graphicsDataRaw WRITE setGraphicsDataRaw)
|
Q_PROPERTY(QByteArray graphicsDataRaw READ graphicsDataRaw WRITE setGraphicsDataRaw)
|
||||||
@@ -128,8 +129,6 @@ public:
|
|||||||
Autofit = 0x01,
|
Autofit = 0x01,
|
||||||
Grid = 0x02,
|
Grid = 0x02,
|
||||||
CursorAxis = 0x04,
|
CursorAxis = 0x04,
|
||||||
OnlyExpandY = 0x08,
|
|
||||||
OnlyExpandX = 0x10,
|
|
||||||
Fullscreen = 0x20,
|
Fullscreen = 0x20,
|
||||||
BorderInputs = 0x40,
|
BorderInputs = 0x40,
|
||||||
Legend = 0x80,
|
Legend = 0x80,
|
||||||
@@ -143,6 +142,7 @@ public:
|
|||||||
enum Alignment {Left, Right};
|
enum Alignment {Left, Right};
|
||||||
enum Graduation {Auto, Fixed};
|
enum Graduation {Auto, Fixed};
|
||||||
enum AxisType {Numeric, DateTime};
|
enum AxisType {Numeric, DateTime};
|
||||||
|
enum FloatingAxisType {Free, TraceX, TraceY};
|
||||||
Q_DECLARE_FLAGS(Buttons, Button)
|
Q_DECLARE_FLAGS(Buttons, Button)
|
||||||
|
|
||||||
QString caption() const;
|
QString caption() const;
|
||||||
@@ -200,6 +200,7 @@ public:
|
|||||||
double graduationStepX() const {return gridx;}
|
double graduationStepX() const {return gridx;}
|
||||||
double graduationStepY() const {return gridy;}
|
double graduationStepY() const {return gridy;}
|
||||||
AxisType axisType() const {return axis_type_x;}
|
AxisType axisType() const {return axis_type_x;}
|
||||||
|
FloatingAxisType floatingAxisType() const {return floating_axis_type;}
|
||||||
QVector<QPointF> graphicData(const int index = 0) const {return graphics[index].polyline;}
|
QVector<QPointF> graphicData(const int index = 0) const {return graphics[index].polyline;}
|
||||||
GraphicsData graphicsData() const;
|
GraphicsData graphicsData() const;
|
||||||
QByteArray graphicsDataRaw() const;
|
QByteArray graphicsDataRaw() const;
|
||||||
@@ -294,6 +295,7 @@ public slots:
|
|||||||
void setGraduationStepY(double sy) {gridy = sy; if (aupdate) update();}
|
void setGraduationStepY(double sy) {gridy = sy; if (aupdate) update();}
|
||||||
void setGraduationSteps(double sx, double sy) {gridx = sx; gridy = sy; if (aupdate) update();}
|
void setGraduationSteps(double sx, double sy) {gridx = sx; gridy = sy; if (aupdate) update();}
|
||||||
void setAxisType(AxisType t) {axis_type_x = t; if (aupdate) update();}
|
void setAxisType(AxisType t) {axis_type_x = t; if (aupdate) update();}
|
||||||
|
void setFloatingAxisType(FloatingAxisType t) {floating_axis_type = t; setGuidesCursor(); if (aupdate) update();}
|
||||||
|
|
||||||
void addPoint(const QPointF & p, int graphic, bool update_ = true);
|
void addPoint(const QPointF & p, int graphic, bool update_ = true);
|
||||||
void addPoint(const QPointF & p, bool update = true) {addPoint(p, curGraphic, update);}
|
void addPoint(const QPointF & p, bool update = true) {addPoint(p, curGraphic, update);}
|
||||||
@@ -346,6 +348,7 @@ protected:
|
|||||||
void updateLegend(bool es = true);
|
void updateLegend(bool es = true);
|
||||||
void updateLegendChecks();
|
void updateLegendChecks();
|
||||||
void setCanvasCursor(QCursor cursor);
|
void setCanvasCursor(QCursor cursor);
|
||||||
|
void setGuidesCursor();
|
||||||
void swapToBuffer();
|
void swapToBuffer();
|
||||||
void swapToNormal() {bufferActive = false;}
|
void swapToNormal() {bufferActive = false;}
|
||||||
void setRectToLines();
|
void setRectToLines();
|
||||||
@@ -388,6 +391,7 @@ protected:
|
|||||||
QImage icon_pause_b, icon_pause_f;
|
QImage icon_pause_b, icon_pause_f;
|
||||||
Graduation grad_x, grad_y;
|
Graduation grad_x, grad_y;
|
||||||
AxisType axis_type_x;
|
AxisType axis_type_x;
|
||||||
|
FloatingAxisType floating_axis_type;
|
||||||
double gridx, gridy, history, visible_time, inc_x, grid_numbers_x, grid_numbers_y, LN10;
|
double gridx, gridy, history, visible_time, inc_x, grid_numbers_x, grid_numbers_y, LN10;
|
||||||
double eminx, eminy, emaxx, emaxy, pause_phase, gesture_angle;
|
double eminx, eminy, emaxx, emaxy, pause_phase, gesture_angle;
|
||||||
int lastw, lasth, min_repaint_int, timer_pause, thick;
|
int lastw, lasth, min_repaint_int, timer_pause, thick;
|
||||||
@@ -417,11 +421,12 @@ protected slots:
|
|||||||
void on_buttonSave_clicked() {saveImage();}
|
void on_buttonSave_clicked() {saveImage();}
|
||||||
void on_checkGrid_toggled(bool checked) {grid = checked; update();}
|
void on_checkGrid_toggled(bool checked) {grid = checked; update();}
|
||||||
void on_checkGuides_toggled(bool checked);
|
void on_checkGuides_toggled(bool checked);
|
||||||
void on_checkExpandY_toggled(bool checked);
|
void on_actionExpandX_triggered(bool checked);
|
||||||
void on_checkExpandX_toggled(bool checked);
|
void on_actionExpandY_triggered(bool checked);
|
||||||
void on_checkBorderInputs_toggled(bool checked) {setBorderInputsVisible(checked);}
|
void on_checkBorderInputs_toggled(bool checked) {setBorderInputsVisible(checked);}
|
||||||
void on_checkLegend_toggled(bool checked) {setLegendVisible(checked);}
|
void on_checkLegend_toggled(bool checked) {setLegendVisible(checked);}
|
||||||
void on_checkPause_toggled(bool checked) {setPaused(checked);}
|
void on_checkPause_toggled(bool checked) {setPaused(checked);}
|
||||||
|
void actionGuidesTriggered(QAction * a);
|
||||||
void enterFullscreen();
|
void enterFullscreen();
|
||||||
void leaveFullscreen();
|
void leaveFullscreen();
|
||||||
|
|
||||||
@@ -436,7 +441,6 @@ signals:
|
|||||||
void cleared();
|
void cleared();
|
||||||
void visualRectChanged();
|
void visualRectChanged();
|
||||||
void graphicSettingsChanged();
|
void graphicSettingsChanged();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<string>Grid</string>
|
<string>Grid</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/view-grid.png</normaloff>:/icons/view-grid.png</iconset>
|
<normaloff>:/icons/view-grid.png</normaloff>:/icons/view-grid.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<string>Cursor axis</string>
|
<string>Cursor axis</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/edit-guides.png</normaloff>:/icons/edit-guides.png</iconset>
|
<normaloff>:/icons/edit-guides.png</normaloff>:/icons/edit-guides.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -89,41 +89,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="checkExpandY">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Only expand Y</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
|
||||||
<normaloff>:/icons/expand_s_y.png</normaloff>:/icons/expand_s_y.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="checkExpandX">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Only expand X</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
|
||||||
<normaloff>:/icons/expand_s_x.png</normaloff>:/icons/expand_s_x.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="buttonFullscreen">
|
<widget class="QToolButton" name="buttonFullscreen">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Fullscreen</string>
|
<string>Fullscreen</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../blockview/qad_blockview.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/view-fullscreen.png</normaloff>:/icons/view-fullscreen.png</iconset>
|
<normaloff>:/icons/view-fullscreen.png</normaloff>:/icons/view-fullscreen.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -134,7 +106,7 @@
|
|||||||
<string>Border inputs</string>
|
<string>Border inputs</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/border-line.png</normaloff>:/icons/border-line.png</iconset>
|
<normaloff>:/icons/border-line.png</normaloff>:/icons/border-line.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -151,7 +123,7 @@
|
|||||||
<string>Legend</string>
|
<string>Legend</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/legend.png</normaloff>:/icons/legend.png</iconset>
|
<normaloff>:/icons/legend.png</normaloff>:/icons/legend.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@@ -182,7 +154,7 @@
|
|||||||
<string>Configure ...</string>
|
<string>Configure ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -193,7 +165,7 @@
|
|||||||
<string>Save image ...</string>
|
<string>Save image ...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -220,7 +192,7 @@
|
|||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../utils/qad_utils.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -231,7 +203,7 @@
|
|||||||
<string>Close</string>
|
<string>Close</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../widgets/qad_widgets.qrc">
|
<iconset resource="qad_graphic.qrc">
|
||||||
<normaloff>:/icons/dialog-close.png</normaloff>:/icons/dialog-close.png</iconset>
|
<normaloff>:/icons/dialog-close.png</normaloff>:/icons/dialog-close.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -425,6 +397,49 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
<action name="actionGuidesFree">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Free</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionGuidesTraceX">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Trace X</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionGuidesTraceY">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Trace Y</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionExpandX">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Only expand X</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionExpandY">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Only expand Y</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Only expand Y</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
@@ -434,9 +449,6 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../utils/qad_utils.qrc"/>
|
|
||||||
<include location="../widgets/qad_widgets.qrc"/>
|
|
||||||
<include location="../blockview/qad_blockview.qrc"/>
|
|
||||||
<include location="qad_graphic.qrc"/>
|
<include location="qad_graphic.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -1,28 +1,22 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
|
<file>../../icons/expand_s_x.png</file>
|
||||||
|
<file>../../icons/expand_s_y.png</file>
|
||||||
|
<file>../../icons/expand_x.png</file>
|
||||||
|
<file>../../icons/expand_y.png</file>
|
||||||
|
<file>../../icons/pause-back.png</file>
|
||||||
|
<file>../../icons/pause-front.png</file>
|
||||||
<file>../../icons/media-playback-pause.png</file>
|
<file>../../icons/media-playback-pause.png</file>
|
||||||
<file>../../icons/dialog-close.png</file>
|
<file>../../icons/dialog-close.png</file>
|
||||||
<file>../../icons/edit-clear.png</file>
|
<file>../../icons/edit-clear.png</file>
|
||||||
<file>../../icons/edit-guides.png</file>
|
<file>../../icons/edit-guides.png</file>
|
||||||
<file>../../icons/view-grid.png</file>
|
<file>../../icons/view-grid.png</file>
|
||||||
<file>../../icons/view-autofit.png</file>
|
<file>../../icons/view-autofit.png</file>
|
||||||
|
<file>../../icons/view-fullscreen.png</file>
|
||||||
<file>../../icons/configure.png</file>
|
<file>../../icons/configure.png</file>
|
||||||
<file>../../icons/document-save.png</file>
|
<file>../../icons/document-save.png</file>
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/expand_s_x.png</file>
|
|
||||||
<file>../../icons/expand_s_y.png</file>
|
|
||||||
<file>../../icons/expand_x.png</file>
|
|
||||||
<file>../../icons/expand_y.png</file>
|
|
||||||
<file>../../icons/border-line.png</file>
|
<file>../../icons/border-line.png</file>
|
||||||
<file>../../icons/legend.png</file>
|
<file>../../icons/legend.png</file>
|
||||||
<file>../../icons/graphic.png</file>
|
<file>../../icons/graphic.png</file>
|
||||||
<file>../../icons/view-fullscreen.png</file>
|
|
||||||
<file>../../icons/pause-back.png</file>
|
|
||||||
<file>../../icons/pause-front.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -1,26 +1,11 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>../../icons/edit-table-insert-row-below.png</file>
|
|
||||||
<file>../../icons/dialog-close.png</file>
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
|
||||||
<file>../../icons/edit-guides.png</file>
|
|
||||||
<file>../../icons/view-grid.png</file>
|
|
||||||
<file>../../icons/zoom-fit-best.png</file>
|
|
||||||
<file>../../icons/configure.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/item.png</file>
|
|
||||||
<file>../../icons/node-add.png</file>
|
|
||||||
<file>../../icons/node.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/expand_s_x.png</file>
|
|
||||||
<file>../../icons/expand_s_y.png</file>
|
|
||||||
<file>../../icons/expand_x.png</file>
|
|
||||||
<file>../../icons/expand_y.png</file>
|
|
||||||
<file>../../icons/sql_table.png</file>
|
<file>../../icons/sql_table.png</file>
|
||||||
|
<file>../../icons/configure.png</file>
|
||||||
|
<file>../../icons/edit-delete.png</file>
|
||||||
|
<file>../../icons/edit-table-insert-row-below.png</file>
|
||||||
|
<file>../../icons/edit-find.png</file>
|
||||||
|
<file>../../icons/edit-clear.png</file>
|
||||||
|
<file>../../icons/list-add.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="/">
|
|
||||||
<file>../../icons/edit-clear.png</file>
|
|
||||||
<file>../../icons/document-save.png</file>
|
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
|
||||||
<file>../../icons/edit-find.png</file>
|
|
||||||
<file>../../icons/list-add.png</file>
|
|
||||||
<file>../../icons/edit-delete.png</file>
|
|
||||||
<file>../../icons/item-add.png</file>
|
|
||||||
<file>../../icons/item.png</file>
|
|
||||||
<file>../../icons/node-add.png</file>
|
|
||||||
<file>../../icons/node.png</file>
|
|
||||||
<file>../../icons/edit-copy.png</file>
|
|
||||||
<file>../../icons/edit-paste.png</file>
|
|
||||||
<file>../../icons/document-open_16.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
<string>Choose symbol</string>
|
<string>Choose symbol</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset resource="mbricks.qrc">
|
<iconset resource="qad_widgets.qrc">
|
||||||
<normaloff>:/icons/icons/mbricks_128.png</normaloff>:/icons/icons/mbricks_128.png</iconset>
|
<normaloff>:/icons/chardialog.png</normaloff>:/icons/chardialog.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="mbricks.qrc"/>
|
<include location="qad_widgets.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ QString ImageViewPlugin::group() const {
|
|||||||
|
|
||||||
|
|
||||||
QIcon ImageViewPlugin::icon() const {
|
QIcon ImageViewPlugin::icon() const {
|
||||||
return QIcon(/*":/icons/spinslider.png"*/);
|
return QIcon(":/icons/view-preview.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ QString QPointEditPlugin::group() const {
|
|||||||
|
|
||||||
|
|
||||||
QIcon QPointEditPlugin::icon() const {
|
QIcon QPointEditPlugin::icon() const {
|
||||||
return QIcon(":/icons/qpointedit.png");
|
return QIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ QString QRectEditPlugin::group() const {
|
|||||||
|
|
||||||
|
|
||||||
QIcon QRectEditPlugin::icon() const {
|
QIcon QRectEditPlugin::icon() const {
|
||||||
return QIcon(":/icons/qrectedit.png");
|
return QIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,46 +1,35 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>../../icons/go-next.png</file>
|
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
||||||
<file>../../icons/go-previous.png</file>
|
<file>../../icons/edit-copy.png</file>
|
||||||
<file>../../icons/dialog-close.png</file>
|
<file>../../icons/edit-paste.png</file>
|
||||||
<file>../../icons/edit-clear.png</file>
|
<file>../../icons/edit-find.png</file>
|
||||||
<file>../../icons/edit-guides.png</file>
|
<file>../../icons/edit-delete.png</file>
|
||||||
<file>../../icons/view-grid.png</file>
|
<file>../../icons/edit-clear.png</file>
|
||||||
<file>../../icons/zoom-fit-best.png</file>
|
<file>../../icons/dialog-ok-apply.png</file>
|
||||||
<file>../../icons/configure.png</file>
|
<file>../../icons/dialog-warning.png</file>
|
||||||
<file>../../icons/alpha.png</file>
|
<file>../../icons/tools-wizard.png</file>
|
||||||
<file>../../icons/document-save.png</file>
|
<file>../../icons/go-next.png</file>
|
||||||
<file>../../icons/edit-clear-locationbar-rtl.png</file>
|
<file>../../icons/go-previous.png</file>
|
||||||
<file>../../icons/edit-find.png</file>
|
<file>../../icons/item.png</file>
|
||||||
<file>../../icons/list-add.png</file>
|
<file>../../icons/item-add.png</file>
|
||||||
<file>../../icons/edit-delete.png</file>
|
<file>../../icons/node.png</file>
|
||||||
<file>../../icons/item-add.png</file>
|
<file>../../icons/node-add.png</file>
|
||||||
<file>../../icons/item.png</file>
|
<file>../../icons/list-add.png</file>
|
||||||
<file>../../icons/node-add.png</file>
|
<file>../../icons/document-save.png</file>
|
||||||
<file>../../icons/node.png</file>
|
<file>../../icons/document-open.png</file>
|
||||||
<file>../../icons/edit-copy.png</file>
|
<file>../../icons/alpha.png</file>
|
||||||
<file>../../icons/edit-paste.png</file>
|
<file>../../icons/chardialog.png</file>
|
||||||
<file>../../icons/expand_s_x.png</file>
|
<file>../../icons/clineedit.png</file>
|
||||||
<file>../../icons/expand_s_y.png</file>
|
<file>../../icons/colorbutton.png</file>
|
||||||
<file>../../icons/expand_x.png</file>
|
<file>../../icons/ecombobox.png</file>
|
||||||
<file>../../icons/expand_y.png</file>
|
<file>../../icons/evalspinbox.png</file>
|
||||||
<file>../../icons/border-line.png</file>
|
<file>../../icons/qcodeedit.png</file>
|
||||||
<file>../../icons/legend.png</file>
|
<file>../../icons/qpiconsole.png</file>
|
||||||
<file>../../icons/chardialog.png</file>
|
<file>../../icons/qvariantedit.png</file>
|
||||||
<file>../../icons/clineedit.png</file>
|
<file>../../icons/spinslider.png</file>
|
||||||
<file>../../icons/colorbutton.png</file>
|
<file>../../icons/code-word.png</file>
|
||||||
<file>../../icons/ecombobox.png</file>
|
<file>../../icons/f1.png</file>
|
||||||
<file>../../icons/qpiconsole.png</file>
|
<file>../../icons/scroll_spin.png</file>
|
||||||
<file>../../icons/spinslider.png</file>
|
</qresource>
|
||||||
<file>../../icons/etabwidget.png</file>
|
|
||||||
<file>../../icons/qcodeedit.png</file>
|
|
||||||
<file>../../icons/qvariantedit.png</file>
|
|
||||||
<file>../../icons/code-word.png</file>
|
|
||||||
<file>../../icons/f1.png</file>
|
|
||||||
<file>../../icons/dialog-ok-apply.png</file>
|
|
||||||
<file>../../icons/dialog-warning.png</file>
|
|
||||||
<file>../../icons/tools-wizard.png</file>
|
|
||||||
<file>../../icons/evalspinbox.png</file>
|
|
||||||
<file>../../icons/scroll_spin.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
<string>Previous</string>
|
<string>Previous</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../SHS/src/designers/SH_designer/SH_designer.qrc">
|
<iconset resource="qad_widgets.qrc">
|
||||||
<normaloff>:/icons/go-previous.png</normaloff>:/icons/go-previous.png</iconset>
|
<normaloff>:/icons/go-previous.png</normaloff>:/icons/go-previous.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
<string>Next</string>
|
<string>Next</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../SHS/src/designers/SH_designer/SH_designer.qrc">
|
<iconset resource="qad_widgets.qrc">
|
||||||
<normaloff>:/icons/go-next.png</normaloff>:/icons/go-next.png</iconset>
|
<normaloff>:/icons/go-next.png</normaloff>:/icons/go-next.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -311,7 +311,9 @@
|
|||||||
<header>ecombobox.h</header>
|
<header>ecombobox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="qad_widgets.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>buttonSearchNext</sender>
|
<sender>buttonSearchNext</sender>
|
||||||
|
|||||||
@@ -64,7 +64,9 @@
|
|||||||
<header>evalspinbox.h</header>
|
<header>evalspinbox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="qad_widgets.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>mapChanged()</slot>
|
<slot>mapChanged()</slot>
|
||||||
|
|||||||
@@ -7,21 +7,6 @@ find_qt(Qt5 Core Gui OpenGL Xml)
|
|||||||
if (NOT Qt5)
|
if (NOT Qt5)
|
||||||
message(WARNING "Building ${PROJECT_NAME} available only on Qt5!")
|
message(WARNING "Building ${PROJECT_NAME} available only on Qt5!")
|
||||||
else()
|
else()
|
||||||
if (LIBPROJECT)
|
|
||||||
include(SDKMacros)
|
|
||||||
else()
|
|
||||||
option(LIB "System install" 0)
|
|
||||||
option(DEBUG "Build with -g3" 0)
|
|
||||||
option(DESIGNER_PLUGINS "Build qt designer plugins" 1)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
|
||||||
if (DEBUG)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
|
||||||
endif()
|
|
||||||
include(DeployMacros)
|
|
||||||
endif()
|
|
||||||
if (MINGW)
|
|
||||||
find_package(MinGW REQUIRED)
|
|
||||||
endif()
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
set_version(qglengine
|
set_version(qglengine
|
||||||
MAJOR 1
|
MAJOR 1
|
||||||
@@ -47,37 +32,15 @@ else()
|
|||||||
INFO "QGLEngine core library")
|
INFO "QGLEngine core library")
|
||||||
make_rc(qglengine_core _RC)
|
make_rc(qglengine_core _RC)
|
||||||
qt_add_library(qglengine_core SHARED out_CPP ${_RC})
|
qt_add_library(qglengine_core SHARED out_CPP ${_RC})
|
||||||
|
qt_generate_export_header(qglengine_core)
|
||||||
|
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/qglengine_core_export.h")
|
||||||
qt_target_include_directories(qglengine_core PRIVATE ${QAD_INCLUDES} "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/core")
|
qt_target_include_directories(qglengine_core PRIVATE ${QAD_INCLUDES} "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/core")
|
||||||
qt_target_link_libraries(qglengine_core qad_utils qad_widgets assimp ${OPENGL_LIBRARIES})
|
qt_target_link_libraries(qglengine_core qad_utils qad_widgets assimp ${OPENGL_LIBRARIES})
|
||||||
message(STATUS "Building QGLEngine version ${qglengine_VERSION} (SHARED)")
|
message(STATUS "Building QGLEngine version ${qglengine_VERSION} (SHARED)")
|
||||||
list(APPEND QT_MULTILIB_LIST qglengine_core)
|
list(APPEND QT_MULTILIB_LIST qglengine_core)
|
||||||
add_subdirectory(widgets)
|
add_subdirectory(widgets)
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
copy_to_parent("")
|
||||||
if (LIBPROJECT)
|
sdk_install("qglengine" FALSE "qglengine_core" "${out_HDR}" "${out_QM}")
|
||||||
sdk_install("qglengine" FALSE "qglengine_core" "${out_HDR}" "${out_QM}")
|
|
||||||
else()
|
|
||||||
if (LIB)
|
|
||||||
if (WIN32)
|
|
||||||
qt_install(FILES ${out_HDR} DESTINATION ${MINGW_INCLUDE}/qglengine)
|
|
||||||
qt_install(TARGETS qglengine_core ARCHIVE DESTINATION ${MINGW_LIB})
|
|
||||||
qt_install(TARGETS qglengine_core RUNTIME DESTINATION ${MINGW_BIN})
|
|
||||||
qt_install(TARGETS qglengine_core RUNTIME DESTINATION QtBin)
|
|
||||||
else()
|
|
||||||
qt_install(FILES ${out_HDR} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qglengine)
|
|
||||||
qt_install(TARGETS qglengine_core DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
|
||||||
endif()
|
|
||||||
message(STATUS "Install qglengine_core to system \"${CMAKE_INSTALL_PREFIX}\"")
|
|
||||||
else()
|
|
||||||
if(WIN32)
|
|
||||||
qt_install(TARGETS qglengine_core RUNTIME DESTINATION bin)
|
|
||||||
qt_install(TARGETS qglengine_core ARCHIVE DESTINATION lib)
|
|
||||||
else()
|
|
||||||
qt_install(TARGETS qglengine_core DESTINATION bin/lib)
|
|
||||||
endif()
|
|
||||||
qt_install(FILES ${out_HDR} DESTINATION include/qglengine)
|
|
||||||
message(STATUS "Install qglengine_core to local \"bin\", \"lib\" and \"include\"")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if (NOT DEFINED ANDROID_PLATFORM)
|
if (NOT DEFINED ANDROID_PLATFORM)
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||||
#add_subdirectory(plugin)
|
#add_subdirectory(plugin)
|
||||||
|
|||||||
@@ -16,34 +16,11 @@ set_deploy_property(${PROJECT_NAME} SHARED
|
|||||||
INFO "QGLEngine widgets library")
|
INFO "QGLEngine widgets library")
|
||||||
make_rc(${PROJECT_NAME} _RC)
|
make_rc(${PROJECT_NAME} _RC)
|
||||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP ${_RC})
|
qt_add_library(${PROJECT_NAME} SHARED out_CPP ${_RC})
|
||||||
|
qt_generate_export_header(${PROJECT_NAME})
|
||||||
|
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
|
||||||
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qglengine_core)
|
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qglengine_core)
|
||||||
qt_target_include_directories(${PROJECT_NAME} PRIVATE ${QAD_INCLUDES} "${CMAKE_CURRENT_SOURCE_DIR}/../" "${CMAKE_CURRENT_SOURCE_DIR}/../core")
|
qt_target_include_directories(${PROJECT_NAME} PRIVATE ${QAD_INCLUDES} "${CMAKE_CURRENT_SOURCE_DIR}/../" "${CMAKE_CURRENT_SOURCE_DIR}/../core")
|
||||||
list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
|
list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
|
||||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
copy_to_parent("")
|
||||||
#message(STATUS "Building ${PROJECT_NAME}")
|
#message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if (LIBPROJECT)
|
sdk_install("qglengine" FALSE "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
|
||||||
sdk_install("qglengine" FALSE "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
|
|
||||||
else()
|
|
||||||
if (LIB)
|
|
||||||
if (WIN32)
|
|
||||||
qt_install(FILES ${out_HDR} DESTINATION ${MINGW_INCLUDE}/qglengine)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${MINGW_BIN})
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtBin)
|
|
||||||
else()
|
|
||||||
qt_install(FILES ${out_HDR} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qglengine)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
|
||||||
endif()
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
|
||||||
else()
|
|
||||||
if(WIN32)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
|
|
||||||
else()
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin/lib)
|
|
||||||
endif()
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
|
||||||
qt_install(FILES ${H} DESTINATION include/qglengine)
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|||||||
@@ -1,70 +1,8 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
|
||||||
project(qglview)
|
|
||||||
if (IBPROJECT)
|
|
||||||
include(SDKMacros)
|
|
||||||
else()
|
|
||||||
option(LIB "System install" 0)
|
|
||||||
option(DEBUG "Build with -g3" 0)
|
|
||||||
option(DESIGNER_PLUGINS "Build qt designer plugins" 1)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
|
||||||
if (DEBUG)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if (MINGW)
|
|
||||||
find_package(MinGW REQUIRED)
|
|
||||||
endif()
|
|
||||||
find_package(QAD REQUIRED)
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
include_directories(${QAD_INCLUDES})
|
_qt_project(qglview FALSE "QAD" "Gui;OpenGL;Xml" "qad_widgets;qad_utils;${OPENGL_LIBRARIES}")
|
||||||
find_qt(Qt5 Core Gui OpenGL Xml)
|
_qt_install(qglview FALSE "qad" "out_HDR" "out_QM")
|
||||||
if (NOT Qt5)
|
|
||||||
message(WARNING "Building ${PROJECT_NAME} available only on Qt5!")
|
|
||||||
else()
|
|
||||||
qt_sources(SRC)
|
|
||||||
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
|
||||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
|
||||||
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets ${OPENGL_LIBRARIES})
|
|
||||||
qt_target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
|
||||||
if (LIBPROJECT)
|
|
||||||
sdk_install("qad" FALSE "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
|
|
||||||
else()
|
|
||||||
if (LIB)
|
|
||||||
if (WIN32)
|
|
||||||
qt_install(FILES ${H} DESTINATION ${MINGW_INCLUDE}/qad)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${MINGW_LIB})
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${MINGW_BIN})
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtBin)
|
|
||||||
else()
|
|
||||||
qt_install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
|
||||||
endif()
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
|
||||||
else()
|
|
||||||
if(WIN32)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
|
|
||||||
else()
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
|
||||||
endif()
|
|
||||||
qt_install(FILES ${H} DESTINATION include/qad)
|
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
foreach(_v ${_QT_VERSIONS_})
|
|
||||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v})
|
|
||||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
|
|
||||||
endforeach()
|
|
||||||
list(APPEND QT_MULTILIB_LIST qglview)
|
|
||||||
if (NOT DEFINED ANDROID_PLATFORM)
|
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
|
||||||
add_subdirectory(plugin)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
qt_sources(test_SRC DIR "qglview_test")
|
qt_sources(test_SRC DIR "qglview_test")
|
||||||
qt_wrap(${test_SRC} CPPS test_CPP)
|
qt_wrap(${test_SRC} CPPS test_CPP)
|
||||||
qt_add_executable(qglview_test test_CPP)
|
qt_add_executable(qglview_test test_CPP)
|
||||||
qt_target_link_libraries(qglview_test ${PROJECT_NAME})
|
qt_target_link_libraries(qglview_test qglview)
|
||||||
endif()
|
|
||||||
|
|||||||
@@ -1,18 +1 @@
|
|||||||
if (DESIGNER_PLUGINS)
|
_qt_plugin(qglview "Gui;Widgets;OpenGL" "qglview")
|
||||||
if (NOT Qt5)
|
|
||||||
message(WARNING "Building ${PROJECT_NAME} available only on Qt5!")
|
|
||||||
else()
|
|
||||||
project(qglview_plugin)
|
|
||||||
include_directories("..")
|
|
||||||
add_definitions(-DQT_PLUGIN)
|
|
||||||
add_definitions(-DQT_NO_DEBUG)
|
|
||||||
add_definitions(-DQT_SHARED)
|
|
||||||
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
|
||||||
find_qt(Qt5 Core Designer Gui Widgets OpenGL)
|
|
||||||
qt_sources(SRC)
|
|
||||||
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
|
||||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
|
||||||
qt_target_link_libraries(${PROJECT_NAME} qglview)
|
|
||||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user