if(type == New) {
connect(browseButton, SIGNAL(clicked()),
this, SLOT(selectFile()));
+
+ connect(downloadButton, SIGNAL(clicked()),
+ this, SLOT(downloadFile()));
}
connect(confirmButton, SIGNAL(clicked()),
setWindowTitle(tr("Add new XDXF dictionary"));
browseLayout = new QHBoxLayout;
+
+ QHBoxLayout* buttonLayout = new QHBoxLayout;
browseButton = new QPushButton(tr("Browse"));
+ browseButton->setMaximumWidth(150);
+
+ downloadButton = new QPushButton(tr("Download"));
+ downloadButton->setMaximumWidth(150);
+
infoLabel->setText(tr("Dictionary file: not selected"));
browseLayout->addWidget(infoLabel, 0, Qt::AlignLeft);
- browseLayout->addWidget(browseButton, 0, Qt::AlignRight);
+
+ browseLayout->addLayout(buttonLayout);
+ buttonLayout->addWidget(browseButton);
+ buttonLayout->addWidget(downloadButton);
mainVerticalLayout->addLayout(browseLayout);
}
}
}
+void XdxfDialog::downloadFile() {
+ XdxfPlugin::dictDownloader.download(this);
+}
+
void XdxfDialog::saveSettings() {
_settings = new Settings;
if(plugin) {