1 /*****************************************************************************
2 * external.hpp : Dialogs from other LibVLC core and other plugins
3 ****************************************************************************
4 * Copyright (C) 2009 RĂ©mi Denis-Courmont
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
21 #ifndef VLC_QT4_DIALOGS_EXTERNAL_H_
22 # define VLC_QT4_DIALOGS_EXTERNAL_H 1
25 #include <vlc_common.h>
27 class QVLCVariable : public QObject
31 static int callback (vlc_object_t *, const char *,
32 vlc_value_t, vlc_value_t, void *);
37 QVLCVariable (vlc_object_t *, const char *, int);
38 virtual ~QVLCVariable (void);
41 void pointerChanged (vlc_object_t *, void *);
45 class QProgressDialog;
47 class DialogHandler : public QObject
51 friend class QVLCProgressDialog;
54 DialogHandler (intf_thread_t *);
55 ~DialogHandler (void);
61 QVLCVariable question;
62 QVLCVariable progressBar;
64 void progressBarDestroyed (QWidget *);
67 void displayMessage (vlc_object_t *, void *);
68 void requestLogin (vlc_object_t *, void *);
69 void requestAnswer (vlc_object_t *, void *);
70 void startProgressBar (vlc_object_t *, void *);
71 void stopProgressBar (QWidget *);
74 /* Put here instead of .cpp because of MOC */
75 #include <QProgressDialog>
77 class QVLCProgressDialog : public QProgressDialog
81 QVLCProgressDialog (DialogHandler *parent,
82 struct dialog_progress_bar_t *);
83 virtual ~QVLCProgressDialog (void);
86 DialogHandler *handler;
89 static void update (void *, float);
90 static bool check (void *);
91 static void destroy (void *);
93 void saveCancel (void);
96 void progressed (int);
97 void destroyed (void);