kwin/clients/oxygen/config/oxygenconfig.h

112 lines
3.2 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 <KConfig>
#include <QtGui/QPalette>
#include "oxygenconfigurationui.h"
namespace Oxygen {
2011-07-17 14:27:26 +00:00
class Configuration;
class ShadowConfiguration;
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();
2011-07-17 14:27:26 +00:00
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 );
2011-07-17 14:27:26 +00:00
public slots:
2011-07-17 14:27:26 +00:00
//! load configuration
void load( const KConfigGroup& );
2011-07-17 14:27:26 +00:00
//! save configuration
void save( KConfigGroup& );
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 );
2011-07-17 14:27:26 +00:00
private 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( const Configuration& );
2011-07-17 14:27:26 +00:00
//! load configuration
void loadShadowConfiguration( QPalette::ColorGroup, const ShadowConfiguration& );
2011-07-17 14:27:26 +00:00
//! load configuration
void saveShadowConfiguration( QPalette::ColorGroup, const ShadowConfigurationUi& ) const;
2011-07-17 14:27:26 +00:00
//! returns true if shadow configuration changed
bool shadowConfigurationChanged( const ShadowConfiguration&, const ShadowConfigurationUi& ) const;
2011-07-17 14:27:26 +00:00
//! returns true if exception list is changed
bool exceptionListChanged( void ) const;
2011-07-17 14:27:26 +00:00
//! user interface
ConfigurationUi *ui;
2011-07-17 14:27:26 +00:00
//! kconfiguration object
KConfig *_configuration;
2011-07-17 14:27:26 +00:00
};
} //namespace Oxygen
#endif