00001 #ifndef DIALOGBOX_H_
00002 #define DIALOGBOX_H_
00003
00004 #include <QObject>
00005 #include <QCheckBox>
00006
00007 #include "mythdialogs.h"
00008 #include "compat.h"
00009 class QVBoxLayout;
00010 class QButtonGroup;
00011
00012 class MPUBLIC DialogBox : public MythDialog
00013 {
00014 Q_OBJECT
00015 public:
00016 DialogBox(MythMainWindow *parent, const QString &text,
00017 const char *checkboxtext = NULL, const char *name = NULL);
00018
00019 void AddButton(const QString &title);
00020
00021 bool getCheckBoxState(void) { if (checkbox) return checkbox->isChecked();
00022 return false; }
00023
00024 protected slots:
00025 void buttonPressed(int which);
00026
00027 protected:
00028 ~DialogBox() {}
00029
00030 private:
00031 QVBoxLayout *box;
00032 QButtonGroup *buttongroup;
00033
00034 QCheckBox *checkbox;
00035 };
00036
00037 #endif