Welcome back KWin screen edges KCM
Screenedges KCM is adjusted to build against Qt5. Most notable changes: * no longer links kworkspace as ScreenPreviewWidget got moved into the KCM * ui file is adjusted to not crash (see git log of kcmdesktop)
This commit is contained in:
parent
a4a436807f
commit
62a0a08a0e
8 changed files with 27 additions and 13 deletions
|
@ -4,9 +4,9 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FR
|
|||
# add_subdirectory( kwindecoration )
|
||||
# add_subdirectory( kwinrules )
|
||||
# add_subdirectory( kwincompositing )
|
||||
# if(KWIN_BUILD_SCREENEDGES)
|
||||
# add_subdirectory( kwinscreenedges )
|
||||
# endif()
|
||||
if(KWIN_BUILD_SCREENEDGES)
|
||||
add_subdirectory( kwinscreenedges )
|
||||
endif()
|
||||
# if(KWIN_BUILD_SCRIPTING)
|
||||
# add_subdirectory( kwinscripts )
|
||||
# endif()
|
||||
|
|
|
@ -8,7 +8,16 @@ set(
|
|||
)
|
||||
kde4_add_ui_files( kcm_kwinscreenedges_PART_SRCS main.ui )
|
||||
kde4_add_plugin( kcm_kwinscreenedges ${kcm_kwinscreenedges_PART_SRCS} )
|
||||
target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES} kworkspace ${KDE4_PLASMA_LIBS})
|
||||
target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES}
|
||||
Qt5::DBus
|
||||
KF5::KCompletion
|
||||
KF5::KConfigCore
|
||||
KF5::KConfigWidgets
|
||||
KF5::KI18n
|
||||
KF5::KService
|
||||
KF5::plasma
|
||||
${KDE4Support_LIBRARIES}
|
||||
)
|
||||
install( TARGETS kcm_kwinscreenedges DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||
|
||||
install( FILES kwinscreenedges.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Desktop Entry]
|
||||
Exec=kcmshell4 kwinscreenedges
|
||||
Exec=kcmshell5 kwinscreenedges
|
||||
Icon=preferences-desktop
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=KCModule
|
||||
|
|
|
@ -25,6 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <kservicetypetrader.h>
|
||||
|
||||
#include <KDE/KAboutData>
|
||||
#include <KDE/KConfigGroup>
|
||||
#include <KPluginFactory>
|
||||
#include <KPluginLoader>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
@ -41,7 +43,7 @@ KWinScreenEdgesConfigForm::KWinScreenEdgesConfigForm(QWidget* parent)
|
|||
}
|
||||
|
||||
KWinScreenEdgesConfig::KWinScreenEdgesConfig(QWidget* parent, const QVariantList& args)
|
||||
: KCModule(KWinScreenEdgesConfigFactory::componentData(), parent, args)
|
||||
: KCModule(parent, args)
|
||||
, m_config(KSharedConfig::openConfig("kwinrc"))
|
||||
{
|
||||
m_ui = new KWinScreenEdgesConfigForm(this);
|
||||
|
|
|
@ -49,14 +49,14 @@ public:
|
|||
explicit KWinScreenEdgesConfig(QWidget* parent, const QVariantList& args);
|
||||
~KWinScreenEdgesConfig();
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
virtual void groupChanged();
|
||||
virtual void save();
|
||||
virtual void load();
|
||||
virtual void defaults();
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent* e);
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void sanitizeCooldown();
|
||||
private:
|
||||
KWinScreenEdgesConfigForm* m_ui;
|
||||
|
|
|
@ -153,6 +153,9 @@
|
|||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="desktopSwitchLabel">
|
||||
<property name="toolTip">
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "monitor.h"
|
||||
|
||||
#include <kdebug.h>
|
||||
#include <klocale.h>
|
||||
#include <KDE/KLocalizedString>
|
||||
#include <qgraphicsitem.h>
|
||||
#include <qgraphicsview.h>
|
||||
#include <qgraphicsscene.h>
|
||||
|
@ -156,7 +156,7 @@ void Monitor::selectEdgeItem(int edge, int index)
|
|||
setEdge(edge, !popup_actions[ edge ][ 0 ]->isChecked());
|
||||
QString actionText = popup_actions[ edge ][ index ]->text();
|
||||
// remove accelerators added by KAcceleratorManager
|
||||
actionText = KGlobal::locale()->removeAcceleratorMarker(actionText);
|
||||
actionText = KLocalizedString::removeAcceleratorMarker(actionText);
|
||||
items[ edge ]->setToolTip(actionText);
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ void Monitor::popup(Corner* c, QPoint pos)
|
|||
selectEdgeItem(i, popup_actions[ i ].indexOf(a));
|
||||
emit changed();
|
||||
emit edgeSelectionChanged(i, popup_actions[ i ].indexOf(a));
|
||||
c->setToolTip(KGlobal::locale()->removeAcceleratorMarker(a->text()));
|
||||
c->setToolTip(KLocalizedString::removeAcceleratorMarker(a->text()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#ifndef CCSM_MONITOR_H
|
||||
#define CCSM_MONITOR_H
|
||||
|
||||
#include <kworkspace/screenpreviewwidget.h>
|
||||
#include "screenpreviewwidget.h"
|
||||
|
||||
#include <qactiongroup.h>
|
||||
#include <qgraphicsitem.h>
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
BottomLeft,
|
||||
BottomRight
|
||||
};
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void changed();
|
||||
void edgeSelectionChanged(int edge, int index);
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue