* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#ifndef _ERRORS_DIALOG_H_
-#define _ERRORS_DIALOG_H_
+#ifndef QVLC_ERRORS_DIALOG_H_
+#define QVLC_ERRORS_DIALOG_H_ 1
#include "util/qvlcframe.hpp"
+#include "util/singleton.hpp"
class QPushButton;
class QCheckBox;
class QGridLayout;
class QTextEdit;
-class ErrorsDialog : public QVLCDialog
+class ErrorsDialog : public QVLCDialog, public Singleton<ErrorsDialog>
{
Q_OBJECT;
public:
- static ErrorsDialog * getInstance( intf_thread_t *p_intf )
- {
- if( !instance)
- instance = new ErrorsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
- return instance;
- }
- virtual ~ErrorsDialog() {};
- void addError( QString, QString );
- void addWarning( QString, QString );
+ void addError( const QString&, const QString& );
+ /*void addWarning( QString, QString );*/
private:
- ErrorsDialog( QWidget *parent, intf_thread_t * );
- static ErrorsDialog *instance;
- void add( bool, QString, QString );
+ virtual ~ErrorsDialog() {};
+ ErrorsDialog( intf_thread_t * );
+ void add( bool, const QString&, const QString& );
QCheckBox *stopShowing;
QTextEdit *messages;
void close();
void clear();
void dontShow();
+
+ friend class Singleton<ErrorsDialog>;
};
#endif