diff --git a/CMakeLists.txt b/CMakeLists.txt index d39a53f0a..c4caf1515 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,44 +51,40 @@ file(GLOB INTERFACES "interfaces/*.h") #单元测试的CMakeLists和主程序的CMakeLists路径不同,编译单元测试时会提示找不到文件 #因此设置搜索路径 include_directories( + frame/accessible frame/controller frame/dbus frame/dbus/sni frame/item frame/item/components frame/item/resources - frame/panel - frame/qss frame/util frame/window frame/xcb - frame/mockinterface + ../widgets + ../interfaces ) - +aux_source_directory(frame/accessible ACCESSIBLE) aux_source_directory(frame/controller CONTROLLER) aux_source_directory(frame/dbus DBUS) aux_source_directory(frame/dbus/sni SNI) aux_source_directory(frame/item ITEM) aux_source_directory(frame/item/components COMPONENTS) aux_source_directory(frame/item/resources RESOURCES) -aux_source_directory(frame/panel PANEL) -aux_source_directory(frame/qss QSSPATH) aux_source_directory(frame/util UTIL) aux_source_directory(frame/window WINDOW) aux_source_directory(frame/xcb XCB) -aux_source_directory(frame/mockinterface MOCKINTERFACE) file(GLOB SRC_PATH + ${ACCESSIBLE} ${CONTROLLER} ${DBUS} ${SNI} ${ITEM} ${COMPONENTS} - ${PANEL} ${UTIL} ${WINDOW} ${XCB} - ${MOCKINTERFACE} ) add_subdirectory("frame") diff --git a/frame/CMakeLists.txt b/frame/CMakeLists.txt index 540c3108f..0206ee1c1 100644 --- a/frame/CMakeLists.txt +++ b/frame/CMakeLists.txt @@ -23,7 +23,7 @@ pkg_check_modules(QGSettings REQUIRED gsettings-qt) pkg_check_modules(DtkGUI REQUIRED dtkgui) # driver-manager -add_executable(${BIN_NAME} ${SRCS} ${INTERFACES} ${SRC_PATH} item/item.qrc frame.qrc) +add_executable(${BIN_NAME} ${SRCS} ${INTERFACES} ${SRC_PATH} item/item.qrc) target_include_directories(${BIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS} @@ -35,7 +35,24 @@ target_include_directories(${BIN_NAME} PUBLIC ${DtkGUI_INCLUDE_DIRS} ${Qt5Svg_INCLUDE_DIRS} ../interfaces + ../widgets + accessible + controller + dbus + item + item/components util + window + xcb + ../plugins/tray + ../plugins/show-desktop + ../plugins/network + ../plugins/datetime + ../plugins/onboard + ../plugins/trash + ../plugins/shutdown + ../plugins/multitasking + ../plugins/overlay-warning ) target_link_libraries(${BIN_NAME} PRIVATE diff --git a/frame/window/accessible.h b/frame/accessible/accessible.h similarity index 82% rename from frame/window/accessible.h rename to frame/accessible/accessible.h index 82eee9898..cf3647001 100644 --- a/frame/window/accessible.h +++ b/frame/accessible/accessible.h @@ -1,33 +1,33 @@ #include "accessibledefine.h" #include "mainwindow.h" -#include "../panel/mainpanelcontrol.h" -#include "../../widgets/tipswidget.h" -#include "../util/dockpopupwindow.h" -#include "util/statebutton.h" +#include "mainpanelcontrol.h" +#include "tipswidget.h" +#include "dockpopupwindow.h" +#include "statebutton.h" -#include "../item/launcheritem.h" -#include "../item/appitem.h" -#include "../item/components/previewcontainer.h" -#include "../item/pluginsitem.h" -#include "../item/traypluginitem.h" -#include "../item/placeholderitem.h" -#include "../item/components/appdragwidget.h" -#include "../item/components/appsnapshot.h" -#include "../item/components/floatingpreview.h" +#include "launcheritem.h" +#include "appitem.h" +#include "components/previewcontainer.h" +#include "pluginsitem.h" +#include "traypluginitem.h" +#include "placeholderitem.h" +#include "components/appdragwidget.h" +#include "components/appsnapshot.h" +#include "components/floatingpreview.h" -#include "../plugins/tray/snitraywidget.h" -#include "../plugins/tray/abstracttraywidget.h" -#include "../plugins/tray/indicatortraywidget.h" -#include "../plugins/tray/xembedtraywidget.h" -#include "../plugins/tray/system-trays/systemtrayitem.h" -#include "../plugins/tray/fashiontray/fashiontrayitem.h" -#include "../plugins/tray/fashiontray/fashiontraywidgetwrapper.h" -#include "../plugins/tray/fashiontray/fashiontraycontrolwidget.h" -#include "../plugins/tray/fashiontray/containers/attentioncontainer.h" -#include "../plugins/tray/fashiontray/containers/holdcontainer.h" -#include "../plugins/tray/fashiontray/containers/normalcontainer.h" -#include "../plugins/tray/fashiontray/containers/spliteranimated.h" +#include "snitraywidget.h" +#include "abstracttraywidget.h" +#include "indicatortraywidget.h" +#include "xembedtraywidget.h" +#include "system-trays/systemtrayitem.h" +#include "fashiontray/fashiontrayitem.h" +#include "fashiontray/fashiontraywidgetwrapper.h" +#include "fashiontray/fashiontraycontrolwidget.h" +#include "fashiontray/containers/attentioncontainer.h" +#include "fashiontray/containers/holdcontainer.h" +#include "fashiontray/containers/normalcontainer.h" +#include "fashiontray/containers/spliteranimated.h" // 这部分由sound插件单独维护,这样做是因为在标记volumeslider这个类时,需要用到其setValue的实现, // 但插件的源文件dock这边并没有包含,不想引入复杂的包含关系,其实最好的做法就是像sound插件这样,谁维护谁的 @@ -37,16 +37,16 @@ //#include "../plugins/sound/componments/volumeslider.h" //#include "../plugins/sound/componments/horizontalseparator.h" -#include "../plugins/show-desktop/showdesktopwidget.h" -#include "../plugins/network/networkitem.h" -#include "../plugins/network/item/applet/devicecontrolwidget.h" -#include "../plugins/datetime/datetimewidget.h" -#include "../plugins/onboard/onboarditem.h" -#include "../plugins/trash/trashwidget.h" -#include "../plugins/trash/popupcontrolwidget.h" -#include "../plugins/shutdown/shutdownwidget.h" -#include "../plugins/multitasking/multitaskingwidget.h" -#include "../plugins/overlay-warning/overlaywarningwidget.h" +#include "showdesktopwidget.h" +#include "networkitem.h" +#include "item/applet/devicecontrolwidget.h" +#include "datetimewidget.h" +#include "onboarditem.h" +#include "trashwidget.h" +#include "popupcontrolwidget.h" +#include "shutdownwidget.h" +#include "multitaskingwidget.h" +#include "overlaywarningwidget.h" #include #include diff --git a/frame/window/accessibledefine.h b/frame/accessible/accessibledefine.h similarity index 100% rename from frame/window/accessibledefine.h rename to frame/accessible/accessibledefine.h diff --git a/frame/frame.qrc b/frame/frame.qrc deleted file mode 100644 index 2824e972f..000000000 --- a/frame/frame.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - qss/frame.qss - - diff --git a/frame/item/dockitem.cpp b/frame/item/dockitem.cpp index 1868c8b5b..96533f40d 100644 --- a/frame/item/dockitem.cpp +++ b/frame/item/dockitem.cpp @@ -20,7 +20,7 @@ */ #include "dockitem.h" -#include "components/hoverhighlighteffect.h" +#include "hoverhighlighteffect.h" #include "pluginsitem.h" #include diff --git a/frame/main.cpp b/frame/main.cpp index 8b2703dd9..fa69ec46e 100644 --- a/frame/main.cpp +++ b/frame/main.cpp @@ -19,13 +19,13 @@ * along with this program. If not, see . */ -#include "window/mainwindow.h" -#include "window/accessible.h" -#include "dbus/dbusdockadaptors.h" -#include "util/utils.h" -#include "util/themeappicon.h" -#include "controller/dockitemmanager.h" -#include "util/dockapplication.h" +#include "mainwindow.h" +#include "accessible.h" +#include "dbusdockadaptors.h" +#include "utils.h" +#include "themeappicon.h" +#include "dockitemmanager.h" +#include "dockapplication.h" #include #include diff --git a/frame/qss/frame.qss b/frame/qss/frame.qss deleted file mode 100644 index 2487f0db9..000000000 --- a/frame/qss/frame.qss +++ /dev/null @@ -1,19 +0,0 @@ -#MainPanel[position='0'] { - padding: 0 0px; - border-top: none; -} - -#MainPanel[position='1'] { - padding: 0px 0; - border-right: none; -} - -#MainPanel[position='2'] { - padding:0 0px; - border-bottom: none; -} - -#MainPanel[position='3'] { - padding: 0px 0; - border-left: none; -} diff --git a/frame/util/themeappicon.cpp b/frame/util/themeappicon.cpp index e92b7ce4e..99a17c8c5 100644 --- a/frame/util/themeappicon.cpp +++ b/frame/util/themeappicon.cpp @@ -31,7 +31,7 @@ #include #include -#include "../frame/util/imageutil.h" +#include "imageutil.h" ThemeAppIcon::ThemeAppIcon(QObject *parent) : QObject(parent) { diff --git a/frame/panel/mainpanelcontrol.cpp b/frame/window/mainpanelcontrol.cpp similarity index 100% rename from frame/panel/mainpanelcontrol.cpp rename to frame/window/mainpanelcontrol.cpp diff --git a/frame/panel/mainpanelcontrol.h b/frame/window/mainpanelcontrol.h similarity index 100% rename from frame/panel/mainpanelcontrol.h rename to frame/window/mainpanelcontrol.h diff --git a/plugins/sound/CMakeLists.txt b/plugins/sound/CMakeLists.txt index 83e817054..7f98cda8b 100644 --- a/plugins/sound/CMakeLists.txt +++ b/plugins/sound/CMakeLists.txt @@ -19,17 +19,20 @@ add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN") add_library(${PLUGIN_NAME} SHARED ${SRCS} resources/sound.qrc) set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../system-trays) target_include_directories(${PLUGIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS} - ${DFrameworkDBus_INCLUDE_DIRS} - ${QGSettings_INCLUDE_DIRS} - ../../interfaces - ../../frame) + ${DFrameworkDBus_INCLUDE_DIRS} + ${QGSettings_INCLUDE_DIRS} + ../../interfaces + ../../frame + ../../frame/accessible + ) + target_link_libraries(${PLUGIN_NAME} PRIVATE - ${DtkWidget_LIBRARIES} - ${DFrameworkDBus_LIBRARIES} - ${QGSettings_LIBRARIES} - ${Qt5DBus_LIBRARIES} - ${Qt5Widgets_LIBRARIES} - ${Qt5Svg_LIBRARIES} -) + ${DtkWidget_LIBRARIES} + ${DFrameworkDBus_LIBRARIES} + ${QGSettings_LIBRARIES} + ${Qt5DBus_LIBRARIES} + ${Qt5Widgets_LIBRARIES} + ${Qt5Svg_LIBRARIES} + ) install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays) diff --git a/plugins/sound/soundaccessible.h b/plugins/sound/soundaccessible.h index 23b7dd63c..d83f42ad9 100644 --- a/plugins/sound/soundaccessible.h +++ b/plugins/sound/soundaccessible.h @@ -1,6 +1,6 @@ #ifndef SOUNDACCESSIBLE_H #define SOUNDACCESSIBLE_H -#include "../frame/window/accessibledefine.h" +#include "accessibledefine.h" #include "sounditem.h" #include "soundapplet.h" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5026d2a49..75928c0ea 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -31,7 +31,7 @@ pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus) pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11) # 添加执行文件信息 -add_executable(${BIN_NAME} ${SRCS} ${INTERFACES} ${SRC_PATH} ../frame/item/item.qrc ../frame/frame.qrc ut_res.qrc) +add_executable(${BIN_NAME} ${SRCS} ${INTERFACES} ${SRC_PATH} ../frame/item/item.qrc ut_res.qrc) # 包含路径 target_include_directories(${BIN_NAME} PUBLIC