/usr/include/libdtk-2.0.7/DWidget/dtkwidget_global.h is in libdtkwidget-dev 2.0.7.2-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | /*
* Copyright (C) 2015 ~ 2017 Deepin Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <dtkcore_global.h>
#include <dtkwidget_config.h>
#include <QtCore/QMetaMethod>
#define DWIDGET_NAMESPACE Widget
#define DTK_WIDGET_NAMESPACE DTK_NAMESPACE::Widget
#define DWIDGET_BEGIN_NAMESPACE namespace DTK_NAMESPACE { namespace DWIDGET_NAMESPACE {
#define DWIDGET_END_NAMESPACE }}
#define DWIDGET_USE_NAMESPACE using namespace DTK_WIDGET_NAMESPACE;
namespace Dtk
{
namespace Widget
{
#if defined(DTK_STATIC_LIB)
#define DWIDGET_INIT_RESOURCE() \
do { \
Q_INIT_RESOURCE(icons); \
Q_INIT_RESOURCE(dui_theme_dark); \
Q_INIT_RESOURCE(dui_theme_light); } while (0)
#endif
}
}
#if defined(DTK_STATIC_LIB)
# define LIBDTKWIDGETSHARED_EXPORT
#else
#if defined(LIBDTKWIDGET_LIBRARY)
# define LIBDTKWIDGETSHARED_EXPORT Q_DECL_EXPORT
#else
# define LIBDTKWIDGETSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif
#define DTKWIDGET_DECL_DEPRECATED D_DECL_DEPRECATED
#define D_THEME_INIT_WIDGET(className, ...) do{\
DThemeManager * manager = DThemeManager::instance(); \
{const QString &sheet = this->styleSheet() + manager->getQssForWidget(#className, this); \
if (!sheet.isEmpty()) this->setStyleSheet(sheet); \
} \
connect(manager, &DThemeManager::themeChanged, this, [this, manager] (QString) { \
const QString &sheet = manager->getQssForWidget(#className, this); \
if (!sheet.isEmpty()) this->setStyleSheet(sheet); \
});\
connect(manager, &DThemeManager::widgetThemeChanged, this, [this, manager] (QWidget *w, QString) { \
if (w == this) this->setStyleSheet(manager->getQssForWidget(#className, this)); \
}); \
QStringList list = QString(#__VA_ARGS__).replace(" ", "").split(",");\
const QMetaObject *self = metaObject();\
Q_FOREACH (const QString &str, list) {\
if(str.isEmpty())\
continue;\
connect(this, self->property(self->indexOfProperty(str.toLatin1().data())).notifySignal(),\
manager, manager->metaObject()->method(manager->metaObject()->indexOfMethod("updateQss()")));\
} \
} while (0);
|