summaryrefslogtreecommitdiff
path: root/src/messagebox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/messagebox.cc')
-rw-r--r--src/messagebox.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/messagebox.cc b/src/messagebox.cc
index fd812eb..f9e76da 100644
--- a/src/messagebox.cc
+++ b/src/messagebox.cc
@@ -24,9 +24,8 @@
* along with MIaV; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include <config.h>
-#ifdef USE_GUI
#include "messagebox.h"
+
#include "miav_config.h"
// For button sizes!
@@ -43,14 +42,14 @@ MessageBox::MessageBox(QWidget* parent,
const char* text,
msg_type type,
msg_icon icon)
- : QDialog(parent, name, TRUE)
+ : QDialog(parent) //, name, TRUE)
{
int resolution_w = config->readInt("pixel_width");
//int resolution_h = config->readInt("pixel_height");
unit = ((float)resolution_w / config->readFloat("screensize")) / INCH_IN_CM;
- setCaption(name);
+ setWindowTitle(name);
QFrame *topf = new QFrame(this);
topf->setFrameStyle(QFrame::Box | QFrame::Raised);
topf->setLineWidth(3);
@@ -116,7 +115,7 @@ MessageBox::MessageBox(QWidget* parent,
// lbl_text->setFont(QFont("Arial", 18));
QFrame *f = new QFrame(topf);
- QVBoxLayout *blayout = new QVBoxLayout(topf, 20, 20);
+ QVBoxLayout *blayout = new QVBoxLayout(topf);//, 20, 20);
blayout->addWidget(lbl_icon);
blayout->addWidget(lbl_text);
@@ -127,7 +126,7 @@ MessageBox::MessageBox(QWidget* parent,
case TYPE_OK:
{
QPushButton *bok = createButton(f, TXT_OK );
- QGridLayout *glayout = new QGridLayout(f, 1, 1, 20, 20);
+ QGridLayout *glayout = new QGridLayout(f);//, 1, 1, 20, 20);
glayout->addWidget(bok, 0, 0);
connect(bok, SIGNAL( clicked() ), SLOT(bok_clicked()));
break;
@@ -136,7 +135,7 @@ MessageBox::MessageBox(QWidget* parent,
{
QPushButton *bok = createButton(f, TXT_OK );
QPushButton *bcancel = createButton(f, TXT_CANCEL );
- QGridLayout *glayout = new QGridLayout(f, 1, 2, 20, 20);
+ QGridLayout *glayout = new QGridLayout(f);//, 1, 2, 20, 20);
glayout->addWidget(bcancel, 0, 1);
glayout->addWidget(bok, 0, 2);
connect(bcancel, SIGNAL( clicked() ), SLOT(bcancel_clicked()));
@@ -147,7 +146,7 @@ MessageBox::MessageBox(QWidget* parent,
{
QPushButton *bno = createButton(f, TXT_NO );
QPushButton *byes = createButton(f, TXT_YES );
- QGridLayout *glayout = new QGridLayout(f, 1, 2, 20, 20);
+ QGridLayout *glayout = new QGridLayout(f);//, 1, 2, 20, 20);
glayout->addWidget(bno, 0, 0);
glayout->addWidget(byes, 0, 1);
connect(byes, SIGNAL( clicked() ), SLOT(byes_clicked()));
@@ -159,7 +158,7 @@ MessageBox::MessageBox(QWidget* parent,
QPushButton *bmaybe = createButton(f, TXT_MAYBE );
QPushButton *bno = createButton(f, TXT_NO );
QPushButton *byes = createButton(f, TXT_YES );
- QGridLayout *glayout = new QGridLayout(f, 1, 3, 20, 20);
+ QGridLayout *glayout = new QGridLayout(f);//, 1, 3, 20, 20);
glayout->addWidget(bno, 0, 0);
glayout->addWidget(byes, 0, 1);
glayout->addWidget(bmaybe, 0, 2);
@@ -173,7 +172,7 @@ MessageBox::MessageBox(QWidget* parent,
QPushButton *bcancel = createButton(f, TXT_CANCEL );
QPushButton *bno = createButton(f, TXT_NO );
QPushButton *byes = createButton(f, TXT_YES );
- QGridLayout *glayout = new QGridLayout(f, 1, 3, 20, 20);
+ QGridLayout *glayout = new QGridLayout(f);//, 1, 3, 20, 20);
glayout->addWidget(bno, 0, 0);
glayout->addWidget(bcancel, 0, 1);
glayout->addWidget(byes, 0, 2);
@@ -188,7 +187,7 @@ MessageBox::MessageBox(QWidget* parent,
QPushButton *bcancel = createButton(f, TXT_CANCEL );
QPushButton *bno = createButton(f, TXT_NO );
QPushButton *byes = createButton(f, TXT_YES );
- QGridLayout *glayout = new QGridLayout(f, 1, 4, 20, 20);
+ QGridLayout *glayout = new QGridLayout(f);//, 1, 4, 20, 20);
glayout->addWidget(bno, 0, 0);
glayout->addWidget(bcancel, 0, 1);
glayout->addWidget(byes, 0, 2);
@@ -242,4 +241,3 @@ void MessageBox::bmaybe_clicked()
done(MSG_MAYBE);
}
-#endif/*USE_GUI*/