删除不再有用的文件

This commit is contained in:
RigoLigoRLC
2021-08-31 15:13:46 +08:00
parent 5cbd758f67
commit f50b014b77
12 changed files with 0 additions and 800 deletions

View File

@@ -1 +0,0 @@
#include "dobject.h"

View File

@@ -1 +0,0 @@
#include "dobject_p.h"

View File

@@ -1 +0,0 @@
#include "dpalette.h"

View File

@@ -1,135 +0,0 @@
/*
* Copyright (C) 2019 ~ 2019 Deepin Technology Co., Ltd.
*
* Author: zccrs <zccrs@live.com>
*
* Maintainer: zccrs <zhangjide@deepin.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser 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 Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DGUIAPPLICATIONHELPER_H
#define DGUIAPPLICATIONHELPER_H
#include <dtkgui_global.h>
#include <DPalette>
#include <DObject>
#include <QGuiApplication>
#include <QObject>
DGUI_BEGIN_NAMESPACE
class DPlatformTheme;
class DFontManager;
class DGuiApplicationHelperPrivate;
class DGuiApplicationHelper : public QObject, public DCORE_NAMESPACE::DObject
{
Q_OBJECT
D_DECLARE_PRIVATE(DGuiApplicationHelper)
Q_PROPERTY(ColorType themeType READ themeType NOTIFY themeTypeChanged)
Q_PROPERTY(ColorType paletteType READ paletteType WRITE setPaletteType NOTIFY paletteTypeChanged)
public:
enum ColorType {
UnknownType,
LightType,
DarkType
};
// Q_ENUM(ColorType)
enum SingleScope {
UserScope,
GroupScope,
WorldScope
};
// Q_ENUM(SingleScope)
enum Attribute {
UseInactiveColorGroup = 1 << 0,
ColorCompositing = 1 << 1,
/* readonly flag */
ReadOnlyLimit = 1 << 22,
IsDeepinPlatformTheme = ReadOnlyLimit << 0,
IsDXcbPlatform = ReadOnlyLimit << 1,
IsXWindowPlatform = ReadOnlyLimit << 2,
IsTableEnvironment = ReadOnlyLimit << 3,
IsDeepinEnvironment = ReadOnlyLimit << 4,
};
// Q_ENUM(Attribute)
Q_DECLARE_FLAGS(Attributes, Attribute)
typedef DGuiApplicationHelper *(*HelperCreator)();
D_DECL_DEPRECATED static void registerInstanceCreator(HelperCreator creator);
static DGuiApplicationHelper *instance();
~DGuiApplicationHelper();
static QColor adjustColor(const QColor &base, qint8 hueFloat, qint8 saturationFloat, qint8 lightnessFloat,
qint8 redFloat, qint8 greenFloat, qint8 blueFloat, qint8 alphaFloat);
static QColor blendColor(const QColor &substrate, const QColor &superstratum);
static DPalette standardPalette(ColorType type);
static void generatePaletteColor(DPalette &base, QPalette::ColorRole role, ColorType type);
static void generatePaletteColor(DPalette &base, DPalette::ColorType role, ColorType type);
static void generatePalette(DPalette &base, ColorType type = UnknownType);
static DPalette fetchPalette(const DPlatformTheme *theme);
Q_DECL_DEPRECATED_X("Use UseInactiveColorGroup enum with setAttribute.") static void setUseInactiveColorGroup(bool on);
Q_DECL_DEPRECATED_X("Use ColorCompositing enum with setAttribute.") static void setColorCompositingEnabled(bool on);
static bool isXWindowPlatform();
static bool isTabletEnvironment();
static void setAttribute(Attribute attribute, bool enable);
static bool testAttribute(Attribute attribute);
DPlatformTheme *systemTheme() const;
DPlatformTheme *applicationTheme() const;
D_DECL_DEPRECATED DPlatformTheme *windowTheme(QWindow *window) const;
DPalette applicationPalette() const;
void setApplicationPalette(const DPalette &palette);
D_DECL_DEPRECATED DPalette windowPalette(QWindow *window) const;
const DFontManager *fontManager() const;
static ColorType toColorType(const QColor &color);
static ColorType toColorType(const QPalette &palette);
ColorType themeType() const;
ColorType paletteType() const;
static bool setSingleInstance(const QString &key, SingleScope singleScope = UserScope);
static void setSingleInstanceInterval(int interval = 3000);
D_DECL_DEPRECATED static void setSingelInstanceInterval(int interval = 3000);
public Q_SLOTS:
D_DECL_DEPRECATED_X("Plase use setPaletteType") void setThemeType(ColorType themeType);
void setPaletteType(ColorType paletteType);
Q_SIGNALS:
void themeTypeChanged(ColorType themeType);
void paletteTypeChanged(ColorType paletteType);
void newProcessInstance(qint64 pid, const QStringList &arguments);
void fontChanged(const QFont &font);
void applicationPaletteChanged();
protected:
explicit DGuiApplicationHelper();
virtual void initialize();
private:
D_PRIVATE_SLOT(void _q_initApplicationTheme(bool))
friend class _DGuiApplicationHelper;
};
DGUI_END_NAMESPACE
#endif // DGUIAPPLICATIONHELPER_H

View File

@@ -1,54 +0,0 @@
/*
* 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 Lesser 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 Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOBJECT_H
#define DOBJECT_H
#include <QScopedPointer>
#include "dtkcore_global.h"
DCORE_BEGIN_NAMESPACE
#define D_DECLARE_PRIVATE(Class) Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_d_ptr),Class)
#define D_DECLARE_PUBLIC(Class) Q_DECLARE_PUBLIC(Class)
#define D_D(Class) Q_D(Class)
#define D_Q(Class) Q_Q(Class)
#define D_DC(Class) Q_D(const Class)
#define D_QC(Class) Q_Q(const Class)
#define D_PRIVATE_SLOT(Func) Q_PRIVATE_SLOT(d_func(), Func)
class DObjectPrivate;
class LIBDTKCORESHARED_EXPORT DObject
{
protected:
DObject(DObject *parent = nullptr);
DObject(DObjectPrivate &dd, DObject *parent = nullptr);
virtual ~DObject();
QScopedPointer<DObjectPrivate> d_d_ptr;
Q_DISABLE_COPY(DObject)
D_DECLARE_PRIVATE(DObject)
};
DCORE_END_NAMESPACE
#endif // DOBJECT_H

View File

@@ -1,42 +0,0 @@
/*
* 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 Lesser 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 Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOBJECT_P_H
#define DOBJECT_P_H
#include "dtkcore_global.h"
DCORE_BEGIN_NAMESPACE
class DObject;
class DObjectPrivate
{
public:
virtual ~DObjectPrivate();
protected:
DObjectPrivate(DObject *qq);
DObject *q_ptr;
Q_DECLARE_PUBLIC(DObject)
};
DCORE_END_NAMESPACE
#endif // DOBJECT_P_H

View File

@@ -1,110 +0,0 @@
/*
* Copyright (C) 2019 ~ 2019 Deepin Technology Co., Ltd.
*
* Author: zccrs <zccrs@live.com>
*
* Maintainer: zccrs <zhangjide@deepin.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser 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 Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DPALETTE_H
#define DPALETTE_H
#include <dtkgui_global.h>
#include <QDebug>
#include <QPalette>
DGUI_BEGIN_NAMESPACE
class DPalettePrivate;
class DPalette : public QPalette
{
public:
enum ColorType {
NoType,
ItemBackground, //列表项的背景色
TextTitle, //标题型文本的颜色
TextTips, //提示性文本的颜色
TextWarning, //警告类型的文本颜色
TextLively, //活跃式文本颜色(不受活动色影响)
LightLively, //活跃式按钮recommend button背景色中的亮色不受活跃色影响
DarkLively, //活跃式按钮recommend button背景色中的暗色会从亮色渐变到暗色不受活跃色影响
FrameBorder, //控件边框颜色
PlaceholderText, //占位类型的文本颜色,可用于输入框占位内容等提示性文字
FrameShadowBorder, //用于跟阴影叠加的边框颜色
ObviousBackground, //明显的背景色
NColorTypes
};
DPalette();
DPalette(const QPalette &palette);
DPalette(const DPalette &palette);
~DPalette();
DPalette &operator=(const DPalette &palette);
inline const QColor &color(ColorGroup cg, ColorType ct) const
{ return brush(cg, ct).color(); }
const QBrush &brush(ColorGroup cg, ColorType ct) const;
inline void setColor(ColorGroup cg, ColorType ct, const QColor &color)
{ setBrush(cg, ct, color); }
inline void setColor(ColorType ct, const QColor &color)
{ setColor(All, ct, color); }
inline void setBrush(ColorType ct, const QBrush &brush)
{ setBrush(All, ct, brush); }
void setBrush(ColorGroup cg, ColorType ct, const QBrush &brush);
inline const QColor &color(ColorType ct) const { return color(Current, ct); }
inline const QBrush &brush(ColorType ct) const { return brush(Current, ct); }
inline const QBrush &itemBackground() const { return brush(ItemBackground); }
inline const QBrush &textTiele() const { return brush(TextTitle); }
inline const QBrush &textTips() const { return brush(TextTips); }
inline const QBrush &textWarning() const { return brush(TextWarning); }
inline const QBrush &textLively() const { return brush(TextLively); }
inline const QBrush &lightLively() const { return brush(LightLively); }
inline const QBrush &darkLively() const { return brush(DarkLively); }
inline const QBrush &frameBorder() const { return brush(FrameBorder); }
inline const QBrush &placeholderText() const { return brush(PlaceholderText); }
inline const QBrush &frameShadowBorder() const { return brush(FrameShadowBorder); }
using QPalette::color;
using QPalette::brush;
using QPalette::setBrush;
using QPalette::setColor;
protected:
QScopedPointer<DPalettePrivate> d;
friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &s, const DPalette &p);
};
DGUI_END_NAMESPACE
QT_BEGIN_NAMESPACE
/*****************************************************************************
DPalette stream functions
*****************************************************************************/
#ifndef QT_NO_DATASTREAM
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &ds, const DTK_GUI_NAMESPACE::DPalette &p);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &ds, DTK_GUI_NAMESPACE::DPalette &p);
#endif // QT_NO_DATASTREAM
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug, const DTK_GUI_NAMESPACE::DPalette &);
#endif
QT_END_NAMESPACE
#endif // DPALETTE_H

View File

@@ -1,29 +0,0 @@
#define DTK_VERSION_MAJOR 5
#define DTK_VERSION_MINOR 5
#define DTK_VERSION_PATCH 2
#define DTK_VERSION_BUILD 0
#define DTK_VERSION_STR "5.5.2"
//
#define DTKCORE_CLASS_DObject
#define DTKCORE_CLASS_DObjectPrivate
#define DTKCORE_CLASS_DSingleton
#define DTKCORE_CLASS_DUtil
#define DTKCORE_CLASS_DPinyin
#define DTKCORE_CLASS_DDBusSender
#define DTKCORE_CLASS_DRecentManager
#define DTKCORE_CLASS_DNotifySender
#define DTKCORE_CLASS_DExportedInterface
#define DTKCORE_CLASS_DVtableHook
#define DTKCORE_CLASS_DFileServices
#define DTKCORE_CLASS_DThreadUtils
#define DTKCORE_CLASS_DLog
#define DTKCORE_CLASS_DFileWatcher
#define DTKCORE_CLASS_DBaseFileWatcher
#define DTKCORE_CLASS_DFileSystemWatcher
#define DTKCORE_CLASS_DFileWatcherManager
#define DTKCORE_CLASS_DPathBuf
#define DTKCORE_CLASS_DStandardPaths
#define DTKCORE_CLASS_DTrashManager
#define DTKCORE_CLASS_DSettings
#define DTKCORE_CLASS_DSettingsGroup
#define DTKCORE_CLASS_DSettingsOption

View File

@@ -1,69 +0,0 @@
/*
* Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser 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 Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <QtCore/qglobal.h>
#include <dtkcore_config.h>
#define DTK_NAMESPACE Dtk
#if !defined(DTK_NAMESPACE)
# define DTK_BEGIN_NAMESPACE
# define DTK_END_NAMESPACE
# define DTK_USE_NAMESPACE
#else
# define DTK_BEGIN_NAMESPACE namespace DTK_NAMESPACE {
# define DTK_END_NAMESPACE }
# define DTK_USE_NAMESPACE using namespace DTK_NAMESPACE;
#endif
#define DCORE_NAMESPACE Core
#define DTK_CORE_NAMESPACE DTK_NAMESPACE::DCORE_NAMESPACE
#if !defined(DCORE_NAMESPACE)
# define DCORE_BEGIN_NAMESPACE
# define DCORE_END_NAMESPACE
# define DCORE_USE_NAMESPACE
#else
# define DCORE_BEGIN_NAMESPACE namespace DTK_NAMESPACE { namespace DCORE_NAMESPACE {
# define DCORE_END_NAMESPACE }}
# define DCORE_USE_NAMESPACE using namespace DTK_CORE_NAMESPACE;
#endif
#if defined(DTK_STATIC_LIB)
# define LIBDTKCORESHARED_EXPORT
#else
#if defined(LIBDTKCORE_LIBRARY)
# define LIBDTKCORESHARED_EXPORT Q_DECL_EXPORT
#else
# define LIBDTKCORESHARED_EXPORT Q_DECL_IMPORT
#endif
#endif
#ifdef D_DEPRECATED_CHECK
#define D_DECL_DEPRECATED_X(text) Q_DECL_HIDDEN
#define D_DECL_DEPRECATED Q_DECL_HIDDEN
#else
#define D_DECL_DEPRECATED Q_DECL_DEPRECATED
#define D_DECL_DEPRECATED_X Q_DECL_DEPRECATED_X
#endif
#define DTK_VERSION_CHECK(major, minor, patch, build) ((major<<24)|(minor<<16)|(patch<<8)|build)
#define DTK_VERSION DTK_VERSION_CHECK(DTK_VERSION_MAJOR, DTK_VERSION_MINOR, DTK_VERSION_PATCH, DTK_VERSION_BUILD)

View File

@@ -1,35 +0,0 @@
/*
* Copyright (C) 2017 ~ 2019 Deepin Technology Co., Ltd.
*
* Author: zccrs <zccrs@live.com>
*
* Maintainer: zccrs <zhangjide@deepin.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser 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 Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DTKGUI_GLOBAL_H
#define DTKGUI_GLOBAL_H
#pragma once
#include <dtkcore_global.h>
#define DGUI_NAMESPACE Gui
#define DTK_GUI_NAMESPACE DTK_NAMESPACE::Gui
#define DGUI_BEGIN_NAMESPACE namespace DTK_NAMESPACE { namespace DGUI_NAMESPACE {
#define DGUI_END_NAMESPACE }}
#define DGUI_USE_NAMESPACE using namespace DTK_GUI_NAMESPACE;
#endif // DTKGUI_GLOBAL_H