mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 修复符号冲突导致的概率性崩溃问题
语音助手中使用的类TipsWidget与任务栏项目中的同名类的实现不一样,导致符号冲突 解决方法是在任务栏的代码中加上命名空间, Log: 修复符号冲突导致的概率性崩溃问题 Bug: https://pms.uniontech.com/zentao/bug-view-35037.html
This commit is contained in:
parent
7f730c867f
commit
5a15ae7f17
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "appsnapshot.h"
|
#include "appsnapshot.h"
|
||||||
#include "previewcontainer.h"
|
#include "previewcontainer.h"
|
||||||
|
#include "../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <DStyle>
|
#include <DStyle>
|
||||||
|
|
||||||
@ -51,6 +52,8 @@ struct SHMInfo {
|
|||||||
} rect;
|
} rect;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
|
|
||||||
AppSnapshot::AppSnapshot(const WId wid, QWidget *parent)
|
AppSnapshot::AppSnapshot(const WId wid, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, m_wid(wid)
|
, m_wid(wid)
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include "../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <DIconButton>
|
#include <DIconButton>
|
||||||
#include <DWindowManagerHelper>
|
#include <DWindowManagerHelper>
|
||||||
@ -42,6 +41,10 @@ struct SHMInfo;
|
|||||||
struct _XImage;
|
struct _XImage;
|
||||||
typedef _XImage XImage;
|
typedef _XImage XImage;
|
||||||
|
|
||||||
|
namespace Dock {
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
|
|
||||||
class AppSnapshot : public QWidget
|
class AppSnapshot : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -89,7 +92,7 @@ private:
|
|||||||
QImage m_snapshot;
|
QImage m_snapshot;
|
||||||
QRectF m_snapshotSrcRect;
|
QRectF m_snapshotSrcRect;
|
||||||
|
|
||||||
TipsWidget *m_title;
|
Dock::TipsWidget *m_title;
|
||||||
QTimer *m_waitLeaveTimer;
|
QTimer *m_waitLeaveTimer;
|
||||||
DIconButton *m_closeBtn2D;
|
DIconButton *m_closeBtn2D;
|
||||||
DWindowManagerHelper *m_wmHelper;
|
DWindowManagerHelper *m_wmHelper;
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#include <DPushButton>
|
#include <DPushButton>
|
||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
using namespace Dock;
|
||||||
|
|
||||||
// 添加accessible
|
// 添加accessible
|
||||||
SET_FORM_ACCESSIBLE(MainWindow, "mainwindow")
|
SET_FORM_ACCESSIBLE(MainWindow, "mainwindow")
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
DGUI_USE_NAMESPACE
|
DGUI_USE_NAMESPACE
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
|
|
||||||
BluetoothItem::BluetoothItem(QWidget *parent)
|
BluetoothItem::BluetoothItem(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, m_tipsLabel(new TipsWidget(this))
|
, m_tipsLabel(new TipsWidget(this))
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
#define BLUETOOTH_KEY "bluetooth-item-key"
|
#define BLUETOOTH_KEY "bluetooth-item-key"
|
||||||
|
|
||||||
class BluetoothApplet;
|
class BluetoothApplet;
|
||||||
|
namespace Dock {
|
||||||
class TipsWidget;
|
class TipsWidget;
|
||||||
|
}
|
||||||
class BluetoothItem : public QWidget
|
class BluetoothItem : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -59,7 +61,7 @@ signals:
|
|||||||
void justHasAdapter();
|
void justHasAdapter();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
BluetoothApplet *m_applet;
|
BluetoothApplet *m_applet;
|
||||||
QPixmap m_iconPixmap;
|
QPixmap m_iconPixmap;
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "datetimeplugin.h"
|
#include "datetimeplugin.h"
|
||||||
|
#include "../../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <DDBusSender>
|
#include <DDBusSender>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
@ -30,7 +31,7 @@
|
|||||||
|
|
||||||
#define PLUGIN_STATE_KEY "enable"
|
#define PLUGIN_STATE_KEY "enable"
|
||||||
#define TIME_FORMAT_KEY "Use24HourFormat"
|
#define TIME_FORMAT_KEY "Use24HourFormat"
|
||||||
|
using namespace Dock;
|
||||||
DatetimePlugin::DatetimePlugin(QObject *parent)
|
DatetimePlugin::DatetimePlugin(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_interface(nullptr)
|
, m_interface(nullptr)
|
||||||
|
@ -24,12 +24,14 @@
|
|||||||
|
|
||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
#include "datetimewidget.h"
|
#include "datetimewidget.h"
|
||||||
#include "../../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
|
namespace Dock{
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class QDBusInterface;
|
class QDBusInterface;
|
||||||
class DatetimePlugin : public QObject, PluginsItemInterface
|
class DatetimePlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
@ -72,7 +74,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QPointer<DatetimeWidget> m_centralWidget;
|
QPointer<DatetimeWidget> m_centralWidget;
|
||||||
QPointer<TipsWidget> m_dateTipsLabel;
|
QPointer<Dock::TipsWidget> m_dateTipsLabel;
|
||||||
QTimer *m_refershTimer;
|
QTimer *m_refershTimer;
|
||||||
QString m_currentTimeString;
|
QString m_currentTimeString;
|
||||||
QDBusInterface *m_interface;
|
QDBusInterface *m_interface;
|
||||||
|
@ -20,11 +20,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "multitaskingplugin.h"
|
#include "multitaskingplugin.h"
|
||||||
|
#include "../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
|
||||||
#define PLUGIN_STATE_KEY "enable"
|
#define PLUGIN_STATE_KEY "enable"
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
MultitaskingPlugin::MultitaskingPlugin(QObject *parent)
|
MultitaskingPlugin::MultitaskingPlugin(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_pluginLoaded(false)
|
, m_pluginLoaded(false)
|
||||||
|
@ -24,10 +24,11 @@
|
|||||||
|
|
||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
#include "multitaskingwidget.h"
|
#include "multitaskingwidget.h"
|
||||||
#include "../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
namespace Dock {
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class MultitaskingPlugin : public QObject, PluginsItemInterface
|
class MultitaskingPlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -63,7 +64,7 @@ private:
|
|||||||
bool m_pluginLoaded;
|
bool m_pluginLoaded;
|
||||||
|
|
||||||
MultitaskingWidget *m_multitaskingWidget;
|
MultitaskingWidget *m_multitaskingWidget;
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MULTITASKINGPLUGIN_H
|
#endif // MULTITASKINGPLUGIN_H
|
||||||
|
@ -40,7 +40,7 @@ extern void initFontColor(QWidget *widget)
|
|||||||
|
|
||||||
NetworkItem::NetworkItem(QWidget *parent)
|
NetworkItem::NetworkItem(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, m_tipsWidget(new TipsWidget(this))
|
, m_tipsWidget(new Dock::TipsWidget(this))
|
||||||
, m_applet(new QScrollArea(this))
|
, m_applet(new QScrollArea(this))
|
||||||
, m_switchWire(true)
|
, m_switchWire(true)
|
||||||
, m_timer(new QTimer(this))
|
, m_timer(new QTimer(this))
|
||||||
|
@ -14,7 +14,9 @@ DGUI_USE_NAMESPACE
|
|||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
|
||||||
class PluginState;
|
class PluginState;
|
||||||
|
namespace Dock {
|
||||||
class TipsWidget;
|
class TipsWidget;
|
||||||
|
}
|
||||||
class WiredItem;
|
class WiredItem;
|
||||||
class WirelessItem;
|
class WirelessItem;
|
||||||
class HorizontalSeperator;
|
class HorizontalSeperator;
|
||||||
@ -82,7 +84,7 @@ private:
|
|||||||
int getStrongestAp();
|
int getStrongestAp();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TipsWidget *m_tipsWidget;
|
Dock::TipsWidget *m_tipsWidget;
|
||||||
QScrollArea *m_applet;
|
QScrollArea *m_applet;
|
||||||
|
|
||||||
QLabel *m_wiredTitle;
|
QLabel *m_wiredTitle;
|
||||||
|
@ -20,12 +20,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "onboardplugin.h"
|
#include "onboardplugin.h"
|
||||||
|
#include "../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#define PLUGIN_STATE_KEY "enable"
|
#define PLUGIN_STATE_KEY "enable"
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
OnboardPlugin::OnboardPlugin(QObject *parent)
|
OnboardPlugin::OnboardPlugin(QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
#include "onboarditem.h"
|
#include "onboarditem.h"
|
||||||
#include "../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <com_deepin_dde_daemon_dock.h>
|
#include <com_deepin_dde_daemon_dock.h>
|
||||||
@ -32,7 +31,9 @@
|
|||||||
|
|
||||||
using DBusDock = com::deepin::dde::daemon::Dock;
|
using DBusDock = com::deepin::dde::daemon::Dock;
|
||||||
using DockEntryInter = com::deepin::dde::daemon::dock::Entry;
|
using DockEntryInter = com::deepin::dde::daemon::dock::Entry;
|
||||||
|
namespace Dock {
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class OnboardPlugin : public QObject, PluginsItemInterface
|
class OnboardPlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -71,7 +72,7 @@ private:
|
|||||||
bool m_startupState;
|
bool m_startupState;
|
||||||
|
|
||||||
OnboardItem *m_onboardItem;
|
OnboardItem *m_onboardItem;
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ONBOARDPLUGIN_H
|
#endif // ONBOARDPLUGIN_H
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "powerplugin.h"
|
#include "powerplugin.h"
|
||||||
#include "dbus/dbusaccount.h"
|
#include "dbus/dbusaccount.h"
|
||||||
|
#include "../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QGSettings>
|
#include <QGSettings>
|
||||||
@ -28,6 +29,7 @@
|
|||||||
#define PLUGIN_STATE_KEY "enable"
|
#define PLUGIN_STATE_KEY "enable"
|
||||||
#define DELAYTIME (20 * 1000)
|
#define DELAYTIME (20 * 1000)
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
static QGSettings *GSettingsByApp()
|
static QGSettings *GSettingsByApp()
|
||||||
{
|
{
|
||||||
static QGSettings settings("com.deepin.dde.dock.module.power");
|
static QGSettings settings("com.deepin.dde.dock.module.power");
|
||||||
|
@ -25,14 +25,15 @@
|
|||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
#include "powerstatuswidget.h"
|
#include "powerstatuswidget.h"
|
||||||
#include "dbus/dbuspower.h"
|
#include "dbus/dbuspower.h"
|
||||||
#include "../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <com_deepin_system_systempower.h>
|
#include <com_deepin_system_systempower.h>
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
||||||
using SystemPowerInter = com::deepin::system::Power;
|
using SystemPowerInter = com::deepin::system::Power;
|
||||||
|
namespace Dock {
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class PowerPlugin : public QObject, PluginsItemInterface
|
class PowerPlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -70,7 +71,7 @@ private:
|
|||||||
bool m_showTimeToFull;
|
bool m_showTimeToFull;
|
||||||
|
|
||||||
PowerStatusWidget *m_powerStatusWidget;
|
PowerStatusWidget *m_powerStatusWidget;
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
|
|
||||||
SystemPowerInter *m_systemPowerInter;
|
SystemPowerInter *m_systemPowerInter;
|
||||||
DBusPower *m_powerInter;
|
DBusPower *m_powerInter;
|
||||||
|
@ -20,11 +20,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "showdesktopplugin.h"
|
#include "showdesktopplugin.h"
|
||||||
|
#include "../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
|
||||||
#define PLUGIN_STATE_KEY "enable"
|
#define PLUGIN_STATE_KEY "enable"
|
||||||
|
using namespace Dock;
|
||||||
ShowDesktopPlugin::ShowDesktopPlugin(QObject *parent)
|
ShowDesktopPlugin::ShowDesktopPlugin(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_pluginLoaded(false)
|
, m_pluginLoaded(false)
|
||||||
|
@ -24,10 +24,11 @@
|
|||||||
|
|
||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
#include "showdesktopwidget.h"
|
#include "showdesktopwidget.h"
|
||||||
#include "../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
namespace Dock{
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class ShowDesktopPlugin : public QObject, PluginsItemInterface
|
class ShowDesktopPlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -63,7 +64,7 @@ private:
|
|||||||
bool m_pluginLoaded;
|
bool m_pluginLoaded;
|
||||||
|
|
||||||
ShowDesktopWidget *m_showDesktopWidget;
|
ShowDesktopWidget *m_showDesktopWidget;
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHOWDESKTOPPLUGIN_H
|
#endif // SHOWDESKTOPPLUGIN_H
|
||||||
|
@ -21,12 +21,15 @@
|
|||||||
|
|
||||||
#include "shutdownplugin.h"
|
#include "shutdownplugin.h"
|
||||||
#include "dbus/dbusaccount.h"
|
#include "dbus/dbusaccount.h"
|
||||||
|
#include "../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#define PLUGIN_STATE_KEY "enable"
|
#define PLUGIN_STATE_KEY "enable"
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
|
|
||||||
ShutdownPlugin::ShutdownPlugin(QObject *parent)
|
ShutdownPlugin::ShutdownPlugin(QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
|
|
||||||
|
@ -24,11 +24,13 @@
|
|||||||
|
|
||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
#include "shutdownwidget.h"
|
#include "shutdownwidget.h"
|
||||||
#include "../widgets/tipswidget.h"
|
|
||||||
#include "./dbus/dbuslogin1manager.h"
|
#include "./dbus/dbuslogin1manager.h"
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
||||||
|
namespace Dock {
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class ShutdownPlugin : public QObject, PluginsItemInterface
|
class ShutdownPlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -108,7 +110,7 @@ private:
|
|||||||
bool m_pluginLoaded;
|
bool m_pluginLoaded;
|
||||||
|
|
||||||
ShutdownWidget *m_shutdownWidget;
|
ShutdownWidget *m_shutdownWidget;
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
DBusLogin1Manager* m_login1Inter;
|
DBusLogin1Manager* m_login1Inter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "sinkinputwidget.h"
|
#include "sinkinputwidget.h"
|
||||||
#include "../frame/util/imageutil.h"
|
#include "../frame/util/imageutil.h"
|
||||||
|
#include "../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
@ -35,6 +36,7 @@
|
|||||||
#define APP_TITLE_SIZE 110
|
#define APP_TITLE_SIZE 110
|
||||||
|
|
||||||
DGUI_USE_NAMESPACE
|
DGUI_USE_NAMESPACE
|
||||||
|
using namespace Dock;
|
||||||
|
|
||||||
const QPixmap getIconFromTheme(const QString &name, const QSize &size, const qreal ratio)
|
const QPixmap getIconFromTheme(const QString &name, const QSize &size, const qreal ratio)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include "dbus/dbussinkinput.h"
|
#include "dbus/dbussinkinput.h"
|
||||||
#include "componments/volumeslider.h"
|
#include "componments/volumeslider.h"
|
||||||
#include "../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
@ -32,14 +31,16 @@
|
|||||||
#include <DIconButton>
|
#include <DIconButton>
|
||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
namespace Dock {
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class SinkInputWidget : public QWidget
|
class SinkInputWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SinkInputWidget(const QString &inputPath, QWidget *parent = 0);
|
explicit SinkInputWidget(const QString &inputPath, QWidget *parent = nullptr);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setVolume(const int value);
|
void setVolume(const int value);
|
||||||
@ -58,7 +59,7 @@ private:
|
|||||||
DIconButton *m_volumeBtnMin;
|
DIconButton *m_volumeBtnMin;
|
||||||
QLabel *m_volumeIconMax;
|
QLabel *m_volumeIconMax;
|
||||||
VolumeSlider *m_volumeSlider;
|
VolumeSlider *m_volumeSlider;
|
||||||
TipsWidget *m_volumeLabel;
|
Dock::TipsWidget *m_volumeLabel;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SINKINPUTWIDGET_H
|
#endif // SINKINPUTWIDGET_H
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
DGUI_USE_NAMESPACE
|
DGUI_USE_NAMESPACE
|
||||||
|
using namespace Dock;
|
||||||
SoundApplet::SoundApplet(QWidget *parent)
|
SoundApplet::SoundApplet(QWidget *parent)
|
||||||
: QScrollArea(parent)
|
: QScrollArea(parent)
|
||||||
, m_centralWidget(new QWidget)
|
, m_centralWidget(new QWidget)
|
||||||
|
@ -34,8 +34,9 @@
|
|||||||
#include <DIconButton>
|
#include <DIconButton>
|
||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
namespace Dock{
|
||||||
class TipsWidget;
|
class TipsWidget;
|
||||||
|
}
|
||||||
class SoundApplet : public QScrollArea
|
class SoundApplet : public QScrollArea
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -68,7 +69,7 @@ private:
|
|||||||
DIconButton *m_volumeBtn;
|
DIconButton *m_volumeBtn;
|
||||||
QLabel *m_volumeIconMax;
|
QLabel *m_volumeIconMax;
|
||||||
VolumeSlider *m_volumeSlider;
|
VolumeSlider *m_volumeSlider;
|
||||||
TipsWidget *m_soundShow;
|
Dock::TipsWidget *m_soundShow;
|
||||||
QVBoxLayout *m_centralLayout;
|
QVBoxLayout *m_centralLayout;
|
||||||
|
|
||||||
DBusAudio *m_audioInter;
|
DBusAudio *m_audioInter;
|
||||||
|
@ -39,12 +39,12 @@
|
|||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
DGUI_USE_NAMESPACE
|
DGUI_USE_NAMESPACE
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
SoundItem::SoundItem(QWidget *parent)
|
SoundItem::SoundItem(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent)
|
||||||
|
, m_tipsLabel(new TipsWidget(this))
|
||||||
m_tipsLabel(new TipsWidget(this)),
|
, m_applet(new SoundApplet(this))
|
||||||
m_applet(new SoundApplet(this)),
|
, m_sinkInter(nullptr)
|
||||||
m_sinkInter(nullptr)
|
|
||||||
{
|
{
|
||||||
m_tipsLabel->setObjectName("sound");
|
m_tipsLabel->setObjectName("sound");
|
||||||
m_tipsLabel->setAccessibleName("soundtips");
|
m_tipsLabel->setAccessibleName("soundtips");
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
|
|
||||||
#define SOUND_KEY "sound-item-key"
|
#define SOUND_KEY "sound-item-key"
|
||||||
|
|
||||||
|
namespace Dock {
|
||||||
class TipsWidget;
|
class TipsWidget;
|
||||||
|
}
|
||||||
class SoundItem : public QWidget
|
class SoundItem : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -59,7 +61,7 @@ private slots:
|
|||||||
void sinkChanged(DBusSink *sink);
|
void sinkChanged(DBusSink *sink);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
SoundApplet *m_applet;
|
SoundApplet *m_applet;
|
||||||
DBusSink *m_sinkInter;
|
DBusSink *m_sinkInter;
|
||||||
QPixmap m_iconPixmap;
|
QPixmap m_iconPixmap;
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "trashplugin.h"
|
#include "trashplugin.h"
|
||||||
|
#include "../../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <DApplication>
|
#include <DApplication>
|
||||||
|
|
||||||
@ -32,6 +33,8 @@
|
|||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
|
||||||
|
using namespace Dock;
|
||||||
|
|
||||||
TrashPlugin::TrashPlugin(QObject *parent)
|
TrashPlugin::TrashPlugin(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_trashWidget(nullptr)
|
, m_trashWidget(nullptr)
|
||||||
|
@ -29,11 +29,12 @@
|
|||||||
|
|
||||||
#include "pluginsiteminterface.h"
|
#include "pluginsiteminterface.h"
|
||||||
#include "trashwidget.h"
|
#include "trashwidget.h"
|
||||||
#include "../../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
namespace Dock{
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
class TrashPlugin : public QObject, PluginsItemInterface
|
class TrashPlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -66,7 +67,7 @@ private:
|
|||||||
void refreshPluginItemsVisible();
|
void refreshPluginItemsVisible();
|
||||||
|
|
||||||
TrashWidget *m_trashWidget;
|
TrashWidget *m_trashWidget;
|
||||||
QPointer<TipsWidget> m_tipsLabel;
|
QPointer<Dock::TipsWidget> m_tipsLabel;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TRASHPLUGIN_H
|
#endif // TRASHPLUGIN_H
|
||||||
|
@ -21,7 +21,10 @@
|
|||||||
|
|
||||||
#include "snitraywidget.h"
|
#include "snitraywidget.h"
|
||||||
#include "util/themeappicon.h"
|
#include "util/themeappicon.h"
|
||||||
|
#include "../../widgets/tipswidget.h"
|
||||||
|
|
||||||
#include <dbusmenu-qt5/dbusmenuimporter.h>
|
#include <dbusmenu-qt5/dbusmenuimporter.h>
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
@ -34,7 +37,7 @@ const QStringList ItemStatusList {"Passive", "Active", "NeedsAttention"};
|
|||||||
const QStringList LeftClickInvalidIdList {"sogou-qimpanel",};
|
const QStringList LeftClickInvalidIdList {"sogou-qimpanel",};
|
||||||
QPointer<DockPopupWindow> SNITrayWidget::PopupWindow = nullptr;
|
QPointer<DockPopupWindow> SNITrayWidget::PopupWindow = nullptr;
|
||||||
Dock::Position SNITrayWidget::DockPosition = Dock::Position::Top;
|
Dock::Position SNITrayWidget::DockPosition = Dock::Position::Top;
|
||||||
|
using namespace Dock;
|
||||||
SNITrayWidget::SNITrayWidget(const QString &sniServicePath, QWidget *parent)
|
SNITrayWidget::SNITrayWidget(const QString &sniServicePath, QWidget *parent)
|
||||||
: AbstractTrayWidget(parent),
|
: AbstractTrayWidget(parent),
|
||||||
m_dbusMenuImporter(nullptr),
|
m_dbusMenuImporter(nullptr),
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "abstracttraywidget.h"
|
#include "abstracttraywidget.h"
|
||||||
#include "util/dockpopupwindow.h"
|
#include "util/dockpopupwindow.h"
|
||||||
#include "../../widgets/tipswidget.h"
|
|
||||||
|
|
||||||
#include <org_kde_statusnotifieritem.h>
|
#include <org_kde_statusnotifieritem.h>
|
||||||
|
|
||||||
@ -34,7 +33,9 @@
|
|||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
DGUI_USE_NAMESPACE
|
DGUI_USE_NAMESPACE
|
||||||
class DBusMenuImporter;
|
class DBusMenuImporter;
|
||||||
|
namespace Dock {
|
||||||
|
class TipsWidget;
|
||||||
|
}
|
||||||
//using namespace com::deepin::dde;
|
//using namespace com::deepin::dde;
|
||||||
using namespace org::kde;
|
using namespace org::kde;
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ public:
|
|||||||
|
|
||||||
void showHoverTips();
|
void showHoverTips();
|
||||||
const QPoint topleftPoint() const;
|
const QPoint topleftPoint() const;
|
||||||
void showPopupWindow(QWidget * const content, const bool model = false);
|
void showPopupWindow(QWidget *const content, const bool model = false);
|
||||||
const QPoint popupMarkPoint() const;
|
const QPoint popupMarkPoint() const;
|
||||||
|
|
||||||
static void setDockPostion(const Dock::Position pos) { DockPosition = pos; }
|
static void setDockPostion(const Dock::Position pos) { DockPosition = pos; }
|
||||||
@ -83,18 +84,18 @@ private Q_SLOTS:
|
|||||||
void refreshAttentionIcon();
|
void refreshAttentionIcon();
|
||||||
void showContextMenu(int x, int y);
|
void showContextMenu(int x, int y);
|
||||||
// SNI property change slot
|
// SNI property change slot
|
||||||
void onSNIAttentionIconNameChanged(const QString & value);
|
void onSNIAttentionIconNameChanged(const QString &value);
|
||||||
void onSNIAttentionIconPixmapChanged(DBusImageList value);
|
void onSNIAttentionIconPixmapChanged(DBusImageList value);
|
||||||
void onSNIAttentionMovieNameChanged(const QString & value);
|
void onSNIAttentionMovieNameChanged(const QString &value);
|
||||||
void onSNICategoryChanged(const QString & value);
|
void onSNICategoryChanged(const QString &value);
|
||||||
void onSNIIconNameChanged(const QString & value);
|
void onSNIIconNameChanged(const QString &value);
|
||||||
void onSNIIconPixmapChanged(DBusImageList value);
|
void onSNIIconPixmapChanged(DBusImageList value);
|
||||||
void onSNIIconThemePathChanged(const QString & value);
|
void onSNIIconThemePathChanged(const QString &value);
|
||||||
void onSNIIdChanged(const QString & value);
|
void onSNIIdChanged(const QString &value);
|
||||||
void onSNIMenuChanged(const QDBusObjectPath & value);
|
void onSNIMenuChanged(const QDBusObjectPath &value);
|
||||||
void onSNIOverlayIconNameChanged(const QString & value);
|
void onSNIOverlayIconNameChanged(const QString &value);
|
||||||
void onSNIOverlayIconPixmapChanged(DBusImageList value);
|
void onSNIOverlayIconPixmapChanged(DBusImageList value);
|
||||||
void onSNIStatusChanged(const QString & value);
|
void onSNIStatusChanged(const QString &value);
|
||||||
void hidePopup();
|
void hidePopup();
|
||||||
void hideNonModel();
|
void hideNonModel();
|
||||||
void popupWindowAccept();
|
void popupWindowAccept();
|
||||||
@ -138,7 +139,7 @@ private:
|
|||||||
QTimer *m_popupTipsDelayTimer;
|
QTimer *m_popupTipsDelayTimer;
|
||||||
static Dock::Position DockPosition;
|
static Dock::Position DockPosition;
|
||||||
static QPointer<DockPopupWindow> PopupWindow;
|
static QPointer<DockPopupWindow> PopupWindow;
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
bool m_popupShown;
|
bool m_popupShown;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#define SNI_WATCHER_PATH "/StatusNotifierWatcher"
|
#define SNI_WATCHER_PATH "/StatusNotifierWatcher"
|
||||||
|
|
||||||
using org::kde::StatusNotifierWatcher;
|
using org::kde::StatusNotifierWatcher;
|
||||||
|
using namespace Dock;
|
||||||
TrayPlugin::TrayPlugin(QObject *parent)
|
TrayPlugin::TrayPlugin(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_pluginLoaded(false)
|
, m_pluginLoaded(false)
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
||||||
class FashionTrayItem;
|
class FashionTrayItem;
|
||||||
|
namespace Dock {
|
||||||
class TipsWidget;
|
class TipsWidget;
|
||||||
|
}
|
||||||
class TrayPlugin : public QObject, PluginsItemInterface
|
class TrayPlugin : public QObject, PluginsItemInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -98,7 +100,7 @@ private:
|
|||||||
QMap<QString, SNITrayWidget *> m_passiveSNITrayMap;
|
QMap<QString, SNITrayWidget *> m_passiveSNITrayMap;
|
||||||
QMap<QString, IndicatorTray*> m_indicatorMap;
|
QMap<QString, IndicatorTray*> m_indicatorMap;
|
||||||
|
|
||||||
TipsWidget *m_tipsLabel;
|
Dock::TipsWidget *m_tipsLabel;
|
||||||
bool m_pluginLoaded;
|
bool m_pluginLoaded;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QAccessible>
|
#include <QAccessible>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
namespace Dock{
|
||||||
TipsWidget::TipsWidget(QWidget *parent)
|
TipsWidget::TipsWidget(QWidget *parent)
|
||||||
: QFrame(parent)
|
: QFrame(parent)
|
||||||
, m_width(0)
|
, m_width(0)
|
||||||
@ -103,3 +103,4 @@ bool TipsWidget::event(QEvent *event)
|
|||||||
}
|
}
|
||||||
return QFrame::event(event);
|
return QFrame::event(event);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define TIPSWIDGET_H
|
#define TIPSWIDGET_H
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
namespace Dock {
|
||||||
class TipsWidget : public QFrame
|
class TipsWidget : public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -29,5 +29,6 @@ private:
|
|||||||
int m_width;
|
int m_width;
|
||||||
ShowType m_type;
|
ShowType m_type;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#endif // TIPSWIDGET_H
|
#endif // TIPSWIDGET_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user