File indexing completed on 2025-04-20 13:22:39
0001 #ifndef WINDOW_SELECTION_INTERFACE_H 0002 #define WINDOW_SELECTION_INTERFACE_H 0003 /* SPDX-FileCopyrightText: 1999-2001 Lubos Lunak <l.lunak@kde.org> 0004 SPDX-FileCopyrightText: 2008 Michael Jansen <kde@michael-jansen.biz> 0005 0006 SPDX-License-Identifier: GPL-2.0-only 0007 */ 0008 0009 #include <QString> 0010 0011 #include "KConfigGroup" 0012 0013 #include <QWindowList> 0014 0015 #include <netwm_def.h> 0016 0017 namespace KHotKeys 0018 { 0019 struct Q_DECL_EXPORT Window_data { 0020 Window_data(WId id_P); 0021 QString title; // _NET_WM_NAME or WM_NAME 0022 QString role; // WM_WINDOW_ROLE 0023 QString wclass; // WM_CLASS 0024 NET::WindowType type; 0025 }; 0026 0027 class Q_DECL_EXPORT Windowdef 0028 { 0029 Q_DISABLE_COPY(Windowdef) 0030 0031 public: 0032 Windowdef(const QString &comment_P); 0033 Windowdef(KConfigGroup &cfg_P); 0034 virtual ~Windowdef(); 0035 const QString &comment() const; 0036 void set_comment(const QString &comment); 0037 virtual bool match(const Window_data &window_P) = 0; 0038 static Windowdef *create_cfg_read(KConfigGroup &cfg_P /*, ActionDataBase* data_P*/); 0039 virtual void cfg_write(KConfigGroup &cfg_P) const = 0; 0040 virtual Windowdef *copy(/*ActionDataBase* data_P*/) const = 0; 0041 virtual const QString description() const = 0; 0042 0043 private: 0044 QString _comment; 0045 }; 0046 0047 } // namespace KHotKeys 0048 0049 #endif /* #ifndef WINDOW_SELECTION_INTERFACE_H */