diff --git a/src/edt/edt/edtPlugin.cc b/src/edt/edt/edtPlugin.cc index b287c5f7b..1bc60d64a 100644 --- a/src/edt/edt/edtPlugin.cc +++ b/src/edt/edt/edtPlugin.cc @@ -24,7 +24,6 @@ #include "layDispatcher.h" #include "layLayoutViewBase.h" #include "layEditorOptionsPage.h" -#include "layTipDialog.h" #include "edtPlugin.h" #include "edtConfig.h" #include "edtService.h" @@ -44,6 +43,7 @@ # include # include # include +# include "layTipDialog.h" #endif namespace edt diff --git a/src/edt/edt/edtService.cc b/src/edt/edt/edtService.cc index 7c546c220..d44cd83ec 100644 --- a/src/edt/edt/edtService.cc +++ b/src/edt/edt/edtService.cc @@ -32,7 +32,7 @@ #include "layLayoutView.h" #include "laySnap.h" #include "layConverters.h" -#include "layEditorOptionsPages.h" +#include "layEditorOptionsPage.h" #include "tlProgress.h" #include "tlTimer.h" diff --git a/src/edt/edt/edtShapeService.cc b/src/edt/edt/edtShapeService.cc index 4b95ee300..889955c28 100644 --- a/src/edt/edt/edtShapeService.cc +++ b/src/edt/edt/edtShapeService.cc @@ -26,10 +26,13 @@ #include "edtPropertiesPages.h" #include "layLayoutView.h" #include "layEditorOptionsPage.h" -#include "layTipDialog.h" #include "dbEdgeProcessor.h" #include "dbPolygonTools.h" +#if defined(HAVE_QT) +# include "layTipDialog.h" +#endif + namespace edt { diff --git a/src/laybasic/laybasic/layEditorServiceBase.cc b/src/laybasic/laybasic/layEditorServiceBase.cc index e56116965..d1ff38f5b 100644 --- a/src/laybasic/laybasic/layEditorServiceBase.cc +++ b/src/laybasic/laybasic/layEditorServiceBase.cc @@ -371,7 +371,7 @@ EditorServiceBase::focus_page () bool EditorServiceBase::key_event (unsigned int key, unsigned int /*buttons*/) { - if (is_active () && (key == Qt::Key_Tab || key == Qt::Key_Backtab)) { + if (is_active () && (key == lay::KeyTab || key == lay::KeyBacktab)) { focus_page_open (); return true; } else { @@ -384,7 +384,7 @@ EditorServiceBase::shortcut_override_event (unsigned int key, unsigned int /*but { auto fp = focus_page (); return is_active () - && (key == Qt::Key_Tab || key == Qt::Key_Backtab) + && (key == lay::KeyTab || key == lay::KeyBacktab) && fp && (fp->is_modal_page () || fp->is_visible ()); } @@ -400,7 +400,9 @@ void EditorServiceBase::show_error (tl::Exception &ex) { tl::error << ex.msg (); +#if defined(HAVE_QT) QMessageBox::critical (ui ()->widget (), tr ("Error"), tl::to_qstring (ex.msg ())); +#endif } } diff --git a/src/laybasic/laybasic/layMove.cc b/src/laybasic/laybasic/layMove.cc index 1cba6c18e..98f27e87f 100644 --- a/src/laybasic/laybasic/layMove.cc +++ b/src/laybasic/laybasic/layMove.cc @@ -24,16 +24,10 @@ #include "layEditable.h" #include "layLayoutViewBase.h" #include "layEditorUtils.h" +#include "layEditorOptionsPage.h" #include "laySelector.h" #include "laybasicConfig.h" -#if defined(HAVE_QT) -# include "layEditorOptionsPage.h" -# include -# include -# include -#endif - namespace lay { diff --git a/src/laybasic/laybasic/layPlugin.h b/src/laybasic/laybasic/layPlugin.h index e384a0d59..4f1f3a833 100644 --- a/src/laybasic/laybasic/layPlugin.h +++ b/src/laybasic/laybasic/layPlugin.h @@ -51,9 +51,9 @@ class ViewService; class Editable; class Drawing; class TechnologyComponentProvider; +class EditorOptionsPage; #if defined(HAVE_QT) class Browser; -class EditorOptionsPage; class ConfigPage; #endif diff --git a/src/layview/layview/gsiDeclLayPlugin.cc b/src/layview/layview/gsiDeclLayPlugin.cc index d4c751e86..f6d1649d9 100644 --- a/src/layview/layview/gsiDeclLayPlugin.cc +++ b/src/layview/layview/gsiDeclLayPlugin.cc @@ -711,6 +711,7 @@ PluginImpl::move_ac (lay::angle_constraint_type ac) const return ac != lay::AC_Global ? ac : m_move_ac; } +#if defined(HAVE_QTBINDINGS) static std::vector get_editor_options_pages (PluginImpl *plugin) { @@ -733,7 +734,7 @@ get_focus_page (PluginImpl *plugin) auto fp = plugin->focus_page (); return fp ? fp->widget () : 0; } - +#endif Class decl_Plugin (decl_PluginBase, "lay", "Plugin", callback ("menu_activated", &gsi::PluginImpl::menu_activated, &gsi::PluginImpl::f_menu_activated, gsi::arg ("symbol"), diff --git a/src/layview/layview/layEditorOptionsPageWidget.h b/src/layview/layview/layEditorOptionsPageWidget.h index 65c7bd314..dc9a0552a 100644 --- a/src/layview/layview/layEditorOptionsPageWidget.h +++ b/src/layview/layview/layEditorOptionsPageWidget.h @@ -23,6 +23,8 @@ #ifndef HDR_layEditorOptionsPageWidget #define HDR_layEditorOptionsPageWidget +#if defined(HAVE_QT) + #include #include "layviewCommon.h" @@ -68,3 +70,5 @@ protected: #endif +#endif + diff --git a/src/layview/layview/layEditorOptionsPages.h b/src/layview/layview/layEditorOptionsPages.h index 8a279352a..2b6315e96 100644 --- a/src/layview/layview/layEditorOptionsPages.h +++ b/src/layview/layview/layEditorOptionsPages.h @@ -23,6 +23,8 @@ #ifndef HDR_layEditorOptionsPages #define HDR_layEditorOptionsPages +#if defined(HAVE_QT) + #include "layviewCommon.h" #include "layEditorOptionsPage.h" @@ -125,3 +127,5 @@ private: #endif +#endif + diff --git a/src/layview/layview/layview.pro b/src/layview/layview/layview.pro index 43621dfd6..dedc0a509 100644 --- a/src/layview/layview/layview.pro +++ b/src/layview/layview/layview.pro @@ -9,27 +9,15 @@ DEFINES += MAKE_LAYVIEW_LIBRARY RESOURCES = \ SOURCES = \ - gsiDeclLayEditorOptionsPage.cc \ - gsiDeclLayConfigPage.cc \ gsiDeclLayPluginFactory.cc \ gsiDeclLayPlugin.cc \ gsiDeclLayAdditional.cc \ - layEditorOptionsPageWidget.cc \ layGridNet.cc \ - layEditorOptionsFrame.cc \ - layEditorOptionsPages.cc \ - layMoveEditorOptionsPage.cc \ layviewForceLink.cc \ HEADERS = \ - gsiDeclLayEditorOptionsPage.h \ - gsiDeclLayConfigPage.h \ - layEditorOptionsPageWidget.h \ layGridNet.h \ - layEditorOptionsFrame.h \ - layEditorOptionsPages.h \ layLayoutView.h \ - layMoveEditorOptionsPage.h \ layviewForceLink.h \ !equals(HAVE_QT, "0") { @@ -38,12 +26,24 @@ HEADERS = \ GridNetConfigPage.ui \ SOURCES += \ + gsiDeclLayEditorOptionsPage.cc \ + gsiDeclLayConfigPage.cc \ layGridNetConfigPage.cc \ - layLayoutView_qt.cc \ + layEditorOptionsPageWidget.cc \ + layEditorOptionsFrame.cc \ + layEditorOptionsPages.cc \ + layMoveEditorOptionsPage.cc \ gsiDeclLayLayoutView_qt.cc \ + layLayoutView_qt.cc \ HEADERS += \ + gsiDeclLayEditorOptionsPage.h \ + gsiDeclLayConfigPage.h \ layGridNetConfigPage.h \ + layEditorOptionsFrame.h \ + layEditorOptionsPages.h \ + layEditorOptionsPageWidget.h \ + layMoveEditorOptionsPage.h \ layLayoutView_qt.h \ } else {