Commit 82a1bf3c authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud

Finalize cmake refactoring.

Add missing target link libraries for some examples.
parent 0c36a286
......@@ -100,6 +100,9 @@ find_package(dtkFonts REQUIRED)
find_package(dtkLog REQUIRED)
find_package(dtkThemes REQUIRED)
get_target_property(toto dtkThemesWidgets INTERFACE_INCLUDE_DIRECTORIES)
message("${toto}")
## ###################################################################
## Input
## ###################################################################
......
......@@ -34,6 +34,9 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} dtkCore)
target_link_libraries(${PROJECT_NAME} dtkFonts)
target_link_libraries(${PROJECT_NAME} dtkThemes)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
## ###################################################################
......
......@@ -17,6 +17,7 @@
#include <dtkCore>
#include <dtkFonts>
#include <dtkThemes>
#include <dtkWidgets>
// /////////////////////////////////////////////////////////////////////////////
......
......@@ -34,6 +34,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} dtkThemes)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
######################################################################
......
......@@ -34,8 +34,8 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} dtkThemes)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
target_link_libraries(${PROJECT_NAME} dtkCore)
## ###################################################################
## Bundle setup
......
......@@ -186,15 +186,16 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Xml)
target_link_libraries(${PROJECT_NAME} dtkThemes)
target_link_libraries(${PROJECT_NAME} dtkThemesWidgets)
target_link_libraries(${PROJECT_NAME} dtkCore)
target_link_libraries(${PROJECT_NAME} dtkFonts)
target_link_libraries(${PROJECT_NAME} dtkLog)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Xml)
target_link_libraries(${PROJECT_NAME} PRIVATE dtkThemes)
target_link_libraries(${PROJECT_NAME} PRIVATE dtkLog)
target_link_libraries(${PROJECT_NAME} PUBLIC Qt5::Core)
target_link_libraries(${PROJECT_NAME} PUBLIC Qt5::Gui)
target_link_libraries(${PROJECT_NAME} PUBLIC Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} PUBLIC dtkCore)
target_link_libraries(${PROJECT_NAME} PUBLIC dtkFonts)
target_link_libraries(${PROJECT_NAME} PUBLIC dtkThemesWidgets)
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${layer_SOURCE_DIR}>
......
......@@ -15,6 +15,8 @@
#include "dtkWidgetsController.h"
#include "dtkWidgetsWidget.h"
#include <QtCore>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsControllerPrivate
// ///////////////////////////////////////////////////////////////////
......
......@@ -181,13 +181,13 @@ void dtkWidgetsLayoutItemProxy::setView(dtkWidgetsWidget *view)
item->d->maxmz->setEnabled(false);
}
item->d->proxy->d->view = Q_nullptrPTR;
item->d->proxy->d->view = nullptr;
}
}
if (d->view) {
this->layout()->removeWidget(d->view->widget());
d->view->setParent(Q_nullptrPTR);
d->view->setParent(nullptr);
}
if(d->form)
......
......@@ -14,7 +14,7 @@
#include "dtkWidgetsParameterDirBrowse.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterDirBrowsePrivate declaration
......
......@@ -16,11 +16,8 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
#include <dtkCore/dtkCoreParameterPath>
class DTKWIDGETS_EXPORT dtkWidgetsParameterDirBrowse : public dtkWidgetsParameterBase<dtk::d_path>
......
......@@ -15,7 +15,8 @@
#include "dtkWidgetsParameterDoubleSpinBox.h"
#include "dtkWidgetsSpinBoxDouble.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterDoubleSpinBoxPrivate declaration
......
......@@ -16,8 +16,6 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
......
......@@ -14,12 +14,12 @@
#pragma once
#include<dtkWidgetsExport.h>
#include <dtkCore>
#include<dtkWidgetsExport>
#include "dtkWidgetsParameter.h"
#include <dtkCore>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterPlugin declaration
// ///////////////////////////////////////////////////////////////////
......
......@@ -14,7 +14,7 @@
#include "dtkWidgetsParameterFileBrowse.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterFileBrowsePrivate declaration
......
......@@ -16,8 +16,6 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
......@@ -28,7 +26,7 @@ class DTKWIDGETS_EXPORT dtkWidgetsParameterFileBrowse : public dtkWidgetsParame
Q_OBJECT
public:
dtkWidgetsParameterFileBrowse(QWidget* parent = 0);
dtkWidgetsParameterFileBrowse(QWidget* parent = nullptr);
~dtkWidgetsParameterFileBrowse(void);
public:
......
......@@ -14,7 +14,7 @@
#include "dtkWidgetsParameterFileSave.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterFileSavePrivate declaration
......
......@@ -16,11 +16,8 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
#include <dtkCore/dtkCoreParameterPath>
class DTKWIDGETS_EXPORT dtkWidgetsParameterFileSave : public dtkWidgetsParameterBase<dtk::d_path>
......@@ -28,7 +25,7 @@ class DTKWIDGETS_EXPORT dtkWidgetsParameterFileSave : public dtkWidgetsParamete
Q_OBJECT
public:
dtkWidgetsParameterFileSave(QWidget* parent = 0);
dtkWidgetsParameterFileSave(QWidget* parent = nullptr);
~dtkWidgetsParameterFileSave(void);
public:
......
......@@ -14,7 +14,7 @@
#include "dtkWidgetsParameterIntSlider.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterIntSliderPrivate declaration
......
......@@ -20,14 +20,12 @@
#include <dtkCore/dtkCoreParameter>
#include <QtWidgets>
class DTKWIDGETS_EXPORT dtkWidgetsParameterIntSlider : public dtkWidgetsParameterBase<dtk::d_int>
{
Q_OBJECT
public:
dtkWidgetsParameterIntSlider(QWidget* parent = 0);
dtkWidgetsParameterIntSlider(QWidget* parent = nullptr);
~dtkWidgetsParameterIntSlider(void);
public:
......
......@@ -14,7 +14,7 @@
#include "dtkWidgetsParameterIntSpinBox.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterIntSpinBoxPrivate declaration
......
......@@ -20,8 +20,6 @@
#include <dtkCore/dtkCoreParameter>
#include <QtWidgets>
class DTKWIDGETS_EXPORT dtkWidgetsParameterIntSpinBox : public dtkWidgetsParameterBase<dtk::d_int>
{
Q_OBJECT
......
......@@ -15,7 +15,8 @@
#include "dtkWidgetsParameterLongLongSpinBox.h"
#include "dtkWidgetsSpinBoxLong.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterLongLongSpinBoxPrivate declaration
......
......@@ -16,8 +16,6 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
......@@ -27,7 +25,7 @@ class DTKWIDGETS_EXPORT dtkWidgetsParameterLongLongSpinBox : public dtkWidgetsPa
Q_OBJECT
public:
dtkWidgetsParameterLongLongSpinBox(QWidget* parent = 0);
dtkWidgetsParameterLongLongSpinBox(QWidget* parent = nullptr);
~dtkWidgetsParameterLongLongSpinBox(void);
public:
......
......@@ -21,6 +21,8 @@
#include <dtkCore/dtkCoreParameter>
#include <dtkFonts/dtkFontAwesome>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterMenuBarGeneratorPrivate declaration
// ///////////////////////////////////////////////////////////////////
......
......@@ -15,7 +15,7 @@
#include "dtkWidgetsParameterScientificSpinBox.h"
#include "dtkWidgetsSpinBoxDouble.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterScientificSpinBoxPrivate declaration
......
......@@ -16,8 +16,6 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
......@@ -27,7 +25,7 @@ class DTKWIDGETS_EXPORT dtkWidgetsParameterScientificSpinBox : public dtkWidgets
Q_OBJECT
public:
dtkWidgetsParameterScientificSpinBox(QWidget* parent = 0);
dtkWidgetsParameterScientificSpinBox(QWidget* parent = nullptr);
~dtkWidgetsParameterScientificSpinBox(void);
public:
......
......@@ -14,7 +14,7 @@
#include "dtkWidgetsParameterStringLineEdit.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterStringLineEditPrivate declaration
......
......@@ -16,8 +16,6 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
......@@ -46,4 +44,4 @@ inline dtkWidgetsParameter *dtkWidgetsParameterStringLineEditCreator(void)
return new dtkWidgetsParameterStringLineEdit();
}
//
// dtkWidgetsParameterStringLineEdit.h ends here
\ No newline at end of file
// dtkWidgetsParameterStringLineEdit.h ends here
......@@ -14,7 +14,7 @@
#include "dtkWidgetsParameterStringListComboBox.h"
#include <dtkLog>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsParameterStringListComboBoxPrivate declaration
......
......@@ -16,8 +16,6 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include "dtkWidgetsParameter.h"
#include <dtkCore/dtkCoreParameter>
......
......@@ -16,7 +16,7 @@
#include <dtkWidgetsExport>
#include <QtWidgets>
#include <QtCore/QSettings>
class DTKWIDGETS_EXPORT dtkWidgetsSettings : public QSettings
{
......
......@@ -14,6 +14,12 @@
#include "dtkWidgetsSpinBoxDouble.h"
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
class dtkWidgetsSpinBoxDoublePrivate : public QObject
{
Q_OBJECT
......@@ -126,12 +132,12 @@ QValidator::State dtkWidgetsSpinBoxDoublePrivate::validate(QString &text, int &p
return (input_check ? QValidator::Acceptable : QValidator::Invalid);
}
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
///
dtkWidgetsSpinBoxDouble::dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation notation, QWidget *parent) : QAbstractSpinBox(parent)
dtkWidgetsSpinBoxDouble::dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation notation, QWidget *parent) : QAbstractSpinBox(parent), d(new dtkWidgetsSpinBoxDoublePrivate)
{
d = new dtkWidgetsSpinBoxDoublePrivate;
d->q = this;
this->setLocale(QLocale::C);
......
......@@ -13,8 +13,7 @@
// Code:
#pragma once
#include <QtCore>
#include <QtWidgets>
#include <QtWidgets/QAbstractSpinBox>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetSpinBoxDouble
......@@ -30,7 +29,7 @@ class dtkWidgetsSpinBoxDouble : public QAbstractSpinBox
Q_OBJECT
public:
dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation, QWidget * parent = 0);
dtkWidgetsSpinBoxDouble(QDoubleValidator::Notation, QWidget * parent = 0);
~dtkWidgetsSpinBoxDouble(void);
signals:
......
......@@ -14,6 +14,12 @@
#include "dtkWidgetsSpinBoxLong.h"
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// dtkWidgetsSpinBoxLongPrivate
// ///////////////////////////////////////////////////////////////////
class dtkWidgetsSpinBoxLongPrivate : public QObject
{
Q_OBJECT
......@@ -86,9 +92,8 @@ QValidator::State dtkWidgetsSpinBoxLongPrivate::validate(QString &text, int &pos
///
dtkWidgetsSpinBoxLong::dtkWidgetsSpinBoxLong(QWidget *parent) : QAbstractSpinBox(parent)
dtkWidgetsSpinBoxLong::dtkWidgetsSpinBoxLong(QWidget *parent) : QAbstractSpinBox(parent), d(new dtkWidgetsSpinBoxLongPrivate)
{
d = new dtkWidgetsSpinBoxLongPrivate;
d->q = this;
this->setLocale(QLocale::C);
......
......@@ -11,17 +11,19 @@
//
// Code:
#pragma once
#include <QtCore>
#include <QtWidgets>
#include <dtkWidgetsExport>
#include <QtWidgets/QAbstractSpinBox>
class dtkWidgetsSpinBoxLong : public QAbstractSpinBox
{
Q_OBJECT
public:
dtkWidgetsSpinBoxLong(QWidget * parent = 0);
dtkWidgetsSpinBoxLong(QWidget * parent = nullptr);
~dtkWidgetsSpinBoxLong(void);
signals:
......
......@@ -3,7 +3,7 @@
#include <dtkWidgetsExport>
#include <dtkCore>
#include <QtWidgets>
#include <QtWidgets/QWidget>
class DTKWIDGETS_EXPORT dtkWidgetsWorkspace: public QWidget
{
......
#include "dtkWidgetsWorkspaceBar.h"
#include <dtkFonts>
#include "dtkWidgets.h"
#include "dtkWidgetsWorkspace.h"
#include <dtkFonts/dtkFontAwesome>
#include <QtGui>
#include <QtWidgets>
// ///////////////////////////////////////////////////////////////////
// Button
// ///////////////////////////////////////////////////////////////////
......
......@@ -2,9 +2,10 @@
#include <dtkWidgetsExport.h>
#include <QtWidgets>
#include <QtWidgets/QFrame>
class dtkWidgetsWorkspace;
class QStackedWidget;
class DTKWIDGETS_EXPORT dtkWidgetsWorkspaceBar: public QFrame
{
......
......@@ -66,8 +66,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Test)
## Test rules
## ###################################################################
add_test(dtkWidgetsParametersTest ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME} dtkWidgetsParametersTest)
add_test(dtkWidgetsParameterMenuBarGeneratorTest ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME} dtkWidgetsParameterMenuBarGeneratorTest)
add_test(dtkWidgetsParametersTest ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME} dtkWidgetsParametersTest)
add_test(dtkWidgetsParameterMenuBarGeneratorTest ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME} dtkWidgetsParameterMenuBarGeneratorTest)
######################################################################
### CMakeLists.txt ends here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment