mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
Changed: #1193 Update PCH. Example plugins correct works under Linux.
This commit is contained in:
parent
9613923e4c
commit
4df89637b6
6 changed files with 21 additions and 10 deletions
|
@ -41,10 +41,6 @@ ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${LIBXML2_DEFINITIONS} ${QT_DEFINITIONS})
|
|||
NL_DEFAULT_PROPS(object_viewer_qt "NeL, Tools, 3D: Object Viewer Qt")
|
||||
NL_ADD_RUNTIME_FLAGS(object_viewer_qt)
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(object_viewer_qt ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
ADD_SUBDIRECTORY(plugins)
|
||||
|
||||
INSTALL(TARGETS object_viewer_qt RUNTIME DESTINATION bin COMPONENT runtime BUNDLE DESTINATION /Applications)
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "sheet_id_view.h"
|
||||
#include "ui_dialog.h"
|
||||
|
||||
#include "nel/misc/path.h"
|
||||
|
||||
|
@ -58,7 +57,7 @@ void SheetIdView::pushToTable()
|
|||
NLMISC::CSheetId::init(false);
|
||||
NLMISC::CSheetId::buildIdVector(m_sheetList);
|
||||
CPred Pred;
|
||||
sort(m_sheetList.begin(), m_sheetList.end(), Pred);
|
||||
std::sort(m_sheetList.begin(), m_sheetList.end(), Pred);
|
||||
|
||||
// Fill table
|
||||
m_ui.table->clear();
|
||||
|
@ -66,7 +65,6 @@ void SheetIdView::pushToTable()
|
|||
m_ui.table->setColumnCount(2);
|
||||
for (size_t i = 0; i < m_sheetList.size(); i++)
|
||||
{
|
||||
QApplication::processEvents();
|
||||
QTableWidgetItem* item1 = new QTableWidgetItem(QString(m_sheetList[i].toString().c_str()));
|
||||
QTableWidgetItem* item2 = new QTableWidgetItem(QString("%1").arg(m_sheetList[i].asInt()));
|
||||
m_ui.table->setItem(i,1,item1);
|
||||
|
|
|
@ -30,7 +30,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
|
|||
|
||||
ADD_LIBRARY(ovqt_plugin_example MODULE ${SRC} ${OVQT_PLUG_EXAMPLE_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_EXAMPLE_UI_HDRS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(ovqt_plugin_example ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(ovqt_plugin_example ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY})
|
||||
|
||||
NL_DEFAULT_PROPS(ovqt_plugin_example "NeL, Tools, 3D: Object Viewer Qt Plugin: Example")
|
||||
NL_ADD_RUNTIME_FLAGS(ovqt_plugin_example)
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace NLQT
|
|||
{
|
||||
|
||||
QNLWidget::QNLWidget(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
: QNeLWidget(parent),
|
||||
m_driver(NULL),
|
||||
m_initialized(false),
|
||||
m_interval(25)
|
||||
|
@ -42,6 +42,9 @@ QNLWidget::QNLWidget(QWidget *parent)
|
|||
setFocusPolicy(Qt::StrongFocus);
|
||||
|
||||
init();
|
||||
#ifdef Q_OS_LINUX
|
||||
makeCurrent();
|
||||
#endif
|
||||
m_mainTimer = new QTimer(this);
|
||||
connect(m_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender()));
|
||||
}
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
|
||||
class QAction;
|
||||
|
||||
/* TODO every platform should use QWidget */
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
typedef QWidget QNeLWidget;
|
||||
#elif defined(NL_OS_MAC)
|
||||
typedef QWidget QNeLWidget;
|
||||
#elif defined(NL_OS_UNIX)
|
||||
typedef QGLWidget QNeLWidget;
|
||||
#endif // NL_OS_UNIX
|
||||
|
||||
namespace NL3D
|
||||
{
|
||||
class UDriver;
|
||||
|
@ -44,7 +53,7 @@ namespace NLQT
|
|||
@details Automatically begins to update the render if the widget is visible
|
||||
or suspends the updating of render if the widget is hidden.
|
||||
*/
|
||||
class QNLWidget : public QWidget
|
||||
class QNLWidget : public QNeLWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -146,6 +146,11 @@ TARGET_LINK_LIBRARIES(ovqt_plugin_object_viewer
|
|||
${QT_QTOPENGL_LIBRARY})
|
||||
|
||||
NL_DEFAULT_PROPS(ovqt_plugin_object_viewer "NeL, Tools, 3D: Object Viewer Qt Plugin: Object Viewer")
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_object_viewer ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||
ENDIF(WITH_PCH)
|
||||
|
||||
NL_ADD_RUNTIME_FLAGS(ovqt_plugin_object_viewer)
|
||||
NL_ADD_LIB_SUFFIX(ovqt_plugin_object_viewer)
|
||||
|
||||
|
|
Loading…
Reference in a new issue