Fix decoration for static builds

- Also fix finding static web view and JavaScript provider
This commit is contained in:
Martchus 2016-08-29 15:41:11 +02:00
parent 72296a2768
commit 7f9afcda73
33 changed files with 935 additions and 904 deletions

View File

@ -75,6 +75,7 @@ set(WIDGETS_UI_FILES
set(CMAKE_MODULE_FILES
cmake/modules/QtConfig.cmake
cmake/modules/QtGuiConfig.cmake
cmake/modules/QtLinkage.cmake
cmake/modules/JsProviderConfig.cmake
cmake/modules/WebViewProviderConfig.cmake
)

View File

@ -1,7 +1,7 @@
#ifndef DIALOGS_ABOUTDIALOG_H
#define DIALOGS_ABOUTDIALOG_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QDialog>
@ -15,7 +15,7 @@ namespace Ui {
class AboutDialog;
}
class LIB_EXPORT AboutDialog : public QDialog
class QT_UTILITIES_EXPORT AboutDialog : public QDialog
{
Q_OBJECT

View File

@ -1,5 +1,7 @@
# determines the JavaScript provider (either Qt Script or Qt Declarative)
include(QtLinkage)
set(JS_PROVIDER "auto" CACHE STRING "specifies the JavaScript provider: auto (default), qml, script or none")
if(${JS_PROVIDER} STREQUAL "auto")
find_package(Qt5Script)

View File

@ -21,21 +21,7 @@ if(DBUS_FILES)
list(APPEND QT_MODULES DBus)
endif()
# determine Qt linkage
set(QT_LINKAGE "AUTO_LINKAGE")
if(BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
message(FATAL_ERROR "When using Qt/KDE modules it is not possible to build shared and static libraries at the same time.")
endif()
# set USE_STATIC_QT_BUILD variable to ON to use static Qt
# this only works with patched mingw-w64-qt5-* packages found in my PKGBUILDs repository
# in any other environment you must ensure that the available Qt version is in accordance with the specified STATIC_LINKAGE/STATIC_LIBRARY_LINKAGE options
if(BUILD_STATIC_LIBS OR ("${QT_LINKAGE}" STREQUAL "AUTO_LINKAGE" AND ((STATIC_LINKAGE AND "${META_PROJECT_TYPE}" STREQUAL "application") OR (STATIC_LIBRARY_LINKAGE AND ("${META_PROJECT_TYPE}" STREQUAL "" OR "${META_PROJECT_TYPE}" STREQUAL "library")))) OR ("${QT_LINKAGE}" STREQUAL "STATIC"))
set(USE_STATIC_QT_BUILD ON)
message(STATUS "Linking ${META_PROJECT_NAME} statically against Qt 5.")
elseif(("${QT_LINKAGE}" STREQUAL "AUTO_LINKAGE") OR ("${QT_LINKAGE}" STREQUAL "SHARED"))
set(USE_STATIC_QT_BUILD OFF)
message(STATUS "Linking ${META_PROJECT_NAME} dynamically against Qt 5.")
endif()
include(QtLinkage)
# actually find the required Qt/KF modules
foreach(QT_MODULE ${QT_MODULES})

View File

@ -0,0 +1,21 @@
# determines the Qt linkage
if(NOT DEFINED QT_LINKAGE_DETERMINED)
set(QT_LINKAGE_DETERMINED true)
set(QT_LINKAGE "AUTO_LINKAGE")
if(BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
message(FATAL_ERROR "When using Qt/KDE modules it is not possible to build shared and static libraries at the same time.")
endif()
# set USE_STATIC_QT_BUILD variable to ON to use static Qt
# this only works with patched mingw-w64-qt5-* packages found in my PKGBUILDs repository
# in any other environment you must ensure that the available Qt version is in accordance with the specified STATIC_LINKAGE/STATIC_LIBRARY_LINKAGE options
if(BUILD_STATIC_LIBS OR ("${QT_LINKAGE}" STREQUAL "AUTO_LINKAGE" AND ((STATIC_LINKAGE AND "${META_PROJECT_TYPE}" STREQUAL "application") OR (STATIC_LIBRARY_LINKAGE AND ("${META_PROJECT_TYPE}" STREQUAL "" OR "${META_PROJECT_TYPE}" STREQUAL "library")))) OR ("${QT_LINKAGE}" STREQUAL "STATIC"))
set(USE_STATIC_QT_BUILD ON)
message(STATUS "Linking ${META_PROJECT_NAME} statically against Qt 5.")
elseif(("${QT_LINKAGE}" STREQUAL "AUTO_LINKAGE") OR ("${QT_LINKAGE}" STREQUAL "SHARED"))
set(USE_STATIC_QT_BUILD OFF)
message(STATUS "Linking ${META_PROJECT_NAME} dynamically against Qt 5.")
endif()
endif(NOT DEFINED QT_LINKAGE_DETERMINED)

View File

@ -1,5 +1,7 @@
# determines the web view provider (either Qt WebKit or Qt WebEngine)
include(QtLinkage)
set(WEBVIEW_PROVIDER "auto" CACHE STRING "specifies the web view provider: auto (default), webkit, webengine or none")
if(${WEBVIEW_PROVIDER} STREQUAL "auto")
find_package(Qt5WebKitWidgets)

View File

@ -1,7 +1,7 @@
#ifndef DIALOGS_ENTERPASSWORDDIALOG_H
#define DIALOGS_ENTERPASSWORDDIALOG_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QDialog>
@ -13,7 +13,7 @@ namespace Ui {
class EnterPasswordDialog;
}
class LIB_EXPORT EnterPasswordDialog : public QDialog
class QT_UTILITIES_EXPORT EnterPasswordDialog : public QDialog
{
Q_OBJECT
Q_PROPERTY(QString userName READ userName)

17
global.h Normal file
View File

@ -0,0 +1,17 @@
// Created via CMake from template global.h.in
// WARNING! Any changes to this file will be overwritten by the next CMake run!
#ifndef QT_UTILITIES_GLOBAL
#define QT_UTILITIES_GLOBAL
#include <c++utilities/application/global.h>
#ifdef QT_UTILITIES_STATIC
# define QT_UTILITIES_EXPORT
# define QT_UTILITIES_IMPORT
#else
# define QT_UTILITIES_EXPORT LIB_EXPORT
# define QT_UTILITIES_IMPORT LIB_IMPORT
#endif
#endif // QT_UTILITIES_GLOBAL

View File

@ -1,6 +1,4 @@
#include "desktoputils.h"
#include <c++utilities/application/global.h>
#include "./desktoputils.h"
#include <QDesktopServices>
#include <QUrl>
@ -11,7 +9,7 @@ namespace DesktopUtils {
* \brief Shows the specified file or directory using the default file browser.
* \remarks \a path musn't be specified as URL. (Conversion to URL is the purpose of this function).
*/
bool LIB_EXPORT openLocalFileOrDir(const QString &path)
bool openLocalFileOrDir(const QString &path)
{
#ifdef Q_OS_WIN32
// backslashes are commonly used under Windows

View File

@ -1,13 +1,15 @@
#ifndef DESKTOP_UTILS_DESKTOPSERVICES_H
#define DESKTOP_UTILS_DESKTOPSERVICES_H
#include "../global.h"
#include <QtGlobal>
QT_FORWARD_DECLARE_CLASS(QString)
namespace DesktopUtils {
bool openLocalFileOrDir(const QString &path);
bool QT_UTILITIES_EXPORT openLocalFileOrDir(const QString &path);
}

View File

@ -1,7 +1,7 @@
#ifndef DIALOGS_DIALOGUTILS_H
#define DIALOGS_DIALOGUTILS_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QtGlobal>
@ -20,19 +20,19 @@ enum class DocumentStatus {
Unsaved /**< There is a document opened and there are unsaved modifications. */
};
QString LIB_EXPORT generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath);
QString QT_UTILITIES_EXPORT generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath);
#ifndef GUI_NONE
# ifdef Q_OS_WIN32
QColor LIB_EXPORT windowFrameColor();
QColor LIB_EXPORT instructionTextColor();
QColor QT_UTILITIES_EXPORT windowFrameColor();
QColor QT_UTILITIES_EXPORT instructionTextColor();
# endif
const QString LIB_EXPORT &dialogStyle();
const QString QT_UTILITIES_EXPORT &dialogStyle();
# ifdef GUI_QTWIDGETS
void LIB_EXPORT centerWidget(QWidget *widget);
void LIB_EXPORT cornerWidget(QWidget *widget);
void LIB_EXPORT makeHeading(QWidget *widget);
void LIB_EXPORT updateStyle(QWidget *widget);
void QT_UTILITIES_EXPORT centerWidget(QWidget *widget);
void QT_UTILITIES_EXPORT cornerWidget(QWidget *widget);
void QT_UTILITIES_EXPORT makeHeading(QWidget *widget);
void QT_UTILITIES_EXPORT updateStyle(QWidget *widget);
# endif
#endif

View File

@ -1,7 +1,7 @@
#ifndef MISC_UTILS_RECENTMENUMANAGER_H
#define MISC_UTILS_RECENTMENUMANAGER_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QObject>
@ -10,7 +10,7 @@ QT_FORWARD_DECLARE_CLASS(QAction)
namespace MiscUtils {
class LIB_EXPORT RecentMenuManager : public QObject
class QT_UTILITIES_EXPORT RecentMenuManager : public QObject
{
Q_OBJECT

View File

@ -1,7 +1,7 @@
#ifndef MODELS_CHECKLISTMODEL_H
#define MODELS_CHECKLISTMODEL_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QAbstractListModel>
#include <QList>
@ -12,7 +12,7 @@ namespace Models {
class ChecklistModel;
class LIB_EXPORT ChecklistItem
class QT_UTILITIES_EXPORT ChecklistItem
{
friend class ChecklistModel;
@ -69,7 +69,7 @@ inline bool ChecklistItem::isChecked() const
return m_checkState == Qt::Checked;
}
class LIB_EXPORT ChecklistModel : public QAbstractListModel
class QT_UTILITIES_EXPORT ChecklistModel : public QAbstractListModel
{
Q_OBJECT
public:

View File

@ -1,7 +1,7 @@
#ifndef WIDGETS_COLORBUTTON_H
#define WIDGETS_COLORBUTTON_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QToolButton>
@ -12,7 +12,7 @@ namespace Widgets {
*
* This is taken from qttools/src/shared/qtgradienteditor/qtcolorbutton.h.
*/
class LIB_EXPORT ColorButton : public QToolButton
class QT_UTILITIES_EXPORT ColorButton : public QToolButton
{
Q_OBJECT
Q_PROPERTY(bool backgroundCheckered READ isBackgroundCheckered WRITE setBackgroundCheckered)

View File

@ -1,6 +1,8 @@
#include "./paletteeditor.h"
#include "./colorbutton.h"
#include "ui_paletteeditor.h"
#include <QMetaProperty>
#include <QPainter>
#include <QToolButton>
@ -15,33 +17,33 @@ enum { BrushRole = 33 };
PaletteEditor::PaletteEditor(QWidget *parent) :
QDialog(parent),
m_ui(new Ui::PaletteEditor),
m_currentColorGroup(QPalette::Active),
m_paletteModel(new PaletteModel(this)),
m_modelUpdated(false),
m_paletteUpdated(false),
m_compute(true)
{
m_ui.setupUi(this);
m_ui.paletteView->setModel(m_paletteModel);
m_ui->setupUi(this);
m_ui->paletteView->setModel(m_paletteModel);
updatePreviewPalette();
updateStyledButton();
m_ui.paletteView->setModel(m_paletteModel);
m_ui->paletteView->setModel(m_paletteModel);
ColorDelegate *delegate = new ColorDelegate(this);
m_ui.paletteView->setItemDelegate(delegate);
m_ui.paletteView->setEditTriggers(QAbstractItemView::AllEditTriggers);
m_ui->paletteView->setItemDelegate(delegate);
m_ui->paletteView->setEditTriggers(QAbstractItemView::AllEditTriggers);
connect(m_paletteModel, &PaletteModel::paletteChanged,
this, &PaletteEditor::paletteChanged);
m_ui.paletteView->setSelectionBehavior(QAbstractItemView::SelectRows);
m_ui.paletteView->setDragEnabled(true);
m_ui.paletteView->setDropIndicatorShown(true);
m_ui.paletteView->setRootIsDecorated(false);
m_ui.paletteView->setColumnHidden(2, true);
m_ui.paletteView->setColumnHidden(3, true);
m_ui->paletteView->setSelectionBehavior(QAbstractItemView::SelectRows);
m_ui->paletteView->setDragEnabled(true);
m_ui->paletteView->setDropIndicatorShown(true);
m_ui->paletteView->setRootIsDecorated(false);
m_ui->paletteView->setColumnHidden(2, true);
m_ui->paletteView->setColumnHidden(3, true);
}
PaletteEditor::~PaletteEditor()
{
}
{}
QPalette PaletteEditor::palette() const
{
@ -104,8 +106,8 @@ void PaletteEditor::on_computeRadio_clicked()
{
if (m_compute)
return;
m_ui.paletteView->setColumnHidden(2, true);
m_ui.paletteView->setColumnHidden(3, true);
m_ui->paletteView->setColumnHidden(2, true);
m_ui->paletteView->setColumnHidden(3, true);
m_compute = true;
m_paletteModel->setCompute(true);
}
@ -114,10 +116,10 @@ void PaletteEditor::on_detailsRadio_clicked()
{
if (!m_compute)
return;
const int w = m_ui.paletteView->columnWidth(1);
m_ui.paletteView->setColumnHidden(2, false);
m_ui.paletteView->setColumnHidden(3, false);
QHeaderView *header = m_ui.paletteView->header();
const int w = m_ui->paletteView->columnWidth(1);
m_ui->paletteView->setColumnHidden(2, false);
m_ui->paletteView->setColumnHidden(3, false);
QHeaderView *header = m_ui->paletteView->header();
header->resizeSection(1, w / 3);
header->resizeSection(2, w / 3);
header->resizeSection(3, w / 3);
@ -128,15 +130,16 @@ void PaletteEditor::on_detailsRadio_clicked()
void PaletteEditor::paletteChanged(const QPalette &palette)
{
m_modelUpdated = true;
if (!m_paletteUpdated)
if (!m_paletteUpdated) {
setPalette(palette);
}
m_modelUpdated = false;
}
void PaletteEditor::buildPalette()
{
const QColor btn = m_ui.buildButton->color();
const QPalette temp = QPalette(btn);
const QColor btn(m_ui->buildButton->color());
const QPalette temp(btn);
setPalette(temp);
}
@ -157,7 +160,7 @@ void PaletteEditor::updatePreviewPalette()
void PaletteEditor::updateStyledButton()
{
m_ui.buildButton->setColor(palette().color(QPalette::Active, QPalette::Button));
m_ui->buildButton->setColor(palette().color(QPalette::Active, QPalette::Button));
}
QPalette PaletteEditor::getPalette(QWidget *parent, const QPalette &init,

View File

@ -1,11 +1,14 @@
#ifndef WIDGETS_PALETTEEDITOR_H
#define WIDGETS_PALETTEEDITOR_H
#include "ui_paletteeditor.h"
#include "../global.h"
#include <c++utilities/application/global.h>
#include <c++utilities/conversion/types.h>
#include <QItemDelegate>
#include <QDialog>
#include <memory>
QT_FORWARD_DECLARE_CLASS(QListView)
QT_FORWARD_DECLARE_CLASS(QLabel)
@ -16,13 +19,17 @@ class ColorButton;
namespace Dialogs {
namespace Ui {
class PaletteEditor;
}
/*!
* \brief The PaletteEditor class provides a dialog to customize a QPalette.
*
* This is taken from qttools/src/designer/src/components/propertyeditor/paletteeditor.cpp.
* In contrast to the original version this version doesn't provide a preview.
*/
class LIB_EXPORT PaletteEditor : public QDialog
class QT_UTILITIES_EXPORT PaletteEditor : public QDialog
{
Q_OBJECT
public:
@ -57,7 +64,7 @@ private:
return m_currentColorGroup;
}
Ui::PaletteEditor m_ui;
std::unique_ptr<Ui::PaletteEditor> m_ui;
QPalette m_editPalette;
QPalette m_parentPalette;
QPalette::ColorGroup m_currentColorGroup;
@ -70,7 +77,7 @@ private:
/*!
* \brief The PaletteModel class is used by PaletteEditor.
*/
class LIB_EXPORT PaletteModel : public QAbstractTableModel
class QT_UTILITIES_EXPORT PaletteModel : public QAbstractTableModel
{
Q_OBJECT
Q_PROPERTY(QPalette::ColorRole colorRole READ colorRole)
@ -108,7 +115,7 @@ private:
/*!
* \brief The BrushEditor class is used by PaletteEditor.
*/
class LIB_EXPORT BrushEditor : public QWidget
class QT_UTILITIES_EXPORT BrushEditor : public QWidget
{
Q_OBJECT
@ -133,7 +140,7 @@ private:
/*!
* \brief The RoleEditor class is used by PaletteEditor.
*/
class LIB_EXPORT RoleEditor : public QWidget
class QT_UTILITIES_EXPORT RoleEditor : public QWidget
{
Q_OBJECT
public:
@ -157,7 +164,7 @@ private:
/*!
* \brief The ColorDelegate class is used by PaletteEditor.
*/
class LIB_EXPORT ColorDelegate : public QItemDelegate
class QT_UTILITIES_EXPORT ColorDelegate : public QItemDelegate
{
Q_OBJECT

View File

@ -1,11 +1,13 @@
#ifndef APPLICATION_UTILITIES_QTCONFIGARGUMENTS_H
#define APPLICATION_UTILITIES_QTCONFIGARGUMENTS_H
#include "../global.h"
#include <c++utilities/application/argumentparser.h>
namespace ApplicationUtilities {
class LIB_EXPORT QtConfigArguments
class QT_UTILITIES_EXPORT QtConfigArguments
{
public:
QtConfigArguments();

View File

@ -1,7 +1,7 @@
#ifndef APPLICATION_UTILITIES_RESOURCES_H
#define APPLICATION_UTILITIES_RESOURCES_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QtGlobal>
@ -29,36 +29,36 @@ QT_FORWARD_DECLARE_CLASS(QSettings)
namespace QtUtilitiesResources {
LIB_EXPORT void init();
LIB_EXPORT void cleanup();
QT_UTILITIES_EXPORT void init();
QT_UTILITIES_EXPORT void cleanup();
}
namespace TranslationFiles {
LIB_EXPORT QString &additionalTranslationFilePath();
LIB_EXPORT void loadQtTranslationFile(std::initializer_list<QString> repositoryNames);
LIB_EXPORT void loadQtTranslationFile(std::initializer_list<QString> repositoryNames, const QString &localeName);
LIB_EXPORT void loadApplicationTranslationFile(const QString &applicationName);
LIB_EXPORT void loadApplicationTranslationFile(const QString &applicationName, const QString &localeName);
QT_UTILITIES_EXPORT QString &additionalTranslationFilePath();
QT_UTILITIES_EXPORT void loadQtTranslationFile(std::initializer_list<QString> repositoryNames);
QT_UTILITIES_EXPORT void loadQtTranslationFile(std::initializer_list<QString> repositoryNames, const QString &localeName);
QT_UTILITIES_EXPORT void loadApplicationTranslationFile(const QString &applicationName);
QT_UTILITIES_EXPORT void loadApplicationTranslationFile(const QString &applicationName, const QString &localeName);
}
namespace ApplicationInstances {
#if defined(GUI_QTWIDGETS)
LIB_EXPORT bool hasWidgetsApp();
QT_UTILITIES_EXPORT bool hasWidgetsApp();
#endif
#if defined(GUI_QTWIDGETS) || defined(GUI_QTQUICK)
LIB_EXPORT bool hasGuiApp();
QT_UTILITIES_EXPORT bool hasGuiApp();
#endif
LIB_EXPORT bool hasCoreApp();
QT_UTILITIES_EXPORT bool hasCoreApp();
}
namespace ConfigFile {
LIB_EXPORT QString locateConfigFile(const QString &applicationName, const QString &fileName, const QSettings *settings = nullptr);
QT_UTILITIES_EXPORT QString locateConfigFile(const QString &applicationName, const QString &fileName, const QSettings *settings = nullptr);
}

View File

@ -1,7 +1,7 @@
#ifndef DIALOGS_OPTIONSCATEGORY_H
#define DIALOGS_OPTIONSCATEGORY_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QObject>
#include <QIcon>
@ -11,7 +11,7 @@ namespace Dialogs {
class OptionPage;
class LIB_EXPORT OptionCategory : public QObject
class QT_UTILITIES_EXPORT OptionCategory : public QObject
{
Q_OBJECT
Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged)

View File

@ -1,7 +1,7 @@
#ifndef DIALOGS_OPTIONCATEGORYMODEL_H
#define DIALOGS_OPTIONCATEGORYMODEL_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QList>
#include <QAbstractListModel>
@ -11,7 +11,7 @@ namespace Dialogs {
class OptionPage;
class OptionCategory;
class LIB_EXPORT OptionCategoryModel : public QAbstractListModel
class QT_UTILITIES_EXPORT OptionCategoryModel : public QAbstractListModel
{
Q_OBJECT
public:

View File

@ -1,7 +1,7 @@
#ifndef DIALOGS_OPTIONSPAGE_H
#define DIALOGS_OPTIONSPAGE_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QObject>
#include <QWidget>
@ -10,7 +10,7 @@
namespace Dialogs {
class LIB_EXPORT OptionPage
class QT_UTILITIES_EXPORT OptionPage
{
public:
explicit OptionPage(QWidget *parentWindow = nullptr);
@ -80,7 +80,7 @@ inline QStringList &OptionPage::errors()
* \tparam UiClass Specifies the UI class generated by uic.
*/
template <class UiClass>
class LIB_EXPORT UiFileBasedOptionPage : public OptionPage
class QT_UTILITIES_EXPORT UiFileBasedOptionPage : public OptionPage
{
public:
explicit UiFileBasedOptionPage(QWidget *parentWindow = nullptr);
@ -143,7 +143,7 @@ inline UiClass *UiFileBasedOptionPage<UiClass>::ui()
*/
#define BEGIN_DECLARE_OPTION_PAGE(SomeClass) \
typedef ::Dialogs::OptionPage SomeClass ## Base; \
class LIB_EXPORT SomeClass : public ::Dialogs::OptionPage \
class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::OptionPage \
{ \
public: \
explicit SomeClass(QWidget *parentWidget = nullptr); \
@ -161,7 +161,7 @@ inline UiClass *UiFileBasedOptionPage<UiClass>::ui()
class SomeClass; \
} \
typedef ::Dialogs::UiFileBasedOptionPage<Ui::SomeClass> SomeClass ## Base; \
class LIB_EXPORT SomeClass : public ::Dialogs::UiFileBasedOptionPage<Ui::SomeClass> \
class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::UiFileBasedOptionPage<Ui::SomeClass> \
{ \
public: \
~SomeClass(); \

View File

@ -40,7 +40,7 @@ private:
QtSettingsData &m_settings;
END_DECLARE_OPTION_PAGE
class LIB_EXPORT QtSettings
class QT_UTILITIES_EXPORT QtSettings
{
public:
QtSettings();

View File

@ -1,7 +1,7 @@
#ifndef DIALOGS_SETTINGSDIALOG_H
#define DIALOGS_SETTINGSDIALOG_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QDialog>
@ -18,7 +18,7 @@ namespace Ui {
class SettingsDialog;
}
class LIB_EXPORT SettingsDialog : public QDialog
class QT_UTILITIES_EXPORT SettingsDialog : public QDialog
{
Q_OBJECT
Q_PROPERTY(bool tabBarAlwaysVisible READ isTabBarAlwaysVisible WRITE setTabBarAlwaysVisible)

View File

@ -1,7 +1,7 @@
#ifndef WIDGETS_BUTTONOVERLAY_H
#define WIDGETS_BUTTONOVERLAY_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QtGlobal>
@ -14,7 +14,7 @@ namespace Widgets {
class IconButton;
class LIB_EXPORT ButtonOverlay
class QT_UTILITIES_EXPORT ButtonOverlay
{
public:
explicit ButtonOverlay(QWidget *widget);

View File

@ -3,13 +3,11 @@
#include "./buttonoverlay.h"
#include <c++utilities/application/global.h>
#include <QComboBox>
namespace Widgets {
class LIB_EXPORT ClearComboBox : public QComboBox, public ButtonOverlay
class QT_UTILITIES_EXPORT ClearComboBox : public QComboBox, public ButtonOverlay
{
Q_OBJECT
public:

View File

@ -3,19 +3,15 @@
#include "./buttonoverlay.h"
#include <c++utilities/application/global.h>
#include <QLineEdit>
QT_BEGIN_NAMESPACE
class QHBoxLayout;
QT_END_NAMESPACE
QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
namespace Widgets {
class IconButton;
class LIB_EXPORT ClearLineEdit : public QLineEdit, public ButtonOverlay
class QT_UTILITIES_EXPORT ClearLineEdit : public QLineEdit, public ButtonOverlay
{
Q_OBJECT
public:

View File

@ -7,7 +7,7 @@
namespace Widgets {
class LIB_EXPORT ClearPlainTextEdit : public QPlainTextEdit, public ButtonOverlay
class QT_UTILITIES_EXPORT ClearPlainTextEdit : public QPlainTextEdit, public ButtonOverlay
{
Q_OBJECT
public:

View File

@ -3,20 +3,16 @@
#include "./buttonoverlay.h"
#include <c++utilities/application/global.h>
#include <QSpinBox>
#include <QLineEdit>
QT_BEGIN_NAMESPACE
class QHBoxLayout;
QT_END_NAMESPACE
QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
namespace Widgets {
class IconButton;
class LIB_EXPORT ClearSpinBox : public QSpinBox, public ButtonOverlay
class QT_UTILITIES_EXPORT ClearSpinBox : public QSpinBox, public ButtonOverlay
{
Q_OBJECT
Q_PROPERTY(bool minimumHidden READ minimumHidden WRITE setMinimumHidden)

View File

@ -1,14 +1,14 @@
#ifndef WIDGETS_ICONBUTTON_H
#define WIDGETS_ICONBUTTON_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QAbstractButton>
#include <QPixmap>
namespace Widgets {
class LIB_EXPORT IconButton : public QAbstractButton
class QT_UTILITIES_EXPORT IconButton : public QAbstractButton
{
Q_OBJECT
Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)

View File

@ -1,7 +1,7 @@
#ifndef WIDGETS_PATHSELECTION_H
#define WIDGETS_PATHSELECTION_H
#include <c++utilities/application/global.h>
#include "../global.h"
#include <QFileDialog>
@ -12,7 +12,7 @@ namespace Widgets {
class ClearLineEdit;
class LIB_EXPORT PathSelection : public QWidget
class QT_UTILITIES_EXPORT PathSelection : public QWidget
{
Q_OBJECT
public: