master #49
@@ -102,7 +102,7 @@ else()
|
||||
endif()
|
||||
|
||||
foreach(F ${PIP_FOLDERS})
|
||||
list(APPEND PIP_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/pip/src_main/${F}")
|
||||
list(APPEND PIP_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/pip/lib/main/${F}")
|
||||
endforeach(F)
|
||||
#message(${PIP_INCLUDES})
|
||||
if(CMAKE_CROSSCOMPILING OR (DEFINED ANDROID_PLATFORM))
|
||||
@@ -156,6 +156,7 @@ else()
|
||||
add_subdirectory(qad)
|
||||
set(_DIRS piqt piqt_utils qcd_utils)
|
||||
if (Qt5)
|
||||
list(APPEND _DIRS)
|
||||
if (QGLVIEW)
|
||||
list(APPEND _DIRS qglview)
|
||||
endif()
|
||||
|
||||
2
pip
2
pip
Submodule pip updated: 5de62b1c83...2dfbbf80b7
@@ -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/src_main/io_devices/piiodevice.h" "../pip/src_main/io_utils/pipacketextractor.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
||||
pip_code_model(CCM "../pip/lib/main/io_devices/piiodevice.h" "../pip/lib/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/src_main/introspection")
|
||||
set(PII_ROOT "../../pip/lib/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)
|
||||
|
||||
@@ -32,9 +32,9 @@ LogView::LogView(QWidget * parent): QWidget(parent) {
|
||||
ui = new Ui::LogView();
|
||||
ui->setupUi(this);
|
||||
ui->textEdit->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
actionLogSelectAll = new QAction(QIcon(":/icons/select-all.png"), tr("Select All"));
|
||||
actionLogCopy = new QAction(QIcon(":/icons/edit-copy.png"), tr("Copy"));
|
||||
actionLogClear = new QAction(QIcon(":/icons/edit-clear.png"), tr("Clear"));
|
||||
actionLogSelectAll = new QAction(QIcon(":/icons/select-all.png"), tr("Select All"), this);
|
||||
actionLogCopy = new QAction(QIcon(":/icons/edit-copy.png"), tr("Copy"), this);
|
||||
actionLogClear = new QAction(QIcon(":/icons/edit-clear.png"), tr("Clear"), this);
|
||||
connect(actionLogSelectAll, SIGNAL(triggered(bool)), ui->textEdit, SLOT(selectAll()));
|
||||
connect(actionLogCopy, SIGNAL(triggered(bool)), ui->textEdit, SLOT(copy()));
|
||||
connect(actionLogClear, SIGNAL(triggered(bool)), ui->textEdit, SLOT(clear()));
|
||||
@@ -86,7 +86,13 @@ int LogView::linesLimit() const {
|
||||
|
||||
|
||||
void LogView::registerCategory(const QString & label, QString keyword, const QImage & icon, QColor color, bool bold) {
|
||||
QRegularExpression regexp(keyword, QRegularExpression::PatternOptions(QRegularExpression::CaseInsensitiveOption));
|
||||
QRegularExpression regexp(keyword,
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
QRegularExpression::PatternOptions(QRegularExpression::CaseInsensitiveOption)
|
||||
#else
|
||||
Qt::CaseInsensitive
|
||||
#endif
|
||||
);
|
||||
registerCategory(label, regexp, icon, color, bold);
|
||||
}
|
||||
|
||||
@@ -107,7 +113,13 @@ void LogView::registerCategory(const QString & label, QRegularExpression regexp,
|
||||
|
||||
|
||||
void LogView::removeCategory(QString keyword) {
|
||||
QRegularExpression regexp(keyword, QRegularExpression::PatternOptions(QRegularExpression::CaseInsensitiveOption));
|
||||
QRegularExpression regexp(keyword,
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
QRegularExpression::PatternOptions(QRegularExpression::CaseInsensitiveOption)
|
||||
#else
|
||||
Qt::CaseInsensitive
|
||||
#endif
|
||||
);
|
||||
removeCategory(regexp);
|
||||
}
|
||||
|
||||
@@ -117,7 +129,13 @@ void LogView::removeCategory(QRegularExpression regexp) {
|
||||
c.regexp = regexp;
|
||||
categories.removeAll(c);
|
||||
for (int i = 1; i < ui->comboCategory->count(); ++i) {
|
||||
if (ui->comboCategory->itemData(i).toRegularExpression().pattern() == regexp.pattern()) {
|
||||
if (ui->comboCategory->itemData(i).
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
toRegularExpression()
|
||||
#else
|
||||
toRegExp()
|
||||
#endif
|
||||
.pattern() == regexp.pattern()) {
|
||||
ui->comboCategory->removeItem(i);
|
||||
--i;
|
||||
}
|
||||
@@ -194,7 +212,12 @@ void LogView::newLine() {
|
||||
tc.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
|
||||
tc.insertImage(icon);
|
||||
}
|
||||
QRegularExpression regexp = ui->comboCategory->currentData().toRegularExpression();
|
||||
QRegularExpression regexp =
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
ui->comboCategory->currentData().toRegularExpression();
|
||||
#else
|
||||
ui->comboCategory->itemData(ui->comboCategory->currentIndex()).toRegExp();
|
||||
#endif
|
||||
QString fs = ui->lineEdit->text();
|
||||
if (isFilterVisible())
|
||||
filterBlock(tc.block(), fs, regexp);
|
||||
@@ -254,7 +277,12 @@ void LogView::filter() {
|
||||
QRegularExpression regexp;
|
||||
QString fs;
|
||||
if (isFilterVisible()) {
|
||||
regexp = ui->comboCategory->currentData().toRegularExpression();
|
||||
regexp =
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
ui->comboCategory->currentData().toRegularExpression();
|
||||
#else
|
||||
ui->comboCategory->itemData(ui->comboCategory->currentIndex()).toRegExp();
|
||||
#endif
|
||||
fs = ui->lineEdit->text();
|
||||
}
|
||||
QTextBlock bl;
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
#include <QIcon>
|
||||
#include <QImage>
|
||||
#include <QTextBlockFormat>
|
||||
#include <QRegularExpression>
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
# include <QRegularExpression>
|
||||
#else
|
||||
# include <QRegExp>
|
||||
typedef QRegExp QRegularExpression;
|
||||
#endif
|
||||
#include "qad_export.h"
|
||||
|
||||
class QTextEdit;
|
||||
|
||||
@@ -302,6 +302,7 @@ protected:
|
||||
uint qHash(const PIString & v, uint seed = 0) {return piHash(v);}
|
||||
|
||||
|
||||
#include "logview.h"
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
@@ -342,6 +343,28 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
return 0;*/
|
||||
//################################
|
||||
//1245hghgfhfdgshrgnhdsgfhjshdszdgsdgnjedghrbnlcvleabjmbassfdggfhbnsjkgnfdvfdsdfojbwasv213443gr2t4sfth
|
||||
/*LogView lw;
|
||||
lw.setLogFont(QFont("dejavu sans mono", 9));
|
||||
lw.registerCategory("Warning", "Warning", QImage(":/icons/flame.png"), Qt::darkYellow);
|
||||
lw.registerCategory("Error", "Error", QImage(":/icons/dialog-cancel.png"), Qt::darkRed, true);
|
||||
//lw.setLinesLimit(12);
|
||||
lw.show();
|
||||
piForTimes(100)
|
||||
lw.addText(QString("row %1").arg(_i100));
|
||||
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/scene_tree.h");
|
||||
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/scene_tree.h");
|
||||
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/view_editor.h");
|
||||
lw.addText("-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/material_map_editor.h\n"
|
||||
"-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/materials_editor\n"
|
||||
"-- Up-to-date: C:/sdk/MinGW/x32/i686-w64-mingw32/include/qglengine/object_editor.h");
|
||||
lw.addText("[Warning] sdfkjhdfgj");
|
||||
lw.addText("[Error] gbflknwed");
|
||||
QLineEdit * le = new QLineEdit();
|
||||
QObject::connect(le, &QLineEdit::returnPressed, [&](){lw.addText(le->text());});
|
||||
le->show();
|
||||
return a.exec();*/
|
||||
|
||||
CDPultWindow w;
|
||||
w.show();
|
||||
if (a.arguments().size() > 1)
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
if (DESIGNER_PLUGINS)
|
||||
project(qglengine_plugin)
|
||||
include_directories("..")
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
add_definitions(-DQT_SHARED)
|
||||
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
||||
find_qt(${QtVersions} Core Designer Gui Widgets OpenGL)
|
||||
qt_sources(SRC)
|
||||
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||
qt_target_link_libraries(${PROJECT_NAME} qglengine)
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
||||
if (NOT Qt5)
|
||||
message(WARNING "Building ${PROJECT_NAME} available only on Qt5!")
|
||||
else()
|
||||
project(qglengine_plugin)
|
||||
include_directories("..")
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
add_definitions(-DQT_SHARED)
|
||||
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
||||
find_qt(Qt5 Core Designer Gui Widgets OpenGL)
|
||||
qt_sources(SRC)
|
||||
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||
qt_target_link_libraries(${PROJECT_NAME} qglengine)
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -17,50 +17,54 @@ endif()
|
||||
find_package(QAD REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories(${QAD_INCLUDES})
|
||||
find_qt(${QtVersions} Core Gui OpenGL Xml)
|
||||
qt_sources(SRC)
|
||||
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets ${OPENGL_LIBRARIES})
|
||||
qt_target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
message(STATUS "Building ${PROJECT_NAME}")
|
||||
if (LIBPROJECT)
|
||||
sdk_install("qad" "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
|
||||
find_qt(Qt5 Core Gui OpenGL Xml)
|
||||
if (NOT Qt5)
|
||||
message(WARNING "Building ${PROJECT_NAME} available only on Qt5!")
|
||||
else()
|
||||
if (LIB)
|
||||
if (WIN32)
|
||||
qt_install(FILES ${H} DESTINATION ${MINGW_INCLUDE}/qad)
|
||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${MINGW_LIB})
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${MINGW_BIN})
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtBin)
|
||||
else()
|
||||
qt_install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
|
||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
endif()
|
||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||
qt_sources(SRC)
|
||||
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets ${OPENGL_LIBRARIES})
|
||||
qt_target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
message(STATUS "Building ${PROJECT_NAME}")
|
||||
if (LIBPROJECT)
|
||||
sdk_install("qad" "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
|
||||
else()
|
||||
if(WIN32)
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
|
||||
if (LIB)
|
||||
if (WIN32)
|
||||
qt_install(FILES ${H} DESTINATION ${MINGW_INCLUDE}/qad)
|
||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${MINGW_LIB})
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${MINGW_BIN})
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtBin)
|
||||
else()
|
||||
qt_install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
|
||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
endif()
|
||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||
else()
|
||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
||||
if(WIN32)
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
||||
qt_install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
|
||||
else()
|
||||
qt_install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
||||
endif()
|
||||
qt_install(FILES ${H} DESTINATION include/qad)
|
||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
||||
endif()
|
||||
qt_install(FILES ${H} DESTINATION include/qad)
|
||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
||||
endif()
|
||||
endif()
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v})
|
||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
|
||||
endforeach()
|
||||
list(APPEND QT_MULTILIB_LIST qglview)
|
||||
if (NOT DEFINED ANDROID_PLATFORM)
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||
add_subdirectory(plugin)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v})
|
||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
|
||||
endforeach()
|
||||
list(APPEND QT_MULTILIB_LIST qglview)
|
||||
if (NOT DEFINED ANDROID_PLATFORM)
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||
add_subdirectory(plugin)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
qt_sources(test_SRC DIR "qglview_test")
|
||||
qt_wrap(${test_SRC} CPPS test_CPP)
|
||||
qt_add_executable(qglview_test test_CPP)
|
||||
qt_target_link_libraries(qglview_test ${PROJECT_NAME})
|
||||
qt_sources(test_SRC DIR "qglview_test")
|
||||
qt_wrap(${test_SRC} CPPS test_CPP)
|
||||
qt_add_executable(qglview_test test_CPP)
|
||||
qt_target_link_libraries(qglview_test ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
if (DESIGNER_PLUGINS)
|
||||
project(qglview_plugin)
|
||||
include_directories("..")
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
add_definitions(-DQT_SHARED)
|
||||
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
||||
find_qt(${QtVersions} Core Designer Gui Widgets OpenGL)
|
||||
qt_sources(SRC)
|
||||
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||
qt_target_link_libraries(${PROJECT_NAME} qglview)
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
||||
if (NOT Qt5)
|
||||
message(WARNING "Building ${PROJECT_NAME} available only on Qt5!")
|
||||
else()
|
||||
project(qglview_plugin)
|
||||
include_directories("..")
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_NO_DEBUG)
|
||||
add_definitions(-DQT_SHARED)
|
||||
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
||||
find_qt(Qt5 Core Designer Gui Widgets OpenGL)
|
||||
qt_sources(SRC)
|
||||
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||
qt_target_link_libraries(${PROJECT_NAME} qglview)
|
||||
qt_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user