2009-09-15 07:12:54 +00:00
|
|
|
#ifndef oxygenexceptiondialog_h
|
|
|
|
#define oxygenexceptiondialog_h
|
2009-08-24 16:15:14 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2009-09-15 07:12:54 +00:00
|
|
|
// oxygenexceptiondialog.h
|
2009-08-24 16:15:14 +00:00
|
|
|
// -------------------
|
2009-09-09 00:55:55 +00:00
|
|
|
//
|
2009-08-24 16:15:14 +00:00
|
|
|
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
|
|
|
|
//
|
|
|
|
// 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
|
2009-09-09 00:55:55 +00:00
|
|
|
// IN THE SOFTWARE.
|
2009-08-24 16:15:14 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2009-08-22 08:24:06 +00:00
|
|
|
|
|
|
|
#include <KDialog>
|
|
|
|
#include <KLineEdit>
|
2009-09-16 06:09:31 +00:00
|
|
|
#include <KComboBox>
|
2009-08-22 08:24:06 +00:00
|
|
|
#include <QCheckBox>
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
2009-09-15 07:12:54 +00:00
|
|
|
#include "../oxygenexception.h"
|
2009-08-22 08:24:06 +00:00
|
|
|
|
2009-09-15 07:12:54 +00:00
|
|
|
namespace Oxygen
|
2009-08-22 08:24:06 +00:00
|
|
|
{
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-09-13 16:43:26 +00:00
|
|
|
class DetectDialog;
|
|
|
|
|
2009-09-15 07:12:54 +00:00
|
|
|
//! oxygen exceptions list
|
|
|
|
class OxygenExceptionDialog: public KDialog
|
2009-08-22 08:24:06 +00:00
|
|
|
{
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-09-13 16:43:26 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
public:
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! constructor
|
2009-09-15 07:12:54 +00:00
|
|
|
OxygenExceptionDialog( QWidget* parent );
|
2009-08-22 08:24:06 +00:00
|
|
|
|
|
|
|
//! set exception
|
2009-09-15 07:12:54 +00:00
|
|
|
void setException( OxygenException );
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! get exception
|
2009-09-15 07:12:54 +00:00
|
|
|
OxygenException exception( void ) const;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-09-13 16:43:26 +00:00
|
|
|
private slots:
|
|
|
|
|
|
|
|
void selectWindowProperties( void );
|
|
|
|
|
|
|
|
void readWindowProperties( bool );
|
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
private:
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! line editor
|
2009-09-04 19:10:47 +00:00
|
|
|
KLineEdit* exceptionEditor;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! blend combobox
|
2009-09-16 06:09:31 +00:00
|
|
|
KComboBox* exceptionType;
|
2009-08-22 08:24:06 +00:00
|
|
|
|
|
|
|
//! border size
|
2009-09-16 06:09:31 +00:00
|
|
|
KComboBox* frameBorder;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! blend combobox
|
2009-09-16 06:09:31 +00:00
|
|
|
KComboBox* blendColor;
|
2009-09-02 02:19:26 +00:00
|
|
|
|
|
|
|
//! size grip
|
2009-09-16 06:09:31 +00:00
|
|
|
KComboBox* sizeGripMode;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! map mask and checkbox
|
2009-09-15 07:12:54 +00:00
|
|
|
typedef std::map< OxygenException::AttributesMask, QCheckBox*> CheckBoxMap;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! map mask and checkbox
|
|
|
|
CheckBoxMap checkboxes_;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! internal exception
|
2009-09-15 07:12:54 +00:00
|
|
|
OxygenException exception_;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! local combobox to handle configuration checkboxes
|
2009-09-16 06:09:31 +00:00
|
|
|
class ComboBox: public KComboBox
|
2009-08-22 08:24:06 +00:00
|
|
|
{
|
2009-09-09 00:55:55 +00:00
|
|
|
public:
|
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
static const QString Yes;
|
|
|
|
static const QString No;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! constructor
|
|
|
|
ComboBox( QWidget* parent );
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! set value
|
2009-08-30 17:26:47 +00:00
|
|
|
void setValue( bool checked );
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! true if yes is checkd
|
|
|
|
bool isChecked( void ) const;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
};
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-09-04 19:10:47 +00:00
|
|
|
//! overwrite colors
|
|
|
|
ComboBox* titleOutline;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! draw separator
|
2009-09-04 19:10:47 +00:00
|
|
|
ComboBox* drawSeparator;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-09-13 16:43:26 +00:00
|
|
|
//! detection dialog
|
|
|
|
DetectDialog* detectDialog;
|
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
};
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-24 06:27:49 +00:00
|
|
|
}
|
2009-08-22 08:24:06 +00:00
|
|
|
|
|
|
|
#endif
|