Enabling Qt-less builds

This commit is contained in:
Matthias Koefferlein 2026-01-15 01:41:09 +01:00
parent a0ca8febe5
commit 9fe22869ed
10 changed files with 35 additions and 27 deletions

View File

@ -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 <QApplication>
# include <QLayout>
# include <QMessageBox>
# include "layTipDialog.h"
#endif
namespace edt

View File

@ -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"

View File

@ -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
{

View File

@ -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
}
}

View File

@ -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 <QWidget>
# include <QHBoxLayout>
# include <QLineEdit>
#endif
namespace lay
{

View File

@ -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

View File

@ -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<lay::EditorOptionsPageWidget *>
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<gsi::PluginImpl> decl_Plugin (decl_PluginBase, "lay", "Plugin",
callback ("menu_activated", &gsi::PluginImpl::menu_activated, &gsi::PluginImpl::f_menu_activated, gsi::arg ("symbol"),

View File

@ -23,6 +23,8 @@
#ifndef HDR_layEditorOptionsPageWidget
#define HDR_layEditorOptionsPageWidget
#if defined(HAVE_QT)
#include <QWidget>
#include "layviewCommon.h"
@ -68,3 +70,5 @@ protected:
#endif
#endif

View File

@ -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

View File

@ -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 {