tree changes
This commit is contained in:
@@ -153,6 +153,7 @@ else()
|
||||
if (SomeQtFound)
|
||||
message(STATUS "Building Qt-derived targets for ${QtVersions}")
|
||||
add_subdirectory(qad)
|
||||
include_directories(${qad_includes})
|
||||
set(_DIRS piqt piqt_utils qcd_utils)
|
||||
if (Qt5)
|
||||
list(APPEND _DIRS)
|
||||
|
||||
2
pip
2
pip
Submodule pip updated: 9834ac177b...ccd6a9888f
@@ -23,7 +23,7 @@ list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
|
||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
||||
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||
pip_code_model(CCM "../pip/lib/main/io_devices/piiodevice.h" "../pip/lib/main/io_utils/pipacketextractor.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
||||
pip_code_model(CCM "../pip/libs/main/io_devices/piiodevice.h" "../pip/libs/main/io_utils/pipacketextractor.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
||||
find_qt(${QtVersions} Core Gui)
|
||||
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||
qt_add_library(${PROJECT_NAME} ${LIBTYPE} out_CPP CCM)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
project(piintrospector)
|
||||
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||
set(PII_ROOT "../../pip/lib/main/introspection")
|
||||
set(PII_ROOT "../../pip/libs/main/introspection")
|
||||
pip_code_model(PII_CCM "${PII_ROOT}/piintrospection_server_p.h" "${PII_ROOT}/piintrospection_threads_p.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
||||
find_qt(${QtVersions} Core Gui)
|
||||
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||
|
||||
@@ -184,10 +184,6 @@ macro(qad_project NAME _MODULES _LIBS)
|
||||
endif()
|
||||
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
|
||||
qad_install(${PROJ_NAME} "out_HDR" "out_QM")
|
||||
set(${NAME}_UTILS 1)
|
||||
if (LIBPROJECT)
|
||||
set(${NAME}_UTILS ${UTILS})
|
||||
endif()
|
||||
message(STATUS "Building ${PROJ_NAME}")
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
||||
@@ -195,15 +191,14 @@ macro(qad_project NAME _MODULES _LIBS)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
set(DIRS utils widgets application blockview graphic sql_table touch_widgets doc)
|
||||
foreach(D ${DIRS})
|
||||
list(APPEND QT_MULTILIB_LIST qad_${D})
|
||||
endforeach(D)
|
||||
add_subdirectory(libs)
|
||||
if (UTILS)
|
||||
add_subdirectory(utils)
|
||||
endif()
|
||||
|
||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||
foreach(D ${DIRS})
|
||||
include_directories(${D})
|
||||
add_subdirectory(${D})
|
||||
endforeach(D)
|
||||
set(qad_includes ${qad_includes} PARENT_SCOPE)
|
||||
if (LIB)
|
||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>lang/qad_application_ru.ts</file>
|
||||
<file>../icons/application-exit.png</file>
|
||||
<file>../icons/dialog-close.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-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/edit-undo.png</file>
|
||||
<file>../icons/edit-redo.png</file>
|
||||
<file>../icons/border-line.png</file>
|
||||
<file>../icons/edockwidget.png</file>
|
||||
<file>../icons/historyview.png</file>
|
||||
<file>../icons/clear-history.png</file>
|
||||
<file>../icons/layer-visible-off.png</file>
|
||||
<file>../icons/layer-visible-on.png</file>
|
||||
<file>../icons/logview.png</file>
|
||||
<file>../icons/qt.png</file>
|
||||
<file>../icons/select-all.png</file>
|
||||
<file>../icons/select-none.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,4 +0,0 @@
|
||||
qad_project(blockview "Gui;Widgets" "qad_utils;qad_widgets")
|
||||
if (blockview_UTILS)
|
||||
add_subdirectory(blockeditor)
|
||||
endif()
|
||||
@@ -1,51 +0,0 @@
|
||||
<RCC>
|
||||
<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/view-fullscreen.png</file>
|
||||
<file>../icons/draw-ellipse.png</file>
|
||||
<file>../icons/draw-rectangle.png</file>
|
||||
<file>../icons/draw-text.png</file>
|
||||
<file>../icons/view-preview.png</file>
|
||||
<file>../icons/format-fill-color.png</file>
|
||||
<file>../icons/format-stroke-color.png</file>
|
||||
<file>../icons/document-open.png</file>
|
||||
<file>../icons/align-bottom-center.png</file>
|
||||
<file>../icons/align-bottom-left.png</file>
|
||||
<file>../icons/align-bottom-right.png</file>
|
||||
<file>../icons/align-center-center.png</file>
|
||||
<file>../icons/align-center-left.png</file>
|
||||
<file>../icons/align-center-right.png</file>
|
||||
<file>../icons/align-top-center.png</file>
|
||||
<file>../icons/align-top-left.png</file>
|
||||
<file>../icons/align-top-right.png</file>
|
||||
<file>../icons/z-bottom.png</file>
|
||||
<file>../icons/z-down.png</file>
|
||||
<file>../icons/z-top.png</file>
|
||||
<file>../icons/z-up.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,28 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>../icons/media-playback-pause.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/view-autofit.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/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/graphic.png</file>
|
||||
<file>../icons/view-fullscreen.png</file>
|
||||
<file>../icons/pause-back.png</file>
|
||||
<file>../icons/pause-front.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,188 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.2.1, 2016-03-25T15:17:49. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{948faa78-0b50-402e-a285-1bca3b08de64}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">false</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">DesktopBuild</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">DesktopBuild</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{3c749452-9483-442d-b011-933a1b5dac10}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="bool" key="CMakeProjectManager.CMakeBuildConfiguration.UseNinja">false</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/work/qpicalculator-build</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments">clean</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">all</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Установка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Локальная установка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">3</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">qpicalculator</value>
|
||||
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
|
||||
<value type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qpicalculator</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.qpicalculator</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">16</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">16</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -1 +1 @@
|
||||
qad_project(application "Gui;Widgets" "qad_widgets")
|
||||
qad_project(application "Gui;Widgets" "qad_widgets")
|
||||
@@ -1,217 +1,217 @@
|
||||
#include "aboutwindow.h"
|
||||
#include "ui_aboutwindow.h"
|
||||
#include "qad_types.h"
|
||||
#include "qpiconfig.h"
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#if QT_VERSION < 0x050000
|
||||
# include <QDesktopWidget>
|
||||
#else
|
||||
# include <QScreen>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
|
||||
# define MOBILE_VIEW
|
||||
#endif
|
||||
|
||||
QImage AboutWindow::logo;
|
||||
QVector<AboutWindow::SSPair> AboutWindow::versions, AboutWindow::builds;
|
||||
QString AboutWindow::comment, AboutWindow::stylesheet;
|
||||
|
||||
|
||||
AboutWindow::AboutWindow(QWidget * parent): QDialog(parent), ui(new Ui::AboutWindow) {
|
||||
#ifdef ANDROID
|
||||
QDialog::setStyleSheet("font: 12pt \"DejaVu Sans\";");
|
||||
#endif
|
||||
if (!stylesheet.isEmpty())
|
||||
QDialog::setStyleSheet(stylesheet);
|
||||
ui->setupUi(this);
|
||||
ui->labelAuthors->setOpenExternalLinks(true);
|
||||
QImage logo_im = logo;
|
||||
if (logo_im.isNull())
|
||||
logo_im.load(":/icons/splash.png");
|
||||
setWindowTitle(QApplication::applicationName() + " - " + tr("About"));
|
||||
QIcon ic = QApplication::windowIcon();
|
||||
if (ic.isNull()) {
|
||||
QWidgetList tlw = QApplication::topLevelWidgets();
|
||||
foreach (QWidget * w, tlw)
|
||||
if (!w->windowIcon().isNull()) {
|
||||
ic = w->windowIcon();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ic.isNull())
|
||||
ic = QIcon(QPixmap::fromImage(logo_im));
|
||||
setWindowIcon(ic);
|
||||
QFormLayout * lay = (QFormLayout*)(ui->groupVersions->layout());
|
||||
foreach (SSPair p, versions) {
|
||||
lay->addRow(p.first, new QLabel(p.second));
|
||||
}
|
||||
lay = (QFormLayout*)(ui->groupBuild->layout());
|
||||
foreach (SSPair p, builds) {
|
||||
lay->addRow(p.first, new QLabel(p.second));
|
||||
}
|
||||
ui->imageView->setPixmap(QPixmap::fromImage(logo_im));
|
||||
ui->labelComment->setText(comment);
|
||||
ui->labelComment->setOpenExternalLinks(true);
|
||||
ui->labelComment->setHidden(comment.isEmpty());
|
||||
//ui->labelArch->setText(QSysInfo::currentCpuArchitecture());
|
||||
ui->labelAuthors->setText(authors());
|
||||
connect(ui->buttonQt, SIGNAL(clicked()), qApp, SLOT(aboutQt()));
|
||||
#ifdef MOBILE_VIEW
|
||||
ui->layoutMain->insertWidget(0, ui->imageView);
|
||||
//ui->verticalSpacer->changeSize(1, 1, QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
#endif
|
||||
#ifdef MOBILE_VIEW
|
||||
ui->layoutMain->addSpacerItem(new QSpacerItem(1, 1, QSizePolicy::Preferred, QSizePolicy::Expanding));
|
||||
#else
|
||||
QRect r;
|
||||
# if QT_VERSION < 0x050000
|
||||
r = QApplication::desktop()->geometry();
|
||||
# else
|
||||
QScreen * scr =
|
||||
# if QT_VERSION >= 0x050A00
|
||||
QApplication::screenAt(QCursor::pos());
|
||||
# else
|
||||
QApplication::screens()[0];
|
||||
# endif
|
||||
if (scr) {
|
||||
r.setSize(scr->availableSize() / 2);
|
||||
r.moveCenter(scr->availableGeometry().center());
|
||||
}
|
||||
# endif
|
||||
if (r.isValid())
|
||||
setGeometry(r);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
AboutWindow::~AboutWindow() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setLogo(QImage im) {
|
||||
logo = im;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setLogo(QString path) {
|
||||
logo = QImage(path);
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::addVersion(QString name, QString version) {
|
||||
if (!name.endsWith(":")) name.append(":");
|
||||
foreach (const SSPair & p, versions) {
|
||||
if (p.first == name) return;
|
||||
}
|
||||
version.prepend("<b>");
|
||||
if (version.contains("("))
|
||||
version.insert(version.indexOf("("), "</b>");
|
||||
else
|
||||
version.append("</b>");
|
||||
versions << SSPair(name, version);
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::addBuildInfo(QString name, QString value) {
|
||||
if (!name.endsWith(":")) name.append(":");
|
||||
foreach (const SSPair & p, builds) {
|
||||
if (p.first == name) return;
|
||||
}
|
||||
builds << SSPair(name, value);
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setComment(QString text) {
|
||||
comment = text;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setStyleSheet(QString ss) {
|
||||
stylesheet = ss;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::show() {
|
||||
AboutWindow w;
|
||||
w.exec();
|
||||
}
|
||||
|
||||
|
||||
int AboutWindow::exec() {
|
||||
#ifdef MOBILE_VIEW
|
||||
showFullScreen();
|
||||
//setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::changeEvent(QEvent *e) {
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
setWindowTitle(QApplication::applicationName() + " - " + tr("About"));
|
||||
break;
|
||||
case QEvent::FontChange:
|
||||
case QEvent::Polish:
|
||||
ui->buttonOK->setIconSize(preferredIconSize(2., this));
|
||||
ui->buttonQt->setIconSize(preferredIconSize(2., this));
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void addAuthor(QString & ret, const QString & name, const QString & mail) {
|
||||
ret += QString("<p>%1 (<a href=\"mailto:%2?subject=%3\">%2</a>)</p>").arg(name, mail, QApplication::applicationName());
|
||||
}
|
||||
QString AboutWindow::authors() {
|
||||
QString ret, fc;
|
||||
if (QFile::exists(":/authors.txt")) {
|
||||
QFile f(":/authors.txt");
|
||||
f.open(QIODevice::ReadOnly);
|
||||
fc = QString::fromUtf8(f.readAll());
|
||||
} else {
|
||||
if (QFile::exists(":/AUTHORS.txt")) {
|
||||
QFile f(":/AUTHORS.txt");
|
||||
f.open(QIODevice::ReadOnly);
|
||||
fc = QString::fromUtf8(f.readAll());
|
||||
}
|
||||
}
|
||||
QTextStream ts(&fc, QIODevice::ReadOnly);
|
||||
QString l = ts.readLine();
|
||||
if (l.contains(";")) {
|
||||
QStringList sl;
|
||||
while (!ts.atEnd()) {
|
||||
l = ts.readLine();
|
||||
if (l.isEmpty()) continue;
|
||||
QString name, mail;
|
||||
sl = l.split(";");
|
||||
if (sl.size() > 0) name = sl[0].trimmed();
|
||||
if (sl.size() > 1) mail = sl[1].trimmed();
|
||||
addAuthor(ret, name, mail);
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
QPIConfig conf(&fc);
|
||||
QPIConfig::Branch br = conf.allLeaves();
|
||||
foreach (QPIConfig::Entry * e, br) {
|
||||
l = e->toString().trimmed();
|
||||
if (!l.contains("<")) continue;
|
||||
QString name, mail;
|
||||
name = l.left(l.indexOf("<"));
|
||||
mail = l.mid(name.size() + 1);
|
||||
if (mail.endsWith(">"))
|
||||
mail.chop(1);
|
||||
name = name.trimmed();
|
||||
mail = mail.trimmed();
|
||||
addAuthor(ret, name, mail);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#include "aboutwindow.h"
|
||||
#include "ui_aboutwindow.h"
|
||||
#include "qad_types.h"
|
||||
#include "qpiconfig.h"
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#if QT_VERSION < 0x050000
|
||||
# include <QDesktopWidget>
|
||||
#else
|
||||
# include <QScreen>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
|
||||
# define MOBILE_VIEW
|
||||
#endif
|
||||
|
||||
QImage AboutWindow::logo;
|
||||
QVector<AboutWindow::SSPair> AboutWindow::versions, AboutWindow::builds;
|
||||
QString AboutWindow::comment, AboutWindow::stylesheet;
|
||||
|
||||
|
||||
AboutWindow::AboutWindow(QWidget * parent): QDialog(parent), ui(new Ui::AboutWindow) {
|
||||
#ifdef ANDROID
|
||||
QDialog::setStyleSheet("font: 12pt \"DejaVu Sans\";");
|
||||
#endif
|
||||
if (!stylesheet.isEmpty())
|
||||
QDialog::setStyleSheet(stylesheet);
|
||||
ui->setupUi(this);
|
||||
ui->labelAuthors->setOpenExternalLinks(true);
|
||||
QImage logo_im = logo;
|
||||
if (logo_im.isNull())
|
||||
logo_im.load(":/icons/splash.png");
|
||||
setWindowTitle(QApplication::applicationName() + " - " + tr("About"));
|
||||
QIcon ic = QApplication::windowIcon();
|
||||
if (ic.isNull()) {
|
||||
QWidgetList tlw = QApplication::topLevelWidgets();
|
||||
foreach (QWidget * w, tlw)
|
||||
if (!w->windowIcon().isNull()) {
|
||||
ic = w->windowIcon();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ic.isNull())
|
||||
ic = QIcon(QPixmap::fromImage(logo_im));
|
||||
setWindowIcon(ic);
|
||||
QFormLayout * lay = (QFormLayout*)(ui->groupVersions->layout());
|
||||
foreach (SSPair p, versions) {
|
||||
lay->addRow(p.first, new QLabel(p.second));
|
||||
}
|
||||
lay = (QFormLayout*)(ui->groupBuild->layout());
|
||||
foreach (SSPair p, builds) {
|
||||
lay->addRow(p.first, new QLabel(p.second));
|
||||
}
|
||||
ui->imageView->setPixmap(QPixmap::fromImage(logo_im));
|
||||
ui->labelComment->setText(comment);
|
||||
ui->labelComment->setOpenExternalLinks(true);
|
||||
ui->labelComment->setHidden(comment.isEmpty());
|
||||
//ui->labelArch->setText(QSysInfo::currentCpuArchitecture());
|
||||
ui->labelAuthors->setText(authors());
|
||||
connect(ui->buttonQt, SIGNAL(clicked()), qApp, SLOT(aboutQt()));
|
||||
#ifdef MOBILE_VIEW
|
||||
ui->layoutMain->insertWidget(0, ui->imageView);
|
||||
//ui->verticalSpacer->changeSize(1, 1, QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
#endif
|
||||
#ifdef MOBILE_VIEW
|
||||
ui->layoutMain->addSpacerItem(new QSpacerItem(1, 1, QSizePolicy::Preferred, QSizePolicy::Expanding));
|
||||
#else
|
||||
QRect r;
|
||||
# if QT_VERSION < 0x050000
|
||||
r = QApplication::desktop()->geometry();
|
||||
# else
|
||||
QScreen * scr =
|
||||
# if QT_VERSION >= 0x050A00
|
||||
QApplication::screenAt(QCursor::pos());
|
||||
# else
|
||||
QApplication::screens()[0];
|
||||
# endif
|
||||
if (scr) {
|
||||
r.setSize(scr->availableSize() / 2);
|
||||
r.moveCenter(scr->availableGeometry().center());
|
||||
}
|
||||
# endif
|
||||
if (r.isValid())
|
||||
setGeometry(r);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
AboutWindow::~AboutWindow() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setLogo(QImage im) {
|
||||
logo = im;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setLogo(QString path) {
|
||||
logo = QImage(path);
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::addVersion(QString name, QString version) {
|
||||
if (!name.endsWith(":")) name.append(":");
|
||||
foreach (const SSPair & p, versions) {
|
||||
if (p.first == name) return;
|
||||
}
|
||||
version.prepend("<b>");
|
||||
if (version.contains("("))
|
||||
version.insert(version.indexOf("("), "</b>");
|
||||
else
|
||||
version.append("</b>");
|
||||
versions << SSPair(name, version);
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::addBuildInfo(QString name, QString value) {
|
||||
if (!name.endsWith(":")) name.append(":");
|
||||
foreach (const SSPair & p, builds) {
|
||||
if (p.first == name) return;
|
||||
}
|
||||
builds << SSPair(name, value);
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setComment(QString text) {
|
||||
comment = text;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::setStyleSheet(QString ss) {
|
||||
stylesheet = ss;
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::show() {
|
||||
AboutWindow w;
|
||||
w.exec();
|
||||
}
|
||||
|
||||
|
||||
int AboutWindow::exec() {
|
||||
#ifdef MOBILE_VIEW
|
||||
showFullScreen();
|
||||
//setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::changeEvent(QEvent *e) {
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
setWindowTitle(QApplication::applicationName() + " - " + tr("About"));
|
||||
break;
|
||||
case QEvent::FontChange:
|
||||
case QEvent::Polish:
|
||||
ui->buttonOK->setIconSize(preferredIconSize(2., this));
|
||||
ui->buttonQt->setIconSize(preferredIconSize(2., this));
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void addAuthor(QString & ret, const QString & name, const QString & mail) {
|
||||
ret += QString("<p>%1 (<a href=\"mailto:%2?subject=%3\">%2</a>)</p>").arg(name, mail, QApplication::applicationName());
|
||||
}
|
||||
QString AboutWindow::authors() {
|
||||
QString ret, fc;
|
||||
if (QFile::exists(":/authors.txt")) {
|
||||
QFile f(":/authors.txt");
|
||||
f.open(QIODevice::ReadOnly);
|
||||
fc = QString::fromUtf8(f.readAll());
|
||||
} else {
|
||||
if (QFile::exists(":/AUTHORS.txt")) {
|
||||
QFile f(":/AUTHORS.txt");
|
||||
f.open(QIODevice::ReadOnly);
|
||||
fc = QString::fromUtf8(f.readAll());
|
||||
}
|
||||
}
|
||||
QTextStream ts(&fc, QIODevice::ReadOnly);
|
||||
QString l = ts.readLine();
|
||||
if (l.contains(";")) {
|
||||
QStringList sl;
|
||||
while (!ts.atEnd()) {
|
||||
l = ts.readLine();
|
||||
if (l.isEmpty()) continue;
|
||||
QString name, mail;
|
||||
sl = l.split(";");
|
||||
if (sl.size() > 0) name = sl[0].trimmed();
|
||||
if (sl.size() > 1) mail = sl[1].trimmed();
|
||||
addAuthor(ret, name, mail);
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
QPIConfig conf(&fc);
|
||||
QPIConfig::Branch br = conf.allLeaves();
|
||||
foreach (QPIConfig::Entry * e, br) {
|
||||
l = e->toString().trimmed();
|
||||
if (!l.contains("<")) continue;
|
||||
QString name, mail;
|
||||
name = l.left(l.indexOf("<"));
|
||||
mail = l.mid(name.size() + 1);
|
||||
if (mail.endsWith(">"))
|
||||
mail.chop(1);
|
||||
name = name.trimmed();
|
||||
mail = mail.trimmed();
|
||||
addAuthor(ret, name, mail);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,82 +1,82 @@
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ABOUTWINDOW_H
|
||||
#define ABOUTWINDOW_H
|
||||
|
||||
#include "qad_export.h"
|
||||
#include <QDialog>
|
||||
|
||||
#define ADD_ABOUT_VERSION(lib) \
|
||||
{ \
|
||||
if (lib##_VERSION_BUILD > 0) \
|
||||
AboutWindow::addVersion(#lib, lib##_VERSION_NAME " (build " + QString::number(lib##_VERSION_BUILD) + ")"); \
|
||||
else \
|
||||
AboutWindow::addVersion(#lib, lib##_VERSION_NAME); \
|
||||
}
|
||||
#define ADD_ABOUT_VERSION_NAMED(lib, label) \
|
||||
{ \
|
||||
if (lib##_VERSION_BUILD > 0) \
|
||||
AboutWindow::addVersion(label, lib##_VERSION_NAME " (build " + QString::number(lib##_VERSION_BUILD) + ")"); \
|
||||
else \
|
||||
AboutWindow::addVersion(label, lib##_VERSION_NAME); \
|
||||
}
|
||||
#define ADD_ABOUT_BUILD_INFO(lib) \
|
||||
AboutWindow::addBuildInfo("Arch", lib##_ARCH); \
|
||||
AboutWindow::addBuildInfo("Compiler", lib##_CXX_COMPILER); \
|
||||
AboutWindow::addBuildInfo("CMake", lib##_CMAKE_VERSION); \
|
||||
AboutWindow::addBuildInfo("Date", lib##_BUILD_DATE);
|
||||
|
||||
namespace Ui {
|
||||
class AboutWindow;
|
||||
}
|
||||
|
||||
class QAD_EXPORT AboutWindow: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
typedef QPair<QString, QString> SSPair;
|
||||
explicit AboutWindow(QWidget * parent = 0);
|
||||
~AboutWindow();
|
||||
public:
|
||||
|
||||
static void setLogo(QImage im);
|
||||
static void setLogo(QString path);
|
||||
static void addVersion(QString name, QString version);
|
||||
static void addBuildInfo(QString name, QString value);
|
||||
static void setComment(QString text);
|
||||
static void setStyleSheet(QString ss);
|
||||
|
||||
static void show();
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent * e);
|
||||
virtual int exec();
|
||||
|
||||
QString authors();
|
||||
|
||||
private:
|
||||
Ui::AboutWindow * ui;
|
||||
|
||||
static QImage logo;
|
||||
static QVector<SSPair> versions, builds;
|
||||
static QString stylesheet, comment;
|
||||
|
||||
};
|
||||
|
||||
#endif // ABOUTWINDOW_H
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ABOUTWINDOW_H
|
||||
#define ABOUTWINDOW_H
|
||||
|
||||
#include "qad_export.h"
|
||||
#include <QDialog>
|
||||
|
||||
#define ADD_ABOUT_VERSION(lib) \
|
||||
{ \
|
||||
if (lib##_VERSION_BUILD > 0) \
|
||||
AboutWindow::addVersion(#lib, lib##_VERSION_NAME " (build " + QString::number(lib##_VERSION_BUILD) + ")"); \
|
||||
else \
|
||||
AboutWindow::addVersion(#lib, lib##_VERSION_NAME); \
|
||||
}
|
||||
#define ADD_ABOUT_VERSION_NAMED(lib, label) \
|
||||
{ \
|
||||
if (lib##_VERSION_BUILD > 0) \
|
||||
AboutWindow::addVersion(label, lib##_VERSION_NAME " (build " + QString::number(lib##_VERSION_BUILD) + ")"); \
|
||||
else \
|
||||
AboutWindow::addVersion(label, lib##_VERSION_NAME); \
|
||||
}
|
||||
#define ADD_ABOUT_BUILD_INFO(lib) \
|
||||
AboutWindow::addBuildInfo("Arch", lib##_ARCH); \
|
||||
AboutWindow::addBuildInfo("Compiler", lib##_CXX_COMPILER); \
|
||||
AboutWindow::addBuildInfo("CMake", lib##_CMAKE_VERSION); \
|
||||
AboutWindow::addBuildInfo("Date", lib##_BUILD_DATE);
|
||||
|
||||
namespace Ui {
|
||||
class AboutWindow;
|
||||
}
|
||||
|
||||
class QAD_EXPORT AboutWindow: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
typedef QPair<QString, QString> SSPair;
|
||||
explicit AboutWindow(QWidget * parent = 0);
|
||||
~AboutWindow();
|
||||
public:
|
||||
|
||||
static void setLogo(QImage im);
|
||||
static void setLogo(QString path);
|
||||
static void addVersion(QString name, QString version);
|
||||
static void addBuildInfo(QString name, QString value);
|
||||
static void setComment(QString text);
|
||||
static void setStyleSheet(QString ss);
|
||||
|
||||
static void show();
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent * e);
|
||||
virtual int exec();
|
||||
|
||||
QString authors();
|
||||
|
||||
private:
|
||||
Ui::AboutWindow * ui;
|
||||
|
||||
static QImage logo;
|
||||
static QVector<SSPair> versions, builds;
|
||||
static QString stylesheet, comment;
|
||||
|
||||
};
|
||||
|
||||
#endif // ABOUTWINDOW_H
|
||||
@@ -1,155 +1,155 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutWindow</class>
|
||||
<widget class="QWidget" name="AboutWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>724</width>
|
||||
<height>502</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string> - About</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="ImageView" name="imageView">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="backgroundBrush">
|
||||
<brush brushstyle="NoBrush">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</property>
|
||||
<property name="renderHints">
|
||||
<set>QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="layoutMain">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelComment"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupVersions">
|
||||
<property name="title">
|
||||
<string>Versions</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBuild">
|
||||
<property name="title">
|
||||
<string>Build</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupAuthors">
|
||||
<property name="title">
|
||||
<string>Authors</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelAuthors">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonQt">
|
||||
<property name="text">
|
||||
<string>About Qt...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qad_application.qrc">
|
||||
<normaloff>:/icons/qt.png</normaloff>:/icons/qt.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonOK">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/dialog-ok-apply.png</normaloff>:/icons/dialog-ok-apply.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ImageView</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>image_view.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../widgets/qad_widgets.qrc"/>
|
||||
<include location="qad_application.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonOK</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutWindow</receiver>
|
||||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>712</x>
|
||||
<y>490</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>320</x>
|
||||
<y>385</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutWindow</class>
|
||||
<widget class="QWidget" name="AboutWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>724</width>
|
||||
<height>502</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string> - About</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="ImageView" name="imageView">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="backgroundBrush">
|
||||
<brush brushstyle="NoBrush">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</property>
|
||||
<property name="renderHints">
|
||||
<set>QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="layoutMain">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelComment"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupVersions">
|
||||
<property name="title">
|
||||
<string>Versions</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBuild">
|
||||
<property name="title">
|
||||
<string>Build</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupAuthors">
|
||||
<property name="title">
|
||||
<string>Authors</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelAuthors">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonQt">
|
||||
<property name="text">
|
||||
<string>About Qt...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qad_application.qrc">
|
||||
<normaloff>:/icons/qt.png</normaloff>:/icons/qt.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonOK">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/dialog-ok-apply.png</normaloff>:/icons/dialog-ok-apply.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ImageView</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>image_view.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../widgets/qad_widgets.qrc"/>
|
||||
<include location="qad_application.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonOK</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutWindow</receiver>
|
||||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>712</x>
|
||||
<y>490</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>320</x>
|
||||
<y>385</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -1 +1 @@
|
||||
qad_plugin(application "Gui;Widgets" "")
|
||||
qad_plugin(application "Gui;Widgets" "")
|
||||
34
qad/libs/application/qad_application.qrc
Normal file
34
qad/libs/application/qad_application.qrc
Normal file
@@ -0,0 +1,34 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>../../icons/application-exit.png</file>
|
||||
<file>../../icons/dialog-close.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-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/edit-undo.png</file>
|
||||
<file>../../icons/edit-redo.png</file>
|
||||
<file>../../icons/border-line.png</file>
|
||||
<file>../../icons/edockwidget.png</file>
|
||||
<file>../../icons/historyview.png</file>
|
||||
<file>../../icons/clear-history.png</file>
|
||||
<file>../../icons/layer-visible-off.png</file>
|
||||
<file>../../icons/layer-visible-on.png</file>
|
||||
<file>../../icons/logview.png</file>
|
||||
<file>../../icons/qt.png</file>
|
||||
<file>../../icons/select-all.png</file>
|
||||
<file>../../icons/select-none.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
1
qad/libs/blockview/CMakeLists.txt
Normal file
1
qad/libs/blockview/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
qad_project(blockview "Gui;Widgets" "qad_utils;qad_widgets")
|
||||
@@ -1,400 +1,400 @@
|
||||
#include "blockeditor.h"
|
||||
#include "ui_blockeditor.h"
|
||||
#include "drawtools.h"
|
||||
#include "blockview.h"
|
||||
#include <QToolBar>
|
||||
#include <QComboBox>
|
||||
#include <QFileDialog>
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
BlockEditor::BlockEditor(QWidget *parent) : QWidget(parent), ui(new Ui::BlockEditor) {
|
||||
init = false;
|
||||
m_editorMode = false;
|
||||
m_pinsEditable = true;
|
||||
ui->setupUi(this);
|
||||
src_title = windowTitle();
|
||||
connect(ui->blockView->scene(), SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
|
||||
block.setFlags(0);
|
||||
ui->blockView->addItem(&block);
|
||||
ui->blockView->viewport()->installEventFilter(this);
|
||||
DrawTools * drawtools = new DrawTools(ui->blockView);
|
||||
connect(drawtools, SIGNAL(itemCreated(QGraphicsItem*)), this, SLOT(addItem(QGraphicsItem*)));
|
||||
drawtools->textEditCombo()->addItems(QStringList() << "%name" << "%value" << "%id");
|
||||
ui->layoutProperties->addWidget(drawtools->propertyWidget());
|
||||
ui->actionRemove_items->setEnabled(false);
|
||||
ui->button_color->setColor(Qt::lightGray);
|
||||
ui->treePins->setItemDelegateForColumn(1, new PinBusDelegate());
|
||||
connect(ui->treePins, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(updateBlock()));
|
||||
ui->treePins->viewport()->installEventFilter(this);
|
||||
|
||||
QToolBar * bar;
|
||||
bar = new QToolBar(ui->widgetBar);
|
||||
bar->setOrientation(Qt::Vertical);
|
||||
bar->addActions(drawtools->actionsForAdd());
|
||||
ui->widgetBar->setMinimumSize(bar->sizeHint());
|
||||
|
||||
bar = new QToolBar(ui->widgetBarZ);
|
||||
bar->setOrientation(Qt::Vertical);
|
||||
bar->addActions(drawtools->actionsForZ());
|
||||
bar->addSeparator();
|
||||
bar->addActions(QList<QAction*>() << ui->actionRemove_items);
|
||||
ui->widgetBarZ->setMinimumSize(bar->sizeHint());
|
||||
init = true;
|
||||
on_buttonClear_clicked();
|
||||
}
|
||||
|
||||
|
||||
BlockEditor::~BlockEditor() {
|
||||
init = false;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::loadFile(QString path) {
|
||||
if (path.isEmpty()) return;
|
||||
QFile f(path);
|
||||
if (f.open(QIODevice::ReadOnly)) {
|
||||
cur_file = path;
|
||||
loadModel(f.readAll());
|
||||
QDir::setCurrent(QFileInfo(path).dir().path());
|
||||
}
|
||||
setWindowTitle(src_title + QString(" - %1").arg(QFileInfo(path).baseName()));
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::loadModel(const QByteArray &model) {
|
||||
BlockItem b;
|
||||
b.loadModel(model);
|
||||
ui->spin_w->setValue(b.width());
|
||||
ui->spin_h->setValue(b.height());
|
||||
ui->spin_margin->setValue(b.pinsMargin());
|
||||
ui->button_color->setColor(b.color());
|
||||
block.loadModel(model);
|
||||
treePinsClear();
|
||||
ui->treePins->blockSignals(true);
|
||||
QVector<BlockItemPin * > pins = block.pins();
|
||||
foreach (BlockItemPin * p, pins) {
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(QStringList() << p->text() << QString::number(p->busType()));
|
||||
ti->setData(0, Qt::UserRole, qulonglong(p));
|
||||
ti->setData(0, Qt::UserRole + 1, (int)p->alignment());
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled);
|
||||
pin_tli[p->alignment()]->addChild(ti);
|
||||
}
|
||||
foreach (QGraphicsItem * i, block.decors()) {
|
||||
i->setData(1002, false);
|
||||
i->setData(1100, true);
|
||||
}
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
QByteArray BlockEditor::saveModel() {
|
||||
return block.saveModel();
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::setEditorMode(bool editorMode) {
|
||||
m_editorMode = editorMode;
|
||||
ui->buttonClear->setVisible(!editorMode);
|
||||
ui->buttonSave->setVisible(!editorMode);
|
||||
ui->buttonSaveAs->setVisible(!editorMode);
|
||||
ui->buttonLoad->setVisible(!editorMode);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::setPinsEditable(bool pinsEditable) {
|
||||
m_pinsEditable = pinsEditable;
|
||||
ui->treePins->setVisible(pinsEditable);
|
||||
ui->buttonPinAdd->setVisible(pinsEditable);
|
||||
ui->buttonPinClear->setVisible(pinsEditable);
|
||||
ui->buttonPinDelete->setVisible(pinsEditable);
|
||||
ui->buttonPinDup->setVisible(pinsEditable);
|
||||
ui->groupPins->setVisible(pinsEditable);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::selectionChanged() {
|
||||
if (!init) return;
|
||||
ui->actionRemove_items->setEnabled(!ui->blockView->scene()->selectedItems().isEmpty());
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::addItem(QGraphicsItem *item) {
|
||||
block.addDecor(item);
|
||||
item->setData(1002, false);
|
||||
item->setData(1100, true);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::updateBlock() {
|
||||
block.setSize(ui->spin_w->value(), ui->spin_h->value());
|
||||
block.setColor(ui->button_color->color());
|
||||
block.setPinsMargin(ui->spin_margin->value());
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::treePinsClear() {
|
||||
ui->treePins->blockSignals(true);
|
||||
ui->treePins->clear();
|
||||
QFont bf(font()); bf.setBold(true);
|
||||
QList<int> al = QList<int>() << Qt::AlignLeft << Qt::AlignRight << Qt::AlignTop << Qt::AlignBottom;
|
||||
QStringList an = QStringList() << "Left" << "Right" << "Top" << "Bottom";
|
||||
pin_tli.clear();
|
||||
for (int i = 0; i < al.size(); ++i) {
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem();
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
|
||||
ti->setData(0, Qt::UserRole, al[i]);
|
||||
ti->setText(0, an[i]);
|
||||
ti->setFont(0, bf);
|
||||
ui->treePins->addTopLevelItem(ti);
|
||||
ti->setFirstColumnSpanned(true);
|
||||
ti->setExpanded(true);
|
||||
pin_tli[al[i]] = ti;
|
||||
}
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
bool BlockEditor::eventFilter(QObject *o, QEvent *e) {
|
||||
if (!init) QWidget::eventFilter(o, e);
|
||||
if (o == ui->treePins->viewport()) {
|
||||
if (e->type() == QEvent::Drop) {
|
||||
QTimer::singleShot(0, this, SLOT(arrangePins()));
|
||||
}
|
||||
}
|
||||
if (o == ui->blockView->viewport()) {
|
||||
if (e->type() == QEvent::Resize) {
|
||||
ui->blockView->centerOn(&block);
|
||||
}
|
||||
}
|
||||
return QWidget::eventFilter(o, e);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::changeEvent(QEvent * e) {
|
||||
QWidget::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_actionRemove_items_triggered() {
|
||||
QList<QGraphicsItem*> si = ui->blockView->scene()->selectedItems();
|
||||
foreach (QGraphicsItem * i, si)
|
||||
block.removeDecor(i);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonSave_clicked() {
|
||||
if (cur_file.isEmpty()) {
|
||||
on_buttonSaveAs_clicked();
|
||||
return;
|
||||
}
|
||||
QFile f(cur_file);
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
f.write(saveModel());
|
||||
//setWindowTitle(src_title + QString(" - %1").arg(QFileInfo(c).baseName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonSaveAs_clicked() {
|
||||
QString c = QFileDialog::getSaveFileName(this, "Save block model to file", cur_file, "*.blockmodel");
|
||||
if (!c.isEmpty()) {
|
||||
QFile f(c);
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
cur_file = c;
|
||||
f.write(saveModel());
|
||||
setWindowTitle(src_title + QString(" - %1").arg(QFileInfo(c).baseName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonLoad_clicked() {
|
||||
QString c = QFileDialog::getOpenFileName(this, "Save block model to file", cur_file, "*.blockmodel");
|
||||
loadFile(c);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonClear_clicked() {
|
||||
BlockItem b;
|
||||
ui->spin_w->setValue(b.width());
|
||||
ui->spin_h->setValue(b.height());
|
||||
ui->spin_margin->setValue(b.pinsMargin());
|
||||
ui->button_color->setColor(b.color());
|
||||
block.loadModel(QByteArray());
|
||||
treePinsClear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinAdd_clicked() {
|
||||
ui->treePins->blockSignals(true);
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(QStringList() << "" << "0");
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled);
|
||||
ti->setData(0, Qt::UserRole, qulonglong(block.addPin(Qt::AlignLeft, ti->text(1).toInt(), ti->text(0))));
|
||||
ti->setData(0, Qt::UserRole + 1, (int)Qt::AlignLeft);
|
||||
pin_tli[Qt::AlignLeft]->addChild(ti);
|
||||
ui->treePins->setCurrentItem(ti);
|
||||
ui->treePins->blockSignals(false);
|
||||
updateBlock();
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinDup_clicked() {
|
||||
QTreeWidgetItem * ci = ui->treePins->currentItem();
|
||||
if (ci == 0) return;
|
||||
ui->treePins->blockSignals(true);
|
||||
QTreeWidgetItem * ti = ci->clone();
|
||||
ti->setText(0, ti->text(0));
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled);
|
||||
Qt::Alignment al = (Qt::Alignment)ci->data(0, Qt::UserRole + 1).toInt();
|
||||
ti->setData(0, Qt::UserRole, qulonglong(block.addPin(al, ci->text(1).toInt(), ci->text(0))));
|
||||
ti->setData(0, Qt::UserRole + 1, (int)al);
|
||||
pin_tli[al]->addChild(ti);
|
||||
ui->treePins->setCurrentItem(ti);
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinDelete_clicked() {
|
||||
ui->treePins->blockSignals(true);
|
||||
QList<QTreeWidgetItem*> si = ui->treePins->selectedItems();
|
||||
foreach (QTreeWidgetItem * i, si) {
|
||||
if (!i->parent()) continue;
|
||||
block.removePin((BlockItemPin*)(i->data(0, Qt::UserRole).toLongLong()));
|
||||
delete i;
|
||||
}
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinClear_clicked() {
|
||||
treePinsClear();
|
||||
block.clearPins();
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_treePins_itemChanged(QTreeWidgetItem * item, int column) {
|
||||
if (!item) return;
|
||||
BlockItemPin * pin = (BlockItemPin*)item->data(0, Qt::UserRole).toULongLong();
|
||||
if (!pin) return;
|
||||
switch (column) {
|
||||
case 0:
|
||||
ui->treePins->blockSignals(true);
|
||||
item->setText(0, item->text(0));
|
||||
pin->setText(item->text(0));
|
||||
ui->treePins->blockSignals(false);
|
||||
break;
|
||||
case 1: pin->setBusType(item->text(1).toInt()); break;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BlockEditor::arrangePins() {
|
||||
QVector<BlockItemPin * > pins = block.pins();
|
||||
// block.clearPins();
|
||||
QList<QTreeWidgetItem*> tli = pin_tli.values();
|
||||
foreach (QTreeWidgetItem * ti, tli) {
|
||||
for (int i = 0; i < ti->childCount(); ++i) {
|
||||
foreach (BlockItemPin * p, pins)
|
||||
if (p == (BlockItemPin*)(ti->child(i)->data(0, Qt::UserRole).toULongLong())) {
|
||||
p->setAlignment((Qt::Alignment)ti->data(0, Qt::UserRole).toInt());
|
||||
BlockItemPin * np = block.addPin(p, false);
|
||||
ti->child(i)->setData(0, Qt::UserRole, qulonglong(np));
|
||||
ti->child(i)->setData(0, Qt::UserRole + 1, ti->data(0, Qt::UserRole).toInt());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for (int i = 0; i < ui->treePins->topLevelItemCount(); ++i) {
|
||||
// QTreeWidgetItem * ti = ui->treePins->topLevelItem(i);
|
||||
// if (tli.contains(ti)) continue;
|
||||
// ti = ui->treePins->takeTopLevelItem(i);
|
||||
// pin_tli[ti->data(0, Qt::UserRole + 1).toInt()]->addChild(ti);
|
||||
// foreach (BlockItemPin * p, pins)
|
||||
// if (p->text() == ti->text(0)) {
|
||||
// p->setAlignment((Qt::Alignment)ti->data(0, Qt::UserRole + 1).toInt());
|
||||
// block.addPin(p, false);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
block.arrangePins();
|
||||
}
|
||||
|
||||
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
|
||||
|
||||
QWidget * PinAlignDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const {
|
||||
QComboBox * combo = new QComboBox(parent);
|
||||
int cv = index.data().toInt();
|
||||
combo->addItem("Left", int(Qt::AlignLeft)); if (cv == Qt::AlignLeft) combo->setCurrentIndex(0);
|
||||
combo->addItem("Right", int(Qt::AlignRight)); if (cv == Qt::AlignRight) combo->setCurrentIndex(1);
|
||||
combo->addItem("Top", int(Qt::AlignTop)); if (cv == Qt::AlignTop) combo->setCurrentIndex(2);
|
||||
combo->addItem("Bottom", int(Qt::AlignBottom)); if (cv == Qt::AlignBottom) combo->setCurrentIndex(3);
|
||||
combo->setGeometry(option.rect);
|
||||
return combo;
|
||||
}
|
||||
|
||||
|
||||
QString PinAlignDelegate::displayText(const QVariant & value, const QLocale & locale) const {
|
||||
int cv = value.toInt();
|
||||
switch (cv) {
|
||||
case Qt::AlignLeft: return tr("Left"); break;
|
||||
case Qt::AlignRight: return tr("Right"); break;
|
||||
case Qt::AlignTop: return tr("Top"); break;
|
||||
case Qt::AlignBottom: return tr("Bottom"); break;
|
||||
}
|
||||
return tr("unknown");
|
||||
}
|
||||
|
||||
|
||||
void PinAlignDelegate::setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const {
|
||||
model->setData(index, ((QComboBox*)editor)->itemData(((QComboBox*)editor)->currentIndex()).toInt());
|
||||
}
|
||||
|
||||
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
|
||||
|
||||
QWidget * PinBusDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const {
|
||||
QSpinBox * spin = new QSpinBox(parent);
|
||||
spin->setMinimum(-2147483648);
|
||||
spin->setMaximum(2147483647);
|
||||
spin->setValue(index.data().toInt());
|
||||
return spin;
|
||||
}
|
||||
|
||||
|
||||
QString PinBusDelegate::displayText(const QVariant & value, const QLocale & locale) const {
|
||||
int cv = value.toInt();
|
||||
return QString::number(cv);
|
||||
}
|
||||
|
||||
|
||||
void PinBusDelegate::setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const {
|
||||
model->setData(index, ((QSpinBox*)editor)->value());
|
||||
}
|
||||
|
||||
|
||||
|
||||
//void BlockEditor::on_treePins_itemSelectionChanged() {
|
||||
// arrangePins();
|
||||
// qDebug() << "111111111111111";
|
||||
//}
|
||||
#include "blockeditor.h"
|
||||
#include "ui_blockeditor.h"
|
||||
#include "drawtools.h"
|
||||
#include "blockview.h"
|
||||
#include <QToolBar>
|
||||
#include <QComboBox>
|
||||
#include <QFileDialog>
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
BlockEditor::BlockEditor(QWidget *parent) : QWidget(parent), ui(new Ui::BlockEditor) {
|
||||
init = false;
|
||||
m_editorMode = false;
|
||||
m_pinsEditable = true;
|
||||
ui->setupUi(this);
|
||||
src_title = windowTitle();
|
||||
connect(ui->blockView->scene(), SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
|
||||
block.setFlags(0);
|
||||
ui->blockView->addItem(&block);
|
||||
ui->blockView->viewport()->installEventFilter(this);
|
||||
DrawTools * drawtools = new DrawTools(ui->blockView);
|
||||
connect(drawtools, SIGNAL(itemCreated(QGraphicsItem*)), this, SLOT(addItem(QGraphicsItem*)));
|
||||
drawtools->textEditCombo()->addItems(QStringList() << "%name" << "%value" << "%id");
|
||||
ui->layoutProperties->addWidget(drawtools->propertyWidget());
|
||||
ui->actionRemove_items->setEnabled(false);
|
||||
ui->button_color->setColor(Qt::lightGray);
|
||||
ui->treePins->setItemDelegateForColumn(1, new PinBusDelegate());
|
||||
connect(ui->treePins, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(updateBlock()));
|
||||
ui->treePins->viewport()->installEventFilter(this);
|
||||
|
||||
QToolBar * bar;
|
||||
bar = new QToolBar(ui->widgetBar);
|
||||
bar->setOrientation(Qt::Vertical);
|
||||
bar->addActions(drawtools->actionsForAdd());
|
||||
ui->widgetBar->setMinimumSize(bar->sizeHint());
|
||||
|
||||
bar = new QToolBar(ui->widgetBarZ);
|
||||
bar->setOrientation(Qt::Vertical);
|
||||
bar->addActions(drawtools->actionsForZ());
|
||||
bar->addSeparator();
|
||||
bar->addActions(QList<QAction*>() << ui->actionRemove_items);
|
||||
ui->widgetBarZ->setMinimumSize(bar->sizeHint());
|
||||
init = true;
|
||||
on_buttonClear_clicked();
|
||||
}
|
||||
|
||||
|
||||
BlockEditor::~BlockEditor() {
|
||||
init = false;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::loadFile(QString path) {
|
||||
if (path.isEmpty()) return;
|
||||
QFile f(path);
|
||||
if (f.open(QIODevice::ReadOnly)) {
|
||||
cur_file = path;
|
||||
loadModel(f.readAll());
|
||||
QDir::setCurrent(QFileInfo(path).dir().path());
|
||||
}
|
||||
setWindowTitle(src_title + QString(" - %1").arg(QFileInfo(path).baseName()));
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::loadModel(const QByteArray &model) {
|
||||
BlockItem b;
|
||||
b.loadModel(model);
|
||||
ui->spin_w->setValue(b.width());
|
||||
ui->spin_h->setValue(b.height());
|
||||
ui->spin_margin->setValue(b.pinsMargin());
|
||||
ui->button_color->setColor(b.color());
|
||||
block.loadModel(model);
|
||||
treePinsClear();
|
||||
ui->treePins->blockSignals(true);
|
||||
QVector<BlockItemPin * > pins = block.pins();
|
||||
foreach (BlockItemPin * p, pins) {
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(QStringList() << p->text() << QString::number(p->busType()));
|
||||
ti->setData(0, Qt::UserRole, qulonglong(p));
|
||||
ti->setData(0, Qt::UserRole + 1, (int)p->alignment());
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled);
|
||||
pin_tli[p->alignment()]->addChild(ti);
|
||||
}
|
||||
foreach (QGraphicsItem * i, block.decors()) {
|
||||
i->setData(1002, false);
|
||||
i->setData(1100, true);
|
||||
}
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
QByteArray BlockEditor::saveModel() {
|
||||
return block.saveModel();
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::setEditorMode(bool editorMode) {
|
||||
m_editorMode = editorMode;
|
||||
ui->buttonClear->setVisible(!editorMode);
|
||||
ui->buttonSave->setVisible(!editorMode);
|
||||
ui->buttonSaveAs->setVisible(!editorMode);
|
||||
ui->buttonLoad->setVisible(!editorMode);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::setPinsEditable(bool pinsEditable) {
|
||||
m_pinsEditable = pinsEditable;
|
||||
ui->treePins->setVisible(pinsEditable);
|
||||
ui->buttonPinAdd->setVisible(pinsEditable);
|
||||
ui->buttonPinClear->setVisible(pinsEditable);
|
||||
ui->buttonPinDelete->setVisible(pinsEditable);
|
||||
ui->buttonPinDup->setVisible(pinsEditable);
|
||||
ui->groupPins->setVisible(pinsEditable);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::selectionChanged() {
|
||||
if (!init) return;
|
||||
ui->actionRemove_items->setEnabled(!ui->blockView->scene()->selectedItems().isEmpty());
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::addItem(QGraphicsItem *item) {
|
||||
block.addDecor(item);
|
||||
item->setData(1002, false);
|
||||
item->setData(1100, true);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::updateBlock() {
|
||||
block.setSize(ui->spin_w->value(), ui->spin_h->value());
|
||||
block.setColor(ui->button_color->color());
|
||||
block.setPinsMargin(ui->spin_margin->value());
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::treePinsClear() {
|
||||
ui->treePins->blockSignals(true);
|
||||
ui->treePins->clear();
|
||||
QFont bf(font()); bf.setBold(true);
|
||||
QList<int> al = QList<int>() << Qt::AlignLeft << Qt::AlignRight << Qt::AlignTop << Qt::AlignBottom;
|
||||
QStringList an = QStringList() << "Left" << "Right" << "Top" << "Bottom";
|
||||
pin_tli.clear();
|
||||
for (int i = 0; i < al.size(); ++i) {
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem();
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
|
||||
ti->setData(0, Qt::UserRole, al[i]);
|
||||
ti->setText(0, an[i]);
|
||||
ti->setFont(0, bf);
|
||||
ui->treePins->addTopLevelItem(ti);
|
||||
ti->setFirstColumnSpanned(true);
|
||||
ti->setExpanded(true);
|
||||
pin_tli[al[i]] = ti;
|
||||
}
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
bool BlockEditor::eventFilter(QObject *o, QEvent *e) {
|
||||
if (!init) QWidget::eventFilter(o, e);
|
||||
if (o == ui->treePins->viewport()) {
|
||||
if (e->type() == QEvent::Drop) {
|
||||
QTimer::singleShot(0, this, SLOT(arrangePins()));
|
||||
}
|
||||
}
|
||||
if (o == ui->blockView->viewport()) {
|
||||
if (e->type() == QEvent::Resize) {
|
||||
ui->blockView->centerOn(&block);
|
||||
}
|
||||
}
|
||||
return QWidget::eventFilter(o, e);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::changeEvent(QEvent * e) {
|
||||
QWidget::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_actionRemove_items_triggered() {
|
||||
QList<QGraphicsItem*> si = ui->blockView->scene()->selectedItems();
|
||||
foreach (QGraphicsItem * i, si)
|
||||
block.removeDecor(i);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonSave_clicked() {
|
||||
if (cur_file.isEmpty()) {
|
||||
on_buttonSaveAs_clicked();
|
||||
return;
|
||||
}
|
||||
QFile f(cur_file);
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
f.write(saveModel());
|
||||
//setWindowTitle(src_title + QString(" - %1").arg(QFileInfo(c).baseName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonSaveAs_clicked() {
|
||||
QString c = QFileDialog::getSaveFileName(this, "Save block model to file", cur_file, "*.blockmodel");
|
||||
if (!c.isEmpty()) {
|
||||
QFile f(c);
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
cur_file = c;
|
||||
f.write(saveModel());
|
||||
setWindowTitle(src_title + QString(" - %1").arg(QFileInfo(c).baseName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonLoad_clicked() {
|
||||
QString c = QFileDialog::getOpenFileName(this, "Save block model to file", cur_file, "*.blockmodel");
|
||||
loadFile(c);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonClear_clicked() {
|
||||
BlockItem b;
|
||||
ui->spin_w->setValue(b.width());
|
||||
ui->spin_h->setValue(b.height());
|
||||
ui->spin_margin->setValue(b.pinsMargin());
|
||||
ui->button_color->setColor(b.color());
|
||||
block.loadModel(QByteArray());
|
||||
treePinsClear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinAdd_clicked() {
|
||||
ui->treePins->blockSignals(true);
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(QStringList() << "" << "0");
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled);
|
||||
ti->setData(0, Qt::UserRole, qulonglong(block.addPin(Qt::AlignLeft, ti->text(1).toInt(), ti->text(0))));
|
||||
ti->setData(0, Qt::UserRole + 1, (int)Qt::AlignLeft);
|
||||
pin_tli[Qt::AlignLeft]->addChild(ti);
|
||||
ui->treePins->setCurrentItem(ti);
|
||||
ui->treePins->blockSignals(false);
|
||||
updateBlock();
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinDup_clicked() {
|
||||
QTreeWidgetItem * ci = ui->treePins->currentItem();
|
||||
if (ci == 0) return;
|
||||
ui->treePins->blockSignals(true);
|
||||
QTreeWidgetItem * ti = ci->clone();
|
||||
ti->setText(0, ti->text(0));
|
||||
ti->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsDragEnabled);
|
||||
Qt::Alignment al = (Qt::Alignment)ci->data(0, Qt::UserRole + 1).toInt();
|
||||
ti->setData(0, Qt::UserRole, qulonglong(block.addPin(al, ci->text(1).toInt(), ci->text(0))));
|
||||
ti->setData(0, Qt::UserRole + 1, (int)al);
|
||||
pin_tli[al]->addChild(ti);
|
||||
ui->treePins->setCurrentItem(ti);
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinDelete_clicked() {
|
||||
ui->treePins->blockSignals(true);
|
||||
QList<QTreeWidgetItem*> si = ui->treePins->selectedItems();
|
||||
foreach (QTreeWidgetItem * i, si) {
|
||||
if (!i->parent()) continue;
|
||||
block.removePin((BlockItemPin*)(i->data(0, Qt::UserRole).toLongLong()));
|
||||
delete i;
|
||||
}
|
||||
ui->treePins->blockSignals(false);
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_buttonPinClear_clicked() {
|
||||
treePinsClear();
|
||||
block.clearPins();
|
||||
}
|
||||
|
||||
|
||||
void BlockEditor::on_treePins_itemChanged(QTreeWidgetItem * item, int column) {
|
||||
if (!item) return;
|
||||
BlockItemPin * pin = (BlockItemPin*)item->data(0, Qt::UserRole).toULongLong();
|
||||
if (!pin) return;
|
||||
switch (column) {
|
||||
case 0:
|
||||
ui->treePins->blockSignals(true);
|
||||
item->setText(0, item->text(0));
|
||||
pin->setText(item->text(0));
|
||||
ui->treePins->blockSignals(false);
|
||||
break;
|
||||
case 1: pin->setBusType(item->text(1).toInt()); break;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BlockEditor::arrangePins() {
|
||||
QVector<BlockItemPin * > pins = block.pins();
|
||||
// block.clearPins();
|
||||
QList<QTreeWidgetItem*> tli = pin_tli.values();
|
||||
foreach (QTreeWidgetItem * ti, tli) {
|
||||
for (int i = 0; i < ti->childCount(); ++i) {
|
||||
foreach (BlockItemPin * p, pins)
|
||||
if (p == (BlockItemPin*)(ti->child(i)->data(0, Qt::UserRole).toULongLong())) {
|
||||
p->setAlignment((Qt::Alignment)ti->data(0, Qt::UserRole).toInt());
|
||||
BlockItemPin * np = block.addPin(p, false);
|
||||
ti->child(i)->setData(0, Qt::UserRole, qulonglong(np));
|
||||
ti->child(i)->setData(0, Qt::UserRole + 1, ti->data(0, Qt::UserRole).toInt());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for (int i = 0; i < ui->treePins->topLevelItemCount(); ++i) {
|
||||
// QTreeWidgetItem * ti = ui->treePins->topLevelItem(i);
|
||||
// if (tli.contains(ti)) continue;
|
||||
// ti = ui->treePins->takeTopLevelItem(i);
|
||||
// pin_tli[ti->data(0, Qt::UserRole + 1).toInt()]->addChild(ti);
|
||||
// foreach (BlockItemPin * p, pins)
|
||||
// if (p->text() == ti->text(0)) {
|
||||
// p->setAlignment((Qt::Alignment)ti->data(0, Qt::UserRole + 1).toInt());
|
||||
// block.addPin(p, false);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
block.arrangePins();
|
||||
}
|
||||
|
||||
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
|
||||
|
||||
QWidget * PinAlignDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const {
|
||||
QComboBox * combo = new QComboBox(parent);
|
||||
int cv = index.data().toInt();
|
||||
combo->addItem("Left", int(Qt::AlignLeft)); if (cv == Qt::AlignLeft) combo->setCurrentIndex(0);
|
||||
combo->addItem("Right", int(Qt::AlignRight)); if (cv == Qt::AlignRight) combo->setCurrentIndex(1);
|
||||
combo->addItem("Top", int(Qt::AlignTop)); if (cv == Qt::AlignTop) combo->setCurrentIndex(2);
|
||||
combo->addItem("Bottom", int(Qt::AlignBottom)); if (cv == Qt::AlignBottom) combo->setCurrentIndex(3);
|
||||
combo->setGeometry(option.rect);
|
||||
return combo;
|
||||
}
|
||||
|
||||
|
||||
QString PinAlignDelegate::displayText(const QVariant & value, const QLocale & locale) const {
|
||||
int cv = value.toInt();
|
||||
switch (cv) {
|
||||
case Qt::AlignLeft: return tr("Left"); break;
|
||||
case Qt::AlignRight: return tr("Right"); break;
|
||||
case Qt::AlignTop: return tr("Top"); break;
|
||||
case Qt::AlignBottom: return tr("Bottom"); break;
|
||||
}
|
||||
return tr("unknown");
|
||||
}
|
||||
|
||||
|
||||
void PinAlignDelegate::setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const {
|
||||
model->setData(index, ((QComboBox*)editor)->itemData(((QComboBox*)editor)->currentIndex()).toInt());
|
||||
}
|
||||
|
||||
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
/// ***********************************************************
|
||||
|
||||
|
||||
QWidget * PinBusDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const {
|
||||
QSpinBox * spin = new QSpinBox(parent);
|
||||
spin->setMinimum(-2147483648);
|
||||
spin->setMaximum(2147483647);
|
||||
spin->setValue(index.data().toInt());
|
||||
return spin;
|
||||
}
|
||||
|
||||
|
||||
QString PinBusDelegate::displayText(const QVariant & value, const QLocale & locale) const {
|
||||
int cv = value.toInt();
|
||||
return QString::number(cv);
|
||||
}
|
||||
|
||||
|
||||
void PinBusDelegate::setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const {
|
||||
model->setData(index, ((QSpinBox*)editor)->value());
|
||||
}
|
||||
|
||||
|
||||
|
||||
//void BlockEditor::on_treePins_itemSelectionChanged() {
|
||||
// arrangePins();
|
||||
// qDebug() << "111111111111111";
|
||||
//}
|
||||
@@ -1,111 +1,111 @@
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BLOCKEDITOR_H
|
||||
#define BLOCKEDITOR_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QStyledItemDelegate>
|
||||
#include "blockitem.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class BlockEditor;
|
||||
}
|
||||
|
||||
|
||||
class QAD_EXPORT BlockEditor : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool editorMode READ editorMode WRITE setEditorMode)
|
||||
Q_PROPERTY(bool pinsEditable READ pinsEditable WRITE setPinsEditable)
|
||||
public:
|
||||
explicit BlockEditor(QWidget *parent = 0);
|
||||
~BlockEditor();
|
||||
|
||||
|
||||
bool editorMode() const {return m_editorMode;}
|
||||
bool pinsEditable() const {return m_pinsEditable;}
|
||||
|
||||
public slots:
|
||||
void loadFile(QString path);
|
||||
void loadModel(const QByteArray & model);
|
||||
QByteArray saveModel();
|
||||
void setEditorMode(bool editorMode);
|
||||
void setPinsEditable(bool pinsEditable);
|
||||
|
||||
private slots:
|
||||
void selectionChanged();
|
||||
void addItem(QGraphicsItem * item);
|
||||
void updateBlock();
|
||||
void treePinsClear();
|
||||
void arrangePins();
|
||||
void on_actionRemove_items_triggered();
|
||||
void on_buttonSave_clicked();
|
||||
void on_buttonSaveAs_clicked();
|
||||
void on_buttonLoad_clicked();
|
||||
void on_buttonClear_clicked();
|
||||
void on_buttonPinAdd_clicked();
|
||||
void on_buttonPinDup_clicked();
|
||||
void on_buttonPinDelete_clicked();
|
||||
void on_buttonPinClear_clicked();
|
||||
void on_treePins_itemChanged(QTreeWidgetItem *item, int column);
|
||||
// void on_treePins_itemSelectionChanged();
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject * o, QEvent * e);
|
||||
void changeEvent(QEvent * e);
|
||||
|
||||
Ui::BlockEditor *ui;
|
||||
QMap<int, QTreeWidgetItem*> pin_tli;
|
||||
BlockItem block;
|
||||
QString src_title, cur_file;
|
||||
bool init;
|
||||
bool m_editorMode;
|
||||
bool m_pinsEditable;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class QAD_EXPORT PinAlignDelegate: public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
PinAlignDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
||||
QWidget * createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const;
|
||||
QString displayText(const QVariant & value, const QLocale & locale) const;
|
||||
void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const {return QSize(60, 26);}
|
||||
};
|
||||
|
||||
|
||||
class QAD_EXPORT PinBusDelegate: public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
PinBusDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
||||
QWidget * createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const;
|
||||
QString displayText(const QVariant & value, const QLocale & locale) const;
|
||||
void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const {return QSize(60, 26);}
|
||||
private:
|
||||
typedef QPair<int, QString> ISPair;
|
||||
QVector<ISPair> buses;
|
||||
};
|
||||
|
||||
#endif // BLOCKEDITOR_H
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BLOCKEDITOR_H
|
||||
#define BLOCKEDITOR_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QStyledItemDelegate>
|
||||
#include "blockitem.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class BlockEditor;
|
||||
}
|
||||
|
||||
|
||||
class QAD_EXPORT BlockEditor : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool editorMode READ editorMode WRITE setEditorMode)
|
||||
Q_PROPERTY(bool pinsEditable READ pinsEditable WRITE setPinsEditable)
|
||||
public:
|
||||
explicit BlockEditor(QWidget *parent = 0);
|
||||
~BlockEditor();
|
||||
|
||||
|
||||
bool editorMode() const {return m_editorMode;}
|
||||
bool pinsEditable() const {return m_pinsEditable;}
|
||||
|
||||
public slots:
|
||||
void loadFile(QString path);
|
||||
void loadModel(const QByteArray & model);
|
||||
QByteArray saveModel();
|
||||
void setEditorMode(bool editorMode);
|
||||
void setPinsEditable(bool pinsEditable);
|
||||
|
||||
private slots:
|
||||
void selectionChanged();
|
||||
void addItem(QGraphicsItem * item);
|
||||
void updateBlock();
|
||||
void treePinsClear();
|
||||
void arrangePins();
|
||||
void on_actionRemove_items_triggered();
|
||||
void on_buttonSave_clicked();
|
||||
void on_buttonSaveAs_clicked();
|
||||
void on_buttonLoad_clicked();
|
||||
void on_buttonClear_clicked();
|
||||
void on_buttonPinAdd_clicked();
|
||||
void on_buttonPinDup_clicked();
|
||||
void on_buttonPinDelete_clicked();
|
||||
void on_buttonPinClear_clicked();
|
||||
void on_treePins_itemChanged(QTreeWidgetItem *item, int column);
|
||||
// void on_treePins_itemSelectionChanged();
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject * o, QEvent * e);
|
||||
void changeEvent(QEvent * e);
|
||||
|
||||
Ui::BlockEditor *ui;
|
||||
QMap<int, QTreeWidgetItem*> pin_tli;
|
||||
BlockItem block;
|
||||
QString src_title, cur_file;
|
||||
bool init;
|
||||
bool m_editorMode;
|
||||
bool m_pinsEditable;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class QAD_EXPORT PinAlignDelegate: public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
PinAlignDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
||||
QWidget * createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const;
|
||||
QString displayText(const QVariant & value, const QLocale & locale) const;
|
||||
void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const {return QSize(60, 26);}
|
||||
};
|
||||
|
||||
|
||||
class QAD_EXPORT PinBusDelegate: public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
PinBusDelegate(QObject * parent = 0): QStyledItemDelegate(parent) {}
|
||||
QWidget * createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const;
|
||||
QString displayText(const QVariant & value, const QLocale & locale) const;
|
||||
void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const {return QSize(60, 26);}
|
||||
private:
|
||||
typedef QPair<int, QString> ISPair;
|
||||
QVector<ISPair> buses;
|
||||
};
|
||||
|
||||
#endif // BLOCKEDITOR_H
|
||||
@@ -1,543 +1,543 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BlockEditor</class>
|
||||
<widget class="QWidget" name="BlockEditor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>847</width>
|
||||
<height>810</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Block editor</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="qad_blockview.qrc">
|
||||
<normaloff>:/icons/blockview.png</normaloff>:/icons/blockview.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupParameters">
|
||||
<property name="title">
|
||||
<string>Block parameters</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spin_w">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Heigth:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spin_h">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>60</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Pins margin:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="spin_margin">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="ColorButton" name="button_color"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupPins">
|
||||
<property name="title">
|
||||
<string>Pins</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treePins">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="dragDropMode">
|
||||
<enum>QAbstractItemView::InternalMove</enum>
|
||||
</property>
|
||||
<property name="defaultDropAction">
|
||||
<enum>Qt::MoveAction</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="itemsExpandable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>200</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Bus</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinAdd">
|
||||
<property name="toolTip">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinDup">
|
||||
<property name="toolTip">
|
||||
<string>Clone</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinDelete">
|
||||
<property name="toolTip">
|
||||
<string>Remove selected</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinClear">
|
||||
<property name="toolTip">
|
||||
<string>Remove all</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frameProperties">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="layoutProperties">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetBar" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetBarZ" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BlockView" name="blockView">
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="navigateAnimationEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="miniMap" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="zoomWheelOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSave">
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSaveAs">
|
||||
<property name="text">
|
||||
<string>Save as ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonLoad">
|
||||
<property name="text">
|
||||
<string>Load ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../application/qad_application.qrc">
|
||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+O</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonClear">
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="actionRemove_items">
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove items</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlockView</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>blockview.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>colorbutton.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../utils/qad_utils.qrc"/>
|
||||
<include location="../application/qad_application.qrc"/>
|
||||
<include location="qad_blockview.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>spin_w</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>170</x>
|
||||
<y>21</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>254</x>
|
||||
<y>1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spin_h</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>250</x>
|
||||
<y>49</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>373</x>
|
||||
<y>5</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spin_margin</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>350</x>
|
||||
<y>90</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>492</x>
|
||||
<y>8</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>button_color</sender>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>561</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>613</x>
|
||||
<y>6</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>updateBlock()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BlockEditor</class>
|
||||
<widget class="QWidget" name="BlockEditor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>847</width>
|
||||
<height>810</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Block editor</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="qad_blockview.qrc">
|
||||
<normaloff>:/icons/blockview.png</normaloff>:/icons/blockview.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupParameters">
|
||||
<property name="title">
|
||||
<string>Block parameters</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spin_w">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Heigth:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spin_h">
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>60</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Pins margin:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="spin_margin">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="ColorButton" name="button_color"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupPins">
|
||||
<property name="title">
|
||||
<string>Pins</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treePins">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="dragDropMode">
|
||||
<enum>QAbstractItemView::InternalMove</enum>
|
||||
</property>
|
||||
<property name="defaultDropAction">
|
||||
<enum>Qt::MoveAction</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="itemsExpandable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>200</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Bus</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinAdd">
|
||||
<property name="toolTip">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinDup">
|
||||
<property name="toolTip">
|
||||
<string>Clone</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinDelete">
|
||||
<property name="toolTip">
|
||||
<string>Remove selected</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonPinClear">
|
||||
<property name="toolTip">
|
||||
<string>Remove all</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frameProperties">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="layoutProperties">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetBar" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetBarZ" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BlockView" name="blockView">
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="navigateAnimationEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="miniMap" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="zoomWheelOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSave">
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSaveAs">
|
||||
<property name="text">
|
||||
<string>Save as ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonLoad">
|
||||
<property name="text">
|
||||
<string>Load ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../application/qad_application.qrc">
|
||||
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+O</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonClear">
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="actionRemove_items">
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove items</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlockView</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>blockview.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>colorbutton.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../utils/qad_utils.qrc"/>
|
||||
<include location="../application/qad_application.qrc"/>
|
||||
<include location="qad_blockview.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>spin_w</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>170</x>
|
||||
<y>21</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>254</x>
|
||||
<y>1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spin_h</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>250</x>
|
||||
<y>49</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>373</x>
|
||||
<y>5</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spin_margin</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>350</x>
|
||||
<y>90</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>492</x>
|
||||
<y>8</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>button_color</sender>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
<receiver>BlockEditor</receiver>
|
||||
<slot>updateBlock()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>561</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>613</x>
|
||||
<y>6</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>updateBlock()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
@@ -1,163 +1,163 @@
|
||||
#include "blockview.h"
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
BlockItemPin::BlockItemPin(Qt::Alignment a, int bus_type_, const QString & text_, QGraphicsObject * _parent): QGraphicsObject(_parent), ell_item(this), text_item(this) {
|
||||
parent_ = 0;
|
||||
setData(1004, "pin");
|
||||
setAcceptHoverEvents(true);
|
||||
text_item.setData(1002, true);
|
||||
ell_item.setData(1003, true);
|
||||
br[Disconnected] = QBrush(Qt::lightGray);
|
||||
br[Connected] = QBrush(Qt::darkGreen);
|
||||
br[Hover] = QBrush(Qt::blue);
|
||||
br[Drop] = QBrush(Qt::green);
|
||||
br[Accept] = QBrush(Qt::green);
|
||||
br[Reject] = QBrush(Qt::red);
|
||||
anim_pin_size.setTargetObject(this);
|
||||
anim_pin_size.setPropertyName("pinSize");
|
||||
anim_pin_size.setEasingCurve(QEasingCurve::OutElastic);
|
||||
anim_pin_size.setDuration(700);
|
||||
anim_accept.setTargetObject(this);
|
||||
anim_accept.setPropertyName("pinSize");
|
||||
anim_accept.setEasingCurve(QEasingCurve::InOutQuad);
|
||||
anim_accept.setDuration(150);
|
||||
connect(&anim_accept, SIGNAL(finished()), this, SLOT(animationAccept()));
|
||||
setState(Disconnected);
|
||||
setAlignment(a);
|
||||
setBusType(bus_type_);
|
||||
setText(text_);
|
||||
setZValue(2.);
|
||||
setDirection(BlockItemPin::InputOutput);
|
||||
_reparent();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::animAccept() {
|
||||
if (!((BlockView *)scene()->views().back())->isBlockAnimationEnabled() && anim_accept.state() != QAbstractAnimation::Running) return;
|
||||
anim_accept.setStartValue(pinSize());
|
||||
anim_accept.setEndValue(10.);
|
||||
anim_accept.start();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::setState(State s) {
|
||||
State os = state_;
|
||||
state_ = s;
|
||||
setBrush(br[int(state_)]);
|
||||
if (s == Accept && os != Accept) {
|
||||
animAccept();
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::enlargePin(bool enlarge) {
|
||||
double sz = enlarge ? 12. : 7;
|
||||
if (anim_accept.state() == QAbstractAnimation::Running && enlarge) {
|
||||
anim_accept.stop();
|
||||
resizePin(sz);
|
||||
}
|
||||
if (!((BlockView *)scene()->views().back())->isBlockAnimationEnabled()) {
|
||||
resizePin(sz);
|
||||
return;
|
||||
}
|
||||
if (sz == anim_pin_size.endValue())
|
||||
return;
|
||||
anim_pin_size.stop();
|
||||
anim_pin_size.setStartValue(pinSize());
|
||||
anim_pin_size.setEndValue(sz);
|
||||
anim_pin_size.start();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::resizePin(double r) {
|
||||
ell_item.setRect(-r, -r, r+r, r+r);
|
||||
}
|
||||
|
||||
|
||||
double BlockItemPin::pinSize() const {
|
||||
return ell_item.rect().width() / 2.;
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::animationAccept() {
|
||||
if (anim_accept.endValue().toDouble() == 7.) return;
|
||||
anim_accept.setStartValue(pinSize());
|
||||
anim_accept.setEndValue(7.);
|
||||
anim_accept.start();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::_init(bool affect_parent) {
|
||||
text_item.setFont(AlignedTextItem::sceneFont(QApplication::font()));
|
||||
QRectF tbr = text_item.boundingRect();
|
||||
const double r = 7.;
|
||||
ell_item.setRect(-r, -r, r+r, r+r);
|
||||
ell_item.setSpanAngle(16*180);
|
||||
text_item.resetTransform();
|
||||
text_item.setPos(0, -tbr.height() / 2.);
|
||||
text_item.setTransformOriginPoint(0, tbr.height() / 2.);
|
||||
switch (align) {
|
||||
case Qt::AlignBottom: ell_item.setStartAngle(16*0); text_item.setRotation(-90.); text_item.moveBy(0, -r * 1.5); break;
|
||||
case Qt::AlignRight: ell_item.setStartAngle(16*90); text_item.setRotation(0.); text_item.moveBy(-tbr.width() - r * 1.5, 0); break;
|
||||
case Qt::AlignTop: ell_item.setStartAngle(16*180); text_item.setRotation(-90.); text_item.moveBy(0, tbr.width() + r * 1.5); break;
|
||||
case Qt::AlignLeft: ell_item.setStartAngle(16*270); text_item.setRotation(0.); text_item.moveBy(r * 1.5, 0); break;
|
||||
default: break;
|
||||
}
|
||||
if (affect_parent && parent_)
|
||||
parent_->arrangePins();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::_reparent() {
|
||||
if (parentItem() == 0) return;
|
||||
if (qgraphicsitem_cast<BlockItem*>(parentItem()) == 0) return;
|
||||
QPen p = qgraphicsitem_cast<BlockItem*>(parentItem())->g_main.pen();
|
||||
ell_item.setPen(p);
|
||||
if (scene()) {
|
||||
text_item.setFont(AlignedTextItem::sceneFont(scene()->font()));
|
||||
QRectF tbr = text_item.boundingRect();
|
||||
text_item.resetTransform();
|
||||
text_item.setPos(0, -tbr.height() / 2.);
|
||||
text_item.setTransformOriginPoint(0, tbr.height() / 2.);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QGraphicsView * BlockItemPin::_view() const {
|
||||
if (!scene()) return 0;
|
||||
if (scene()->views().isEmpty()) return 0;
|
||||
return scene()->views().back();
|
||||
}
|
||||
|
||||
|
||||
QVariant BlockItemPin::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant & value) {
|
||||
if (change == QGraphicsItem::ItemParentChange)
|
||||
_reparent();
|
||||
return QGraphicsItem::itemChange(change, value);
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::hoverEnterEvent(QGraphicsSceneHoverEvent * e) {
|
||||
QGraphicsView * v = _view();
|
||||
bool m_pin_mc = false;
|
||||
if (v) {
|
||||
QMetaObject::invokeMethod(v, "getPinMC", Q_ARG(bool*, &m_pin_mc));
|
||||
QMetaObject::invokeMethod(v, "pinHoverInOut", Qt::QueuedConnection, Q_ARG(BlockItemPin*, this));
|
||||
}
|
||||
if ((state() != Disconnected) && !m_pin_mc) return;
|
||||
saveState();
|
||||
setState(BlockItemPin::Hover);
|
||||
enlargePin(true);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::hoverLeaveEvent(QGraphicsSceneHoverEvent * e) {
|
||||
QGraphicsView * v = _view();
|
||||
restoreState();
|
||||
enlargePin(false);
|
||||
update();
|
||||
if (v) QMetaObject::invokeMethod(v, "pinHoverInOut", Q_ARG(BlockItemPin*, 0));
|
||||
}
|
||||
#include "blockview.h"
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
BlockItemPin::BlockItemPin(Qt::Alignment a, int bus_type_, const QString & text_, QGraphicsObject * _parent): QGraphicsObject(_parent), ell_item(this), text_item(this) {
|
||||
parent_ = 0;
|
||||
setData(1004, "pin");
|
||||
setAcceptHoverEvents(true);
|
||||
text_item.setData(1002, true);
|
||||
ell_item.setData(1003, true);
|
||||
br[Disconnected] = QBrush(Qt::lightGray);
|
||||
br[Connected] = QBrush(Qt::darkGreen);
|
||||
br[Hover] = QBrush(Qt::blue);
|
||||
br[Drop] = QBrush(Qt::green);
|
||||
br[Accept] = QBrush(Qt::green);
|
||||
br[Reject] = QBrush(Qt::red);
|
||||
anim_pin_size.setTargetObject(this);
|
||||
anim_pin_size.setPropertyName("pinSize");
|
||||
anim_pin_size.setEasingCurve(QEasingCurve::OutElastic);
|
||||
anim_pin_size.setDuration(700);
|
||||
anim_accept.setTargetObject(this);
|
||||
anim_accept.setPropertyName("pinSize");
|
||||
anim_accept.setEasingCurve(QEasingCurve::InOutQuad);
|
||||
anim_accept.setDuration(150);
|
||||
connect(&anim_accept, SIGNAL(finished()), this, SLOT(animationAccept()));
|
||||
setState(Disconnected);
|
||||
setAlignment(a);
|
||||
setBusType(bus_type_);
|
||||
setText(text_);
|
||||
setZValue(2.);
|
||||
setDirection(BlockItemPin::InputOutput);
|
||||
_reparent();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::animAccept() {
|
||||
if (!((BlockView *)scene()->views().back())->isBlockAnimationEnabled() && anim_accept.state() != QAbstractAnimation::Running) return;
|
||||
anim_accept.setStartValue(pinSize());
|
||||
anim_accept.setEndValue(10.);
|
||||
anim_accept.start();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::setState(State s) {
|
||||
State os = state_;
|
||||
state_ = s;
|
||||
setBrush(br[int(state_)]);
|
||||
if (s == Accept && os != Accept) {
|
||||
animAccept();
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::enlargePin(bool enlarge) {
|
||||
double sz = enlarge ? 12. : 7;
|
||||
if (anim_accept.state() == QAbstractAnimation::Running && enlarge) {
|
||||
anim_accept.stop();
|
||||
resizePin(sz);
|
||||
}
|
||||
if (!((BlockView *)scene()->views().back())->isBlockAnimationEnabled()) {
|
||||
resizePin(sz);
|
||||
return;
|
||||
}
|
||||
if (sz == anim_pin_size.endValue())
|
||||
return;
|
||||
anim_pin_size.stop();
|
||||
anim_pin_size.setStartValue(pinSize());
|
||||
anim_pin_size.setEndValue(sz);
|
||||
anim_pin_size.start();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::resizePin(double r) {
|
||||
ell_item.setRect(-r, -r, r+r, r+r);
|
||||
}
|
||||
|
||||
|
||||
double BlockItemPin::pinSize() const {
|
||||
return ell_item.rect().width() / 2.;
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::animationAccept() {
|
||||
if (anim_accept.endValue().toDouble() == 7.) return;
|
||||
anim_accept.setStartValue(pinSize());
|
||||
anim_accept.setEndValue(7.);
|
||||
anim_accept.start();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::_init(bool affect_parent) {
|
||||
text_item.setFont(AlignedTextItem::sceneFont(QApplication::font()));
|
||||
QRectF tbr = text_item.boundingRect();
|
||||
const double r = 7.;
|
||||
ell_item.setRect(-r, -r, r+r, r+r);
|
||||
ell_item.setSpanAngle(16*180);
|
||||
text_item.resetTransform();
|
||||
text_item.setPos(0, -tbr.height() / 2.);
|
||||
text_item.setTransformOriginPoint(0, tbr.height() / 2.);
|
||||
switch (align) {
|
||||
case Qt::AlignBottom: ell_item.setStartAngle(16*0); text_item.setRotation(-90.); text_item.moveBy(0, -r * 1.5); break;
|
||||
case Qt::AlignRight: ell_item.setStartAngle(16*90); text_item.setRotation(0.); text_item.moveBy(-tbr.width() - r * 1.5, 0); break;
|
||||
case Qt::AlignTop: ell_item.setStartAngle(16*180); text_item.setRotation(-90.); text_item.moveBy(0, tbr.width() + r * 1.5); break;
|
||||
case Qt::AlignLeft: ell_item.setStartAngle(16*270); text_item.setRotation(0.); text_item.moveBy(r * 1.5, 0); break;
|
||||
default: break;
|
||||
}
|
||||
if (affect_parent && parent_)
|
||||
parent_->arrangePins();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::_reparent() {
|
||||
if (parentItem() == 0) return;
|
||||
if (qgraphicsitem_cast<BlockItem*>(parentItem()) == 0) return;
|
||||
QPen p = qgraphicsitem_cast<BlockItem*>(parentItem())->g_main.pen();
|
||||
ell_item.setPen(p);
|
||||
if (scene()) {
|
||||
text_item.setFont(AlignedTextItem::sceneFont(scene()->font()));
|
||||
QRectF tbr = text_item.boundingRect();
|
||||
text_item.resetTransform();
|
||||
text_item.setPos(0, -tbr.height() / 2.);
|
||||
text_item.setTransformOriginPoint(0, tbr.height() / 2.);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QGraphicsView * BlockItemPin::_view() const {
|
||||
if (!scene()) return 0;
|
||||
if (scene()->views().isEmpty()) return 0;
|
||||
return scene()->views().back();
|
||||
}
|
||||
|
||||
|
||||
QVariant BlockItemPin::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant & value) {
|
||||
if (change == QGraphicsItem::ItemParentChange)
|
||||
_reparent();
|
||||
return QGraphicsItem::itemChange(change, value);
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::hoverEnterEvent(QGraphicsSceneHoverEvent * e) {
|
||||
QGraphicsView * v = _view();
|
||||
bool m_pin_mc = false;
|
||||
if (v) {
|
||||
QMetaObject::invokeMethod(v, "getPinMC", Q_ARG(bool*, &m_pin_mc));
|
||||
QMetaObject::invokeMethod(v, "pinHoverInOut", Qt::QueuedConnection, Q_ARG(BlockItemPin*, this));
|
||||
}
|
||||
if ((state() != Disconnected) && !m_pin_mc) return;
|
||||
saveState();
|
||||
setState(BlockItemPin::Hover);
|
||||
enlargePin(true);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void BlockItemPin::hoverLeaveEvent(QGraphicsSceneHoverEvent * e) {
|
||||
QGraphicsView * v = _view();
|
||||
restoreState();
|
||||
enlargePin(false);
|
||||
update();
|
||||
if (v) QMetaObject::invokeMethod(v, "pinHoverInOut", Q_ARG(BlockItemPin*, 0));
|
||||
}
|
||||
@@ -1,131 +1,131 @@
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BLOCKITEMPIN_H
|
||||
#define BLOCKITEMPIN_H
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsObject>
|
||||
#include <QGraphicsEllipseItem>
|
||||
#include <QGraphicsSceneHoverEvent>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QStack>
|
||||
#include <QDebug>
|
||||
#include <QPropertyAnimation>
|
||||
#include <qmath.h>
|
||||
#include "blockbase.h"
|
||||
#include "alignedtextitem.h"
|
||||
|
||||
|
||||
class BlockItem;
|
||||
class BlockBusItem;
|
||||
|
||||
|
||||
class QAD_EXPORT BlockItemPin: public QGraphicsObject, public PropertyStorage
|
||||
{
|
||||
friend class BlockView;
|
||||
friend class BlockItem;
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(double pinSize READ pinSize WRITE resizePin DESIGNABLE false SCRIPTABLE false)
|
||||
public:
|
||||
BlockItemPin(Qt::Alignment a = Qt::AlignLeft, int bus_type = 0, const QString & text_ = QString(), QGraphicsObject * parent_ = 0);
|
||||
|
||||
enum State {
|
||||
Disconnected,
|
||||
Connected,
|
||||
Hover,
|
||||
Drop,
|
||||
Accept,
|
||||
Reject
|
||||
};
|
||||
|
||||
enum Direction {
|
||||
None = 0x0,
|
||||
Input = 0x1,
|
||||
Output = 0x2,
|
||||
InputOutput = 0x3
|
||||
};
|
||||
|
||||
void setPen(const QPen & p) {ell_item.setPen(p);}
|
||||
QPen pen() const {return ell_item.pen();}
|
||||
void setBrush(const QBrush & b) {ell_item.setBrush(b);}
|
||||
QBrush brush() const {return ell_item.brush();}
|
||||
|
||||
int busType() const {return bus_type;}
|
||||
Qt::Alignment alignment() const {return align;}
|
||||
Direction direction() const {return dir;}
|
||||
QString text() const {return text_item.text();}
|
||||
State state() const {return state_;}
|
||||
|
||||
void setBusType(int type_) {bus_type = type_;}
|
||||
void setAlignment(Qt::Alignment a) {align = a; _init(true);}
|
||||
void setDirection(Direction d) {dir = d; _init(true);}
|
||||
void setText(const QString & t) {text_item.setText(t); _init(true);}
|
||||
void setState(State s);
|
||||
|
||||
void saveState() {sstate_.push(state_);}
|
||||
bool restoreState() {if (sstate_.isEmpty()) return false; setState(sstate_.pop()); return true;}
|
||||
void clearStateStack() {sstate_.clear();}
|
||||
|
||||
void enlargePin(bool enlarge);
|
||||
|
||||
BlockItem * parent() const {return parent_;}
|
||||
QList<BlockBusItem * > connectedBuses() const {return buses_;}
|
||||
|
||||
enum {Type = UserType + 3};
|
||||
|
||||
public slots:
|
||||
void animAccept();
|
||||
|
||||
protected:
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0) {}
|
||||
QRectF boundingRect() const {return ell_item.boundingRect().translated(ell_item.pos()) | text_item.boundingRect().translated(text_item.pos());}
|
||||
int type() const {return Type;}
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant & value);
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent * e);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent * e);
|
||||
void _init(bool affect_parent = false);
|
||||
void _reparent();
|
||||
QGraphicsView * _view() const;
|
||||
int bus_type;
|
||||
State state_;
|
||||
QGraphicsEllipseItem ell_item;
|
||||
QGraphicsSimpleTextItem text_item;
|
||||
QStack<State> sstate_;
|
||||
QList<BlockBusItem * > buses_;
|
||||
BlockItem * parent_;
|
||||
Qt::Alignment align;
|
||||
Direction dir;
|
||||
QBrush br[6];
|
||||
|
||||
private slots:
|
||||
void animationAccept();
|
||||
|
||||
private:
|
||||
void resizePin(double r);
|
||||
double pinSize() const;
|
||||
|
||||
QPropertyAnimation anim_pin_size;
|
||||
QPropertyAnimation anim_accept;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // BLOCKITEMPIN_H
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BLOCKITEMPIN_H
|
||||
#define BLOCKITEMPIN_H
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsObject>
|
||||
#include <QGraphicsEllipseItem>
|
||||
#include <QGraphicsSceneHoverEvent>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QStack>
|
||||
#include <QDebug>
|
||||
#include <QPropertyAnimation>
|
||||
#include <qmath.h>
|
||||
#include "blockbase.h"
|
||||
#include "alignedtextitem.h"
|
||||
|
||||
|
||||
class BlockItem;
|
||||
class BlockBusItem;
|
||||
|
||||
|
||||
class QAD_EXPORT BlockItemPin: public QGraphicsObject, public PropertyStorage
|
||||
{
|
||||
friend class BlockView;
|
||||
friend class BlockItem;
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(double pinSize READ pinSize WRITE resizePin DESIGNABLE false SCRIPTABLE false)
|
||||
public:
|
||||
BlockItemPin(Qt::Alignment a = Qt::AlignLeft, int bus_type = 0, const QString & text_ = QString(), QGraphicsObject * parent_ = 0);
|
||||
|
||||
enum State {
|
||||
Disconnected,
|
||||
Connected,
|
||||
Hover,
|
||||
Drop,
|
||||
Accept,
|
||||
Reject
|
||||
};
|
||||
|
||||
enum Direction {
|
||||
None = 0x0,
|
||||
Input = 0x1,
|
||||
Output = 0x2,
|
||||
InputOutput = 0x3
|
||||
};
|
||||
|
||||
void setPen(const QPen & p) {ell_item.setPen(p);}
|
||||
QPen pen() const {return ell_item.pen();}
|
||||
void setBrush(const QBrush & b) {ell_item.setBrush(b);}
|
||||
QBrush brush() const {return ell_item.brush();}
|
||||
|
||||
int busType() const {return bus_type;}
|
||||
Qt::Alignment alignment() const {return align;}
|
||||
Direction direction() const {return dir;}
|
||||
QString text() const {return text_item.text();}
|
||||
State state() const {return state_;}
|
||||
|
||||
void setBusType(int type_) {bus_type = type_;}
|
||||
void setAlignment(Qt::Alignment a) {align = a; _init(true);}
|
||||
void setDirection(Direction d) {dir = d; _init(true);}
|
||||
void setText(const QString & t) {text_item.setText(t); _init(true);}
|
||||
void setState(State s);
|
||||
|
||||
void saveState() {sstate_.push(state_);}
|
||||
bool restoreState() {if (sstate_.isEmpty()) return false; setState(sstate_.pop()); return true;}
|
||||
void clearStateStack() {sstate_.clear();}
|
||||
|
||||
void enlargePin(bool enlarge);
|
||||
|
||||
BlockItem * parent() const {return parent_;}
|
||||
QList<BlockBusItem * > connectedBuses() const {return buses_;}
|
||||
|
||||
enum {Type = UserType + 3};
|
||||
|
||||
public slots:
|
||||
void animAccept();
|
||||
|
||||
protected:
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0) {}
|
||||
QRectF boundingRect() const {return ell_item.boundingRect().translated(ell_item.pos()) | text_item.boundingRect().translated(text_item.pos());}
|
||||
int type() const {return Type;}
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant & value);
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent * e);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent * e);
|
||||
void _init(bool affect_parent = false);
|
||||
void _reparent();
|
||||
QGraphicsView * _view() const;
|
||||
int bus_type;
|
||||
State state_;
|
||||
QGraphicsEllipseItem ell_item;
|
||||
QGraphicsSimpleTextItem text_item;
|
||||
QStack<State> sstate_;
|
||||
QList<BlockBusItem * > buses_;
|
||||
BlockItem * parent_;
|
||||
Qt::Alignment align;
|
||||
Direction dir;
|
||||
QBrush br[6];
|
||||
|
||||
private slots:
|
||||
void animationAccept();
|
||||
|
||||
private:
|
||||
void resizePin(double r);
|
||||
double pinSize() const;
|
||||
|
||||
QPropertyAnimation anim_pin_size;
|
||||
QPropertyAnimation anim_accept;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // BLOCKITEMPIN_H
|
||||
@@ -1 +1 @@
|
||||
qad_plugin(blockview "Gui;Widgets" "")
|
||||
qad_plugin(blockview "Gui;Widgets" "")
|
||||
51
qad/libs/blockview/qad_blockview.qrc
Normal file
51
qad/libs/blockview/qad_blockview.qrc
Normal file
@@ -0,0 +1,51 @@
|
||||
<RCC>
|
||||
<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/view-fullscreen.png</file>
|
||||
<file>../../icons/draw-ellipse.png</file>
|
||||
<file>../../icons/draw-rectangle.png</file>
|
||||
<file>../../icons/draw-text.png</file>
|
||||
<file>../../icons/view-preview.png</file>
|
||||
<file>../../icons/format-fill-color.png</file>
|
||||
<file>../../icons/format-stroke-color.png</file>
|
||||
<file>../../icons/document-open.png</file>
|
||||
<file>../../icons/align-bottom-center.png</file>
|
||||
<file>../../icons/align-bottom-left.png</file>
|
||||
<file>../../icons/align-bottom-right.png</file>
|
||||
<file>../../icons/align-center-center.png</file>
|
||||
<file>../../icons/align-center-left.png</file>
|
||||
<file>../../icons/align-center-right.png</file>
|
||||
<file>../../icons/align-top-center.png</file>
|
||||
<file>../../icons/align-top-left.png</file>
|
||||
<file>../../icons/align-top-right.png</file>
|
||||
<file>../../icons/z-bottom.png</file>
|
||||
<file>../../icons/z-down.png</file>
|
||||
<file>../../icons/z-top.png</file>
|
||||
<file>../../icons/z-up.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,25 +1,25 @@
|
||||
include(CheckIncludeFileCXX)
|
||||
set(CHECK_INCLUDES "-include stdio.h")
|
||||
if(WIN32)
|
||||
set(CHECK_INCLUDES "-include windows.h -include stdio.h")
|
||||
endif()
|
||||
set(_mkd_header_found 0)
|
||||
check_include_file_cxx("mkdio.h" MARKDOWN_HEADER_MKDIO ${CHECK_INCLUDES})
|
||||
if (MARKDOWN_HEADER_MKDIO OR APPLE)
|
||||
set(_mkd_header_found 1)
|
||||
add_definitions("-DMARKDOWN_HEADER=\"mkdio.h\"")
|
||||
else()
|
||||
check_include_file_cxx("markdown/markdown.h" MARKDOWN_HEADER_MARKDOWN ${CHECK_INCLUDES})
|
||||
if (MARKDOWN_HEADER_MARKDOWN)
|
||||
set(_mkd_header_found 1)
|
||||
add_definitions("-DMARKDOWN_HEADER=\"markdown/markdown.h\"")
|
||||
endif()
|
||||
endif()
|
||||
find_library(MARKDOWN_LIBRARY markdown)
|
||||
if (MARKDOWN_LIBRARY)
|
||||
if(_mkd_header_found)
|
||||
qad_project(doc "Core" "${MARKDOWN_LIBRARY}")
|
||||
else()
|
||||
message(STATUS "Found markdown library, but *.h missing!")
|
||||
endif()
|
||||
endif()
|
||||
include(CheckIncludeFileCXX)
|
||||
set(CHECK_INCLUDES "-include stdio.h")
|
||||
if(WIN32)
|
||||
set(CHECK_INCLUDES "-include windows.h -include stdio.h")
|
||||
endif()
|
||||
set(_mkd_header_found 0)
|
||||
check_include_file_cxx("mkdio.h" MARKDOWN_HEADER_MKDIO ${CHECK_INCLUDES})
|
||||
if (MARKDOWN_HEADER_MKDIO OR APPLE)
|
||||
set(_mkd_header_found 1)
|
||||
add_definitions("-DMARKDOWN_HEADER=\"mkdio.h\"")
|
||||
else()
|
||||
check_include_file_cxx("markdown/markdown.h" MARKDOWN_HEADER_MARKDOWN ${CHECK_INCLUDES})
|
||||
if (MARKDOWN_HEADER_MARKDOWN)
|
||||
set(_mkd_header_found 1)
|
||||
add_definitions("-DMARKDOWN_HEADER=\"markdown/markdown.h\"")
|
||||
endif()
|
||||
endif()
|
||||
find_library(MARKDOWN_LIBRARY markdown)
|
||||
if (MARKDOWN_LIBRARY)
|
||||
if(_mkd_header_found)
|
||||
qad_project(doc "Core" "${MARKDOWN_LIBRARY}")
|
||||
else()
|
||||
message(STATUS "Found markdown library, but *.h missing!")
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,79 +1,79 @@
|
||||
#include "markdown.h"
|
||||
#include <QDebug>
|
||||
extern "C" {
|
||||
#include MARKDOWN_HEADER
|
||||
}
|
||||
#ifndef mkd_flags_are
|
||||
# ifndef MKD_DLEXTRA
|
||||
# define MKD_DLEXTRA 0x01000000
|
||||
# endif
|
||||
# ifndef MKD_FENCEDCODE
|
||||
# define MKD_FENCEDCODE 0x02000000
|
||||
# endif
|
||||
# ifndef MKD_EXTRA_FOOTNOTE
|
||||
# define MKD_EXTRA_FOOTNOTE 0x00200000
|
||||
# endif
|
||||
# ifndef MKD_TOC
|
||||
# define MKD_TOC 0x00001000
|
||||
# endif
|
||||
# ifndef MKD_AUTOLINK
|
||||
# define MKD_AUTOLINK 0x00004000
|
||||
# endif
|
||||
# ifndef MKD_GITHUBTAGS
|
||||
# define MKD_GITHUBTAGS 0x08000000
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static QString markdown_css = "table { margin: 5px; background-color: #cccccc; }"
|
||||
"table tr { background-color: white; }"
|
||||
"table td { vertical-align: middle; padding: 5px;}"
|
||||
"table th { padding: 5px; };"
|
||||
;
|
||||
|
||||
QString md2html(const QByteArray & src) {
|
||||
static bool _is_mkd_init = false;
|
||||
if (src.isEmpty()) return QString();
|
||||
if (!_is_mkd_init) {
|
||||
_is_mkd_init = true;
|
||||
mkd_initialize();
|
||||
}
|
||||
#ifdef _MARKDOWN_D
|
||||
DWORD flagm = (MKD_DLEXTRA | MKD_FENCEDCODE);
|
||||
Document
|
||||
#endif
|
||||
#ifdef _MKDIO_D
|
||||
#ifdef mkd_flags_are
|
||||
mkd_flag_t * flagm = mkd_flags();
|
||||
mkd_set_flag_num(flagm, MKD_DLEXTRA);
|
||||
mkd_set_flag_num(flagm, MKD_FENCEDCODE);
|
||||
#else
|
||||
mkd_flag_t flagm = (MKD_DLEXTRA | MKD_FENCEDCODE | MKD_GITHUBTAGS | MKD_AUTOLINK);
|
||||
#endif
|
||||
MMIOT
|
||||
#endif
|
||||
* doc = mkd_string(src.constData(), src.size(), 0);
|
||||
if (!doc) return QString();
|
||||
mkd_compile(doc, flagm);
|
||||
char * html = 0;
|
||||
int len = mkd_document(doc, &html);
|
||||
if (!html) {
|
||||
mkd_cleanup(doc);
|
||||
return QString();
|
||||
}
|
||||
QString ret = QString::fromUtf8(html, len);
|
||||
mkd_cleanup(doc);
|
||||
QString title = QTextStream(&ret, QIODevice::ReadOnly).readLine();
|
||||
title = title.mid(title.indexOf(">")+1);
|
||||
title = title.left(title.indexOf("<"));
|
||||
QString header = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html>\n<head>\n"
|
||||
"<meta name=\"qrichtext\" content=\"1\" />\n"
|
||||
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
|
||||
header.append("<title>" + title + "</title>\n");
|
||||
header.append("<style>" + markdown_css + "</style>\n");
|
||||
header.append("</head>\n<body>\n");
|
||||
ret.prepend(header);
|
||||
ret.append("</body>\n</html>\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#include "markdown.h"
|
||||
#include <QDebug>
|
||||
extern "C" {
|
||||
#include MARKDOWN_HEADER
|
||||
}
|
||||
#ifndef mkd_flags_are
|
||||
# ifndef MKD_DLEXTRA
|
||||
# define MKD_DLEXTRA 0x01000000
|
||||
# endif
|
||||
# ifndef MKD_FENCEDCODE
|
||||
# define MKD_FENCEDCODE 0x02000000
|
||||
# endif
|
||||
# ifndef MKD_EXTRA_FOOTNOTE
|
||||
# define MKD_EXTRA_FOOTNOTE 0x00200000
|
||||
# endif
|
||||
# ifndef MKD_TOC
|
||||
# define MKD_TOC 0x00001000
|
||||
# endif
|
||||
# ifndef MKD_AUTOLINK
|
||||
# define MKD_AUTOLINK 0x00004000
|
||||
# endif
|
||||
# ifndef MKD_GITHUBTAGS
|
||||
# define MKD_GITHUBTAGS 0x08000000
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static QString markdown_css = "table { margin: 5px; background-color: #cccccc; }"
|
||||
"table tr { background-color: white; }"
|
||||
"table td { vertical-align: middle; padding: 5px;}"
|
||||
"table th { padding: 5px; };"
|
||||
;
|
||||
|
||||
QString md2html(const QByteArray & src) {
|
||||
static bool _is_mkd_init = false;
|
||||
if (src.isEmpty()) return QString();
|
||||
if (!_is_mkd_init) {
|
||||
_is_mkd_init = true;
|
||||
mkd_initialize();
|
||||
}
|
||||
#ifdef _MARKDOWN_D
|
||||
DWORD flagm = (MKD_DLEXTRA | MKD_FENCEDCODE);
|
||||
Document
|
||||
#endif
|
||||
#ifdef _MKDIO_D
|
||||
#ifdef mkd_flags_are
|
||||
mkd_flag_t * flagm = mkd_flags();
|
||||
mkd_set_flag_num(flagm, MKD_DLEXTRA);
|
||||
mkd_set_flag_num(flagm, MKD_FENCEDCODE);
|
||||
#else
|
||||
mkd_flag_t flagm = (MKD_DLEXTRA | MKD_FENCEDCODE | MKD_GITHUBTAGS | MKD_AUTOLINK);
|
||||
#endif
|
||||
MMIOT
|
||||
#endif
|
||||
* doc = mkd_string(src.constData(), src.size(), 0);
|
||||
if (!doc) return QString();
|
||||
mkd_compile(doc, flagm);
|
||||
char * html = 0;
|
||||
int len = mkd_document(doc, &html);
|
||||
if (!html) {
|
||||
mkd_cleanup(doc);
|
||||
return QString();
|
||||
}
|
||||
QString ret = QString::fromUtf8(html, len);
|
||||
mkd_cleanup(doc);
|
||||
QString title = QTextStream(&ret, QIODevice::ReadOnly).readLine();
|
||||
title = title.mid(title.indexOf(">")+1);
|
||||
title = title.left(title.indexOf("<"));
|
||||
QString header = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html>\n<head>\n"
|
||||
"<meta name=\"qrichtext\" content=\"1\" />\n"
|
||||
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
|
||||
header.append("<title>" + title + "</title>\n");
|
||||
header.append("<style>" + markdown_css + "</style>\n");
|
||||
header.append("</head>\n<body>\n");
|
||||
ret.prepend(header);
|
||||
ret.append("</body>\n</html>\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QAD_MARKDOWN_H
|
||||
#define QAD_MARKDOWN_H
|
||||
|
||||
#include <QString>
|
||||
#include "qad_export.h"
|
||||
|
||||
|
||||
QAD_EXPORT QString md2html(const QByteArray & src);
|
||||
|
||||
|
||||
#endif // QAD_MARKDOWN_H
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QAD_MARKDOWN_H
|
||||
#define QAD_MARKDOWN_H
|
||||
|
||||
#include <QString>
|
||||
#include "qad_export.h"
|
||||
|
||||
|
||||
QAD_EXPORT QString md2html(const QByteArray & src);
|
||||
|
||||
|
||||
#endif // QAD_MARKDOWN_H
|
||||
@@ -1,4 +1 @@
|
||||
qad_project(graphic "Gui;Widgets;OpenGL" "qad_widgets;qad_utils;${OPENGL_LIBRARIES}")
|
||||
if (graphic_UTILS)
|
||||
add_subdirectory(qpicalculator)
|
||||
endif()
|
||||
qad_project(graphic "Gui;Widgets;OpenGL" "qad_widgets;qad_utils;${OPENGL_LIBRARIES}")
|
||||
@@ -1,443 +1,443 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Graphic</class>
|
||||
<widget class="QFrame" name="Graphic">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>564</width>
|
||||
<height>433</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QWidget" name="widgetLeft" native="true">
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-10</x>
|
||||
<y>0</y>
|
||||
<width>33</width>
|
||||
<height>420</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="layoutButtons">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonAutofit">
|
||||
<property name="toolTip">
|
||||
<string>Autofit</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qad_graphic.qrc">
|
||||
<normaloff>:/icons/view-autofit.png</normaloff>:/icons/view-autofit.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkGrid">
|
||||
<property name="toolTip">
|
||||
<string>Grid</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/view-grid.png</normaloff>:/icons/view-grid.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkGuides">
|
||||
<property name="toolTip">
|
||||
<string>Cursor axis</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/edit-guides.png</normaloff>:/icons/edit-guides.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<widget class="QToolButton" name="buttonFullscreen">
|
||||
<property name="toolTip">
|
||||
<string>Fullscreen</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../blockview/qad_blockview.qrc">
|
||||
<normaloff>:/icons/view-fullscreen.png</normaloff>:/icons/view-fullscreen.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkBorderInputs">
|
||||
<property name="toolTip">
|
||||
<string>Border inputs</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/border-line.png</normaloff>:/icons/border-line.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkLegend">
|
||||
<property name="toolTip">
|
||||
<string>Legend</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/legend.png</normaloff>:/icons/legend.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkPause">
|
||||
<property name="toolTip">
|
||||
<string>Pause</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qad_graphic.qrc">
|
||||
<normaloff>:/icons/media-playback-pause.png</normaloff>:/icons/media-playback-pause.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonConfigure">
|
||||
<property name="toolTip">
|
||||
<string>Configure ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonSave">
|
||||
<property name="toolTip">
|
||||
<string>Save image ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonClear">
|
||||
<property name="toolTip">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonClose">
|
||||
<property name="toolTip">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/dialog-close.png</normaloff>:/icons/dialog-close.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>79</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelCaption">
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" rowspan="2">
|
||||
<widget class="QWidget" name="widgetRight" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QWidget" name="widgetLX" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2" colspan="2">
|
||||
<layout class="QVBoxLayout" name="layoutCanvas">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="UWidget" name="canvas_raster" native="true">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QWidget" name="widgetLY" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="status">
|
||||
<property name="text">
|
||||
<string>Cursor: ( ; )</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QWidget" name="widgetLegend" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="layoutLegend">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>UWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>uwidget.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../utils/qad_utils.qrc"/>
|
||||
<include location="../widgets/qad_widgets.qrc"/>
|
||||
<include location="../blockview/qad_blockview.qrc"/>
|
||||
<include location="qad_graphic.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Graphic</class>
|
||||
<widget class="QFrame" name="Graphic">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>564</width>
|
||||
<height>433</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QWidget" name="widgetLeft" native="true">
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-10</x>
|
||||
<y>0</y>
|
||||
<width>33</width>
|
||||
<height>420</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="layoutButtons">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonAutofit">
|
||||
<property name="toolTip">
|
||||
<string>Autofit</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qad_graphic.qrc">
|
||||
<normaloff>:/icons/view-autofit.png</normaloff>:/icons/view-autofit.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkGrid">
|
||||
<property name="toolTip">
|
||||
<string>Grid</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/view-grid.png</normaloff>:/icons/view-grid.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkGuides">
|
||||
<property name="toolTip">
|
||||
<string>Cursor axis</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/edit-guides.png</normaloff>:/icons/edit-guides.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<widget class="QToolButton" name="buttonFullscreen">
|
||||
<property name="toolTip">
|
||||
<string>Fullscreen</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../blockview/qad_blockview.qrc">
|
||||
<normaloff>:/icons/view-fullscreen.png</normaloff>:/icons/view-fullscreen.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkBorderInputs">
|
||||
<property name="toolTip">
|
||||
<string>Border inputs</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/border-line.png</normaloff>:/icons/border-line.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkLegend">
|
||||
<property name="toolTip">
|
||||
<string>Legend</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/legend.png</normaloff>:/icons/legend.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="checkPause">
|
||||
<property name="toolTip">
|
||||
<string>Pause</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qad_graphic.qrc">
|
||||
<normaloff>:/icons/media-playback-pause.png</normaloff>:/icons/media-playback-pause.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonConfigure">
|
||||
<property name="toolTip">
|
||||
<string>Configure ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonSave">
|
||||
<property name="toolTip">
|
||||
<string>Save image ...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonClear">
|
||||
<property name="toolTip">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonClose">
|
||||
<property name="toolTip">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/dialog-close.png</normaloff>:/icons/dialog-close.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>79</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelCaption">
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" rowspan="2">
|
||||
<widget class="QWidget" name="widgetRight" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QWidget" name="widgetLX" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2" colspan="2">
|
||||
<layout class="QVBoxLayout" name="layoutCanvas">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="UWidget" name="canvas_raster" native="true">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QWidget" name="widgetLY" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="status">
|
||||
<property name="text">
|
||||
<string>Cursor: ( ; )</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QWidget" name="widgetLegend" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="layoutLegend">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>UWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>uwidget.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../utils/qad_utils.qrc"/>
|
||||
<include location="../widgets/qad_widgets.qrc"/>
|
||||
<include location="../blockview/qad_blockview.qrc"/>
|
||||
<include location="qad_graphic.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1,644 +1,644 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GraphicConf</class>
|
||||
<widget class="QDialog" name="GraphicConf">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>583</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Graphic parameters</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Appearance</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkInputs">
|
||||
<property name="text">
|
||||
<string>Border inputs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkAAlias">
|
||||
<property name="text">
|
||||
<string>Antialiasing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkStatus">
|
||||
<property name="text">
|
||||
<string>Status bar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="checkOGL">
|
||||
<property name="text">
|
||||
<string>OpenGL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="checkLegend">
|
||||
<property name="text">
|
||||
<string>Legend</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Background color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ColorButton" name="colorBackground">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Text color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="ColorButton" name="colorText">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QGroupBox" name="groupBox_1">
|
||||
<property name="title">
|
||||
<string>Graphics</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="cbGraphicNames">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="ColorButton" name="colorGraphic">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboStyleGraphic"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkLines">
|
||||
<property name="text">
|
||||
<string>Lines width:</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinLineWidthGraphic">
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkPoints">
|
||||
<property name="text">
|
||||
<string>Points width:</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinPointWidthGraphic">
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999.990000000000009</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="checkFill">
|
||||
<property name="text">
|
||||
<string>Fill:</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="ColorButton" name="colorFill">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Grid</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ColorButton" name="colorGrid">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboStyleGrid"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinWidthGrid">
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Step X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Step Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkGridAutoX">
|
||||
<property name="text">
|
||||
<string>Auto X</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkGridAutoY">
|
||||
<property name="text">
|
||||
<string>Auto Y</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="EvalSpinBox" name="spinGridStepY">
|
||||
<property name="expression">
|
||||
<string>30</string>
|
||||
</property>
|
||||
<property name="defaultText">
|
||||
<string>30</string>
|
||||
</property>
|
||||
<property name="clearButtonVisible">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="EvalSpinBox" name="spinGridStepX">
|
||||
<property name="expression">
|
||||
<string>50</string>
|
||||
</property>
|
||||
<property name="defaultText">
|
||||
<string>50</string>
|
||||
</property>
|
||||
<property name="clearButtonVisible">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Margins</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="5">
|
||||
<widget class="QSpinBox" name="spinMarginR">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QSpinBox" name="spinMarginB">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="labelAll">
|
||||
<property name="text">
|
||||
<string>All:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinMarginL">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Right:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Left:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Bottom:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QSpinBox" name="spinMarginT">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Top:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QSpinBox" name="spinMarginT_2">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>colorbutton.h</header>
|
||||
<slots>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>EvalSpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>evalspinbox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>checkAAlias</tabstop>
|
||||
<tabstop>checkOGL</tabstop>
|
||||
<tabstop>colorBackground</tabstop>
|
||||
<tabstop>colorText</tabstop>
|
||||
<tabstop>colorGrid</tabstop>
|
||||
<tabstop>comboStyleGrid</tabstop>
|
||||
<tabstop>spinWidthGrid</tabstop>
|
||||
<tabstop>cbGraphicNames</tabstop>
|
||||
<tabstop>colorGraphic</tabstop>
|
||||
<tabstop>comboStyleGraphic</tabstop>
|
||||
<tabstop>checkLines</tabstop>
|
||||
<tabstop>spinLineWidthGraphic</tabstop>
|
||||
<tabstop>checkPoints</tabstop>
|
||||
<tabstop>spinPointWidthGraphic</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>GraphicConf</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>255</x>
|
||||
<y>641</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>245</x>
|
||||
<y>207</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkLines</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>spinLineWidthGraphic</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>322</x>
|
||||
<y>410</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>415</x>
|
||||
<y>411</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkPoints</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>spinPointWidthGraphic</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>322</x>
|
||||
<y>434</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>415</x>
|
||||
<y>435</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>GraphicConf</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>294</x>
|
||||
<y>641</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>288</x>
|
||||
<y>268</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkFill</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>colorFill</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>322</x>
|
||||
<y>458</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>415</x>
|
||||
<y>460</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginT</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>259</x>
|
||||
<y>221</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>249</x>
|
||||
<y>191</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginR</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>268</x>
|
||||
<y>220</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>371</x>
|
||||
<y>220</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginB</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>233</x>
|
||||
<y>230</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>234</x>
|
||||
<y>252</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginL</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>213</x>
|
||||
<y>230</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>133</x>
|
||||
<y>229</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GraphicConf</class>
|
||||
<widget class="QDialog" name="GraphicConf">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>583</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Graphic parameters</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Appearance</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkInputs">
|
||||
<property name="text">
|
||||
<string>Border inputs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkAAlias">
|
||||
<property name="text">
|
||||
<string>Antialiasing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkStatus">
|
||||
<property name="text">
|
||||
<string>Status bar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="checkOGL">
|
||||
<property name="text">
|
||||
<string>OpenGL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="checkLegend">
|
||||
<property name="text">
|
||||
<string>Legend</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Background color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ColorButton" name="colorBackground">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Text color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="ColorButton" name="colorText">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QGroupBox" name="groupBox_1">
|
||||
<property name="title">
|
||||
<string>Graphics</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="cbGraphicNames">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="ColorButton" name="colorGraphic">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboStyleGraphic"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkLines">
|
||||
<property name="text">
|
||||
<string>Lines width:</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinLineWidthGraphic">
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkPoints">
|
||||
<property name="text">
|
||||
<string>Points width:</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinPointWidthGraphic">
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999.990000000000009</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="checkFill">
|
||||
<property name="text">
|
||||
<string>Fill:</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="ColorButton" name="colorFill">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Grid</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ColorButton" name="colorGrid">
|
||||
<property name="useAlphaChannel">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboStyleGrid"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinWidthGrid">
|
||||
<property name="decimals">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Step X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Step Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkGridAutoX">
|
||||
<property name="text">
|
||||
<string>Auto X</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkGridAutoY">
|
||||
<property name="text">
|
||||
<string>Auto Y</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="EvalSpinBox" name="spinGridStepY">
|
||||
<property name="expression">
|
||||
<string>30</string>
|
||||
</property>
|
||||
<property name="defaultText">
|
||||
<string>30</string>
|
||||
</property>
|
||||
<property name="clearButtonVisible">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="EvalSpinBox" name="spinGridStepX">
|
||||
<property name="expression">
|
||||
<string>50</string>
|
||||
</property>
|
||||
<property name="defaultText">
|
||||
<string>50</string>
|
||||
</property>
|
||||
<property name="clearButtonVisible">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Margins</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="5">
|
||||
<widget class="QSpinBox" name="spinMarginR">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QSpinBox" name="spinMarginB">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="labelAll">
|
||||
<property name="text">
|
||||
<string>All:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinMarginL">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Right:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Left:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Bottom:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QSpinBox" name="spinMarginT">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Top:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QSpinBox" name="spinMarginT_2">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>colorbutton.h</header>
|
||||
<slots>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>EvalSpinBox</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>evalspinbox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>checkAAlias</tabstop>
|
||||
<tabstop>checkOGL</tabstop>
|
||||
<tabstop>colorBackground</tabstop>
|
||||
<tabstop>colorText</tabstop>
|
||||
<tabstop>colorGrid</tabstop>
|
||||
<tabstop>comboStyleGrid</tabstop>
|
||||
<tabstop>spinWidthGrid</tabstop>
|
||||
<tabstop>cbGraphicNames</tabstop>
|
||||
<tabstop>colorGraphic</tabstop>
|
||||
<tabstop>comboStyleGraphic</tabstop>
|
||||
<tabstop>checkLines</tabstop>
|
||||
<tabstop>spinLineWidthGraphic</tabstop>
|
||||
<tabstop>checkPoints</tabstop>
|
||||
<tabstop>spinPointWidthGraphic</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>GraphicConf</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>255</x>
|
||||
<y>641</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>245</x>
|
||||
<y>207</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkLines</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>spinLineWidthGraphic</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>322</x>
|
||||
<y>410</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>415</x>
|
||||
<y>411</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkPoints</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>spinPointWidthGraphic</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>322</x>
|
||||
<y>434</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>415</x>
|
||||
<y>435</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>GraphicConf</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>294</x>
|
||||
<y>641</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>288</x>
|
||||
<y>268</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>checkFill</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>colorFill</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>322</x>
|
||||
<y>458</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>415</x>
|
||||
<y>460</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginT</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>259</x>
|
||||
<y>221</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>249</x>
|
||||
<y>191</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginR</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>268</x>
|
||||
<y>220</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>371</x>
|
||||
<y>220</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginB</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>233</x>
|
||||
<y>230</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>234</x>
|
||||
<y>252</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinMarginT_2</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinMarginL</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>213</x>
|
||||
<y>230</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>133</x>
|
||||
<y>229</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -1 +1 @@
|
||||
qad_plugin(graphic "Gui;Widgets;OpenGL" "")
|
||||
qad_plugin(graphic "Gui;Widgets;OpenGL" "")
|
||||
28
qad/libs/graphic/qad_graphic.qrc
Normal file
28
qad/libs/graphic/qad_graphic.qrc
Normal file
@@ -0,0 +1,28 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>../../icons/media-playback-pause.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/view-autofit.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/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/graphic.png</file>
|
||||
<file>../../icons/view-fullscreen.png</file>
|
||||
<file>../../icons/pause-back.png</file>
|
||||
<file>../../icons/pause-front.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1 +1 @@
|
||||
qad_project(sql_table "Gui;Widgets;Sql" "qad_utils;qad_widgets")
|
||||
qad_project(sql_table "Gui;Widgets;Sql" "qad_utils;qad_widgets")
|
||||
@@ -1 +1 @@
|
||||
qad_plugin(sql_table "Gui;Widgets;Sql" "")
|
||||
qad_plugin(sql_table "Gui;Widgets;Sql" "")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user