1
#ifndef oxygenexceptionlistwidget_h
2
#define oxygenexceptionlistwidget_h
3
//////////////////////////////////////////////////////////////////////////////
4
// oxygenexceptionlistwidget.h
7
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to
11
// deal in the Software without restriction, including without limitation the
12
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
13
// sell copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26
//////////////////////////////////////////////////////////////////////////////
28
#include "ui_oxygenexceptionlistwidget.h"
29
#include "oxygenexceptionmodel.h"
30
#include "../oxygenexceptionlist.h"
32
//! QDialog used to commit selected files
36
class ExceptionListWidget: public QWidget
45
explicit ExceptionListWidget( QWidget* = 0, Configuration defaultConfiguration = Configuration() );
48
void setExceptions( const ExceptionList& );
51
ExceptionList exceptions( void ) const;
55
//! emitted when list is changed
61
const ExceptionModel& model() const
65
ExceptionModel& model()
70
//! update button states
71
virtual void updateButtons( void );
74
virtual void add( void );
77
virtual void edit( void );
80
virtual void remove( void );
83
virtual void toggle( const QModelIndex& );
86
virtual void up( void );
89
virtual void down( void );
94
void resizeColumns( void ) const;
97
bool checkException( Exception& );
99
//! default configuration
100
Configuration _defaultConfiguration;
103
ExceptionModel _model;
106
Ui_OxygenExceptionListWidget ui;