kwin/clients/oxygen/config/oxygenconfig.h

111 lines
3.1 KiB
C
Raw Normal View History

#ifndef oxygen_config_h
#define oxygen_config_h
//////////////////////////////////////////////////////////////////////////////
// config.h
// -------------------
//
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
// Copyright (C) 2008 Lubos Lunak <l.lunak@kde.org>
//
// Based on the Quartz configuration module,
// Copyright (c) 2001 Karol Szwed <gallium@kde.org>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//////////////////////////////////////////////////////////////////////////////
#include "oxygenconfigwidget.h"
#include "oxygenconfiguration.h"
#include "../oxygendecorationdefines.h"
#include <KSharedConfig>
#include <QPalette>
namespace Oxygen {
2011-07-17 14:27:26 +00:00
class Configuration;
2011-07-17 14:27:26 +00:00
// oxygen configuration object
class Config: public QObject
{
2011-07-17 14:27:26 +00:00
Q_OBJECT
2012-08-27 21:00:32 +00:00
public:
2012-08-27 21:00:32 +00:00
//! constructor
Config( KConfig* conf, QWidget* parent );
2011-07-17 14:27:26 +00:00
//! destructor
~Config();
2013-07-30 04:47:50 +00:00
Q_SIGNALS:
2011-07-17 14:27:26 +00:00
//! emmited whenever configuration is changed
void changed();
2011-07-17 14:27:26 +00:00
//! emmited whenever configuration is changed
void changed( bool );
2013-07-30 04:47:50 +00:00
public Q_SLOTS:
2011-07-17 14:27:26 +00:00
//! load configuration
/*! although kconfiggroup argument is not used. It is required by KWin API */
void load( const KConfigGroup& )
{ load(); }
2011-07-17 14:27:26 +00:00
//! save configuration
/*! although kconfiggroup argument is not used. It is required by KWin API */
void save( KConfigGroup& )
{ save(); }
//! load configuration
void load( void );
//! save configuration
void save( void );
2011-07-17 14:27:26 +00:00
//! restore defaults
void defaults( void );
2011-07-17 14:27:26 +00:00
//! toggle expert mode
void toggleExpertMode( bool );
2013-07-30 04:47:50 +00:00
private Q_SLOTS:
2011-07-17 14:27:26 +00:00
//! update change state
void updateChanged( void );
2011-07-17 14:27:26 +00:00
private:
2011-07-17 14:27:26 +00:00
//! load configuration
void loadConfiguration( ConfigurationPtr );
2011-07-17 14:27:26 +00:00
//! user interface
ConfigWidget* _configWidget;
2011-07-17 14:27:26 +00:00
//! kconfiguration object
KSharedConfig::Ptr _configuration;
2011-07-17 14:27:26 +00:00
};
} //namespace Oxygen
#endif