2009-08-22 08:24:06 +00:00
|
|
|
#ifndef nitrogenexceptiondialog_h
|
|
|
|
#define nitrogenexceptiondialog_h
|
2009-08-24 16:15:14 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// nitrogenexceptiondialog.h
|
|
|
|
// -------------------
|
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>
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QCheckBox>
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include "../nitrogenexception.h"
|
|
|
|
|
|
|
|
namespace Nitrogen
|
|
|
|
{
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-09-13 16:43:26 +00:00
|
|
|
class DetectDialog;
|
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! nitrogen exceptions list
|
|
|
|
class NitrogenExceptionDialog: public KDialog
|
|
|
|
{
|
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
|
|
|
|
NitrogenExceptionDialog( QWidget* parent );
|
|
|
|
|
|
|
|
//! set exception
|
|
|
|
void setException( NitrogenException );
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! get exception
|
|
|
|
NitrogenException 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-04 19:10:47 +00:00
|
|
|
QComboBox* exceptionType;
|
2009-08-22 08:24:06 +00:00
|
|
|
|
|
|
|
//! border size
|
2009-09-04 19:10:47 +00:00
|
|
|
QComboBox* frameBorder;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! blend combobox
|
2009-09-04 19:10:47 +00:00
|
|
|
QComboBox* blendColor;
|
2009-09-02 02:19:26 +00:00
|
|
|
|
|
|
|
//! size grip
|
2009-09-04 19:10:47 +00:00
|
|
|
QComboBox* sizeGripMode;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! map mask and checkbox
|
|
|
|
typedef std::map< NitrogenException::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
|
|
|
|
NitrogenException exception_;
|
2009-09-09 00:55:55 +00:00
|
|
|
|
2009-08-22 08:24:06 +00:00
|
|
|
//! local combobox to handle configuration checkboxes
|
|
|
|
class ComboBox: public QComboBox
|
|
|
|
{
|
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
|