1
/* Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
2
Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz>
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
Version 2 as published by the Free Software Foundation;
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
#include "window_selection_rules.h"
25
Windowdef::Windowdef( const QString& comment_P )
26
: _comment( comment_P )
31
Windowdef::Windowdef( KConfigGroup& cfg_P )
33
_comment = cfg_P.readEntry( "Comment" );
37
Windowdef::~Windowdef()
42
void Windowdef::cfg_write( KConfigGroup& cfg_P ) const
44
cfg_P.writeEntry( "Type", "ERROR" );
45
cfg_P.writeEntry( "Comment", comment());
49
const QString& Windowdef::comment() const
55
Windowdef* Windowdef::create_cfg_read( KConfigGroup& cfg_P )
57
QString type = cfg_P.readEntry( "Type" );
58
if( type == "SIMPLE" )
59
return new Windowdef_simple( cfg_P );
60
kWarning() << "Unknown Windowdef type read from cfg file\n";
65
void Windowdef::set_comment(const QString &comment)
72
} // namespace KHotKeys