errors.hpp 1.9 KB
Newer Older
Clément Stenac's avatar
Clément Stenac committed
1 2 3 4
/*****************************************************************************
 * errors.hpp : Errors
 ****************************************************************************
 * Copyright (C) 2006 the VideoLAN team
5
 * $Id$
Clément Stenac's avatar
Clément Stenac committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 *
 * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
21 22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/
Clément Stenac's avatar
Clément Stenac committed
23

24 25
#ifndef QVLC_ERRORS_DIALOG_H_
#define QVLC_ERRORS_DIALOG_H_ 1
Clément Stenac's avatar
Clément Stenac committed
26 27 28 29 30 31 32 33

#include "util/qvlcframe.hpp"

class QPushButton;
class QCheckBox;
class QGridLayout;
class QTextEdit;

34
class ErrorsDialog : public QVLCDialog
Clément Stenac's avatar
Clément Stenac committed
35 36 37 38 39 40
{
    Q_OBJECT;
public:
    static ErrorsDialog * getInstance( intf_thread_t *p_intf )
    {
        if( !instance)
41
            instance = new ErrorsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
Clément Stenac's avatar
Clément Stenac committed
42 43 44 45
        return instance;
    }
    virtual ~ErrorsDialog() {};

46
    void addError( const QString&, const QString& );
47
    /*void addWarning( QString, QString );*/
Clément Stenac's avatar
Clément Stenac committed
48
private:
49
    ErrorsDialog( QWidget *parent, intf_thread_t * );
Clément Stenac's avatar
Clément Stenac committed
50
    static ErrorsDialog *instance;
51
    void add( bool, const QString&, const QString& );
Clément Stenac's avatar
Clément Stenac committed
52 53 54

    QCheckBox *stopShowing;
    QTextEdit *messages;
55
private slots:
Clément Stenac's avatar
Clément Stenac committed
56 57
    void close();
    void clear();
Clément Stenac's avatar
Clément Stenac committed
58 59 60 61
    void dontShow();
};

#endif