Subversion Repositories Scribus

Rev

Rev 415 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
411 Franz 1
#include "sxwdia.h"
2
 
3
#ifdef HAVE_XML
4
 
5
#include "sxwdia.moc"
6
#include <qtooltip.h>
7
 
8
extern QPixmap loadIcon(QString nam);
9
 
10
SxwDialog::SxwDialog(bool update) : QDialog(0, "sxwdia", true, 0)
11
{
12
        setCaption(tr("OO.o Writer Importer Options"));
13
        setIcon(loadIcon("AppIcon.png"));
14
 
15
        QBoxLayout* layout = new QVBoxLayout(this);
16
 
17
        QBoxLayout* hlayout = new QHBoxLayout(0, 5, 5, "hlayout");
18
        updateCheck = new QCheckBox(tr("Update paragraph styles"), this, "updateCheck");
19
        updateCheck->setChecked(update);
20
        QToolTip::add(updateCheck, tr("If there already exists a paragraph style with the same\n"
21
                                      "name than current OO.o document's paragraph should the style\n"
22
                                      "in Scribus be edited to match the one being imported\n"
23
                                      "or left untouched"));
24
        hlayout->addWidget(updateCheck);
25
        layout->addLayout(hlayout);
26
 
27
//      QBoxLayout* dlayout = new QHBoxLayout(0, 5, 5, "dlayout");
28
//      doNotAskCheck = new QCheckBox(tr("Do not ask again"), this, "doNotAskCheck");
29
//      doNotAskCheck->setChecked(false);
30
//      QToolTip::add(doNotAskCheck, tr("Should the importer always use currently\n"
31
//                                      "set value when importing OO.o document and\n"
32
//                                      "never ask your confirmation again"));
33
//      dlayout->addStretch(10);
34
//      dlayout->addWidget(doNotAskCheck);
35
//      layout->addLayout(dlayout);
36
 
37
        QBoxLayout* blayout = new QHBoxLayout(0, 5, 5, "blayout");
38
        blayout->addStretch(10);
39
        okButton = new QPushButton(tr("OK"), this, "okButton");
40
        blayout->addWidget(okButton);
41
        layout->addLayout(blayout);
42
 
43
        connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
44
}
45
 
46
bool SxwDialog::shouldUpdate()
47
{
48
        return updateCheck->isChecked();
49
}
50
 
51
bool SxwDialog::askAgain()
52
{
53
        return !(doNotAskCheck->isChecked());
54
}
55
 
56
SxwDialog::~SxwDialog()
57
{
58
 
59
}
60
 
61
#endif // HAVE_XML