kwin/kcmkwin/kwinoptions/main.h
Nate Graham 5ba3793cf9 [kcmkwin/kwinoptions] Add option to disable window position memory for KDE apps
This adds a setting to the window options KCM to disable KDE apps
remembering their own window positions on X11, and instead always use
the KWin placement modes.

The setting sets an option in `kdeglobals`, rather than kwinrc, as it is not
a KWin-specific option *per se*. The UI is also hidden on Wayland, as it it
not relevant there because the functionality it disables does not work on
Wayland. Instead, remembering window positions will eventually be implemented
in a different way and affect all windows, not just KDE windows.

See https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/14 for
more details.

CCBUG: 415150
2020-08-28 16:43:51 +00:00

79 lines
1.4 KiB
C++

/*
main.h
SPDX-FileCopyrightText: 2001 Waldo Bastian <bastian@kde.org>
Requires the Qt widget libraries, available at no cost at
https://www.qt.io
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __MAIN_H__
#define __MAIN_H__
#include <QTabWidget>
#include <kcmodule.h>
class KWinOptionsSettings;
class KWinOptionsKDEGlobalsSettings;
class KFocusConfig;
class KTitleBarActionsConfig;
class KWindowActionsConfig;
class KAdvancedConfig;
class KMovingConfig;
class KWinOptions : public KCModule
{
Q_OBJECT
public:
KWinOptions(QWidget *parent, const QVariantList &args);
void load() override;
void save() override;
void defaults() override;
QString quickHelp() const override;
private:
QTabWidget *tab;
KFocusConfig *mFocus;
KTitleBarActionsConfig *mTitleBarActions;
KWindowActionsConfig *mWindowActions;
KMovingConfig *mMoving;
KAdvancedConfig *mAdvanced;
KWinOptionsSettings *mSettings;
};
class KActionsOptions : public KCModule
{
Q_OBJECT
public:
KActionsOptions(QWidget *parent, const QVariantList &args);
void load() override;
void save() override;
void defaults() override;
protected Q_SLOTS:
void moduleChanged(bool state);
private:
QTabWidget *tab;
KTitleBarActionsConfig *mTitleBarActions;
KWindowActionsConfig *mWindowActions;
KWinOptionsSettings *mSettings;
};
#endif