예제 #1
0
ReportProperties::ReportProperties(QWidget* parent, Qt::WindowFlags fl)
    : QDialog(parent, fl)
{
    setupUi(this);


    // signals and slots connections
    connect(_btnAccept, SIGNAL(clicked()), this, SLOT(accept()));
    connect(_btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
    connect(_slWmOpacity, SIGNAL(valueChanged(int)), this, SLOT(setWatermarkOpacity(int)));
    connect(_cbWmStatic, SIGNAL(toggled(bool)), _gbWmDynamic, SLOT(setDisabled(bool)));
    connect(_cbWmStatic, SIGNAL(toggled(bool)), _leWmText, SLOT(setEnabled(bool)));
    connect(_cbWmUseBest, SIGNAL(toggled(bool)), _gbWmFont, SLOT(setDisabled(bool)));
    connect(_btnWmChangeFont, SIGNAL(clicked()), this, SLOT(changeWmFont()));
    connect(_cbBgEnable, SIGNAL(toggled(bool)), _tabBg, SLOT(setEnabled(bool)));
    connect(_rbBgStatic, SIGNAL(toggled(bool)), _gbBgDynamic, SLOT(setDisabled(bool)));
    connect(_rbBgStatic, SIGNAL(toggled(bool)), _gbStatic, SLOT(setEnabled(bool)));
    connect(_slBgOpacity, SIGNAL(valueChanged(int)), this, SLOT(setBgOpacity(int)));
    connect(_btnLoad, SIGNAL(clicked()), this, SLOT(sLoadBgImage()));

    _tabBg->setEnabled(false);
    _uudata = QString::null;
    
    QDoubleValidator * dblval = new QDoubleValidator(0.0, 100.0, 2, this);
    _leBgX->setValidator(dblval);
    _leBgY->setValidator(dblval);
    _leBgWidth->setValidator(dblval);
    _leBgHeight->setValidator(dblval);
}
예제 #2
0
/*
 *  Constructs a ReportProperties as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
ReportProperties::ReportProperties(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : QDialog(parent, name, modal, fl)
{
    setupUi(this);


    // signals and slots connections
    connect(_btnAccept, SIGNAL(clicked()), this, SLOT(accept()));
    connect(_btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
    connect(_slWmOpacity, SIGNAL(valueChanged(int)), this, SLOT(setWatermarkOpacity(int)));
    connect(_cbWmStatic, SIGNAL(toggled(bool)), _gbWmDynamic, SLOT(setDisabled(bool)));
    connect(_cbWmStatic, SIGNAL(toggled(bool)), _leWmText, SLOT(setEnabled(bool)));
    connect(_cbWmUseBest, SIGNAL(toggled(bool)), _gbWmFont, SLOT(setDisabled(bool)));
    connect(_btnWmChangeFont, SIGNAL(clicked()), this, SLOT(changeWmFont()));
    connect(_cbBgEnable, SIGNAL(toggled(bool)), _tabBg, SLOT(setEnabled(bool)));
    connect(_rbBgStatic, SIGNAL(toggled(bool)), _gbBgDynamic, SLOT(setDisabled(bool)));
    connect(_rbBgStatic, SIGNAL(toggled(bool)), _gbStatic, SLOT(setEnabled(bool)));
    connect(_slBgOpacity, SIGNAL(valueChanged(int)), this, SLOT(setBgOpacity(int)));
    connect(_btnLoad, SIGNAL(clicked()), this, SLOT(sLoadBgImage()));
    init();
}