예제 #1
0
void ExportAudioDialog::
        setupGui()
{
#if defined(TARGET_reader)
    project->mainWindow()->getItems()->actionExport_audio->setEnabled(false);
    project->mainWindow()->getItems()->actionExport_selection->setEnabled(false);
#else
    connect(project->mainWindow()->getItems()->actionExport_audio, SIGNAL(triggered()), SLOT(exportEntireFile()));
    connect(project->mainWindow()->getItems()->actionExport_selection, SIGNAL(triggered()), SLOT(exportSelection()));
    connect(selection_model, SIGNAL(selectionChanged()), SLOT(selectionChanged()));
    connect(render_view, SIGNAL(populateTodoList()), SLOT(populateTodoList()));
    connect(this, SIGNAL(rejected()), SLOT(abortExport()));
    connect(ui->buttonBoxAbort, SIGNAL(rejected()), SLOT(abortExport()));
    connect(ui->buttonBoxOk, SIGNAL(accepted()), SLOT(close()));
    connect(ui->checkBoxNormalize, SIGNAL(toggled(bool)), SLOT(checkboxToggled(bool)));
    connect(this, SIGNAL(finished(int)), SLOT(dialogFinished(int)));

    selectionChanged();
#endif
}
예제 #2
0
void keyServer::slotExport(QString keyId)
{
        if (page->kCBexportks->currentText().isEmpty())
                return;
        readmessage=QString::null;
        exportproc=new KProcIO(QTextCodec::codecForLocale());
        QString keyserv=page->kCBexportks->currentText();

        *exportproc<<"gpg"<<"--utf8-strings";
	if (!page->exportAttributes->isChecked())
                *exportproc<<"--export-options"<<"no-include-attributes";

        if (page->cBproxyE->isChecked()) {
                exportproc->setEnvironment("http_proxy",page->kLEproxyE->text());
                *exportproc<<	"--keyserver-options"<<"honor-http-proxy";
        } else
                *exportproc<<	"--keyserver-options"<<"no-honor-http-proxy";
        *exportproc<<"--status-fd=2"<<"--keyserver"<<keyserv<<"--send-keys"<<keyId;

        QObject::connect(exportproc, SIGNAL(processExited(KProcess *)),this, SLOT(slotexportresult(KProcess *)));
        QObject::connect(exportproc, SIGNAL(readReady(KProcIO *)),this, SLOT(slotimportread(KProcIO *)));
        exportproc->start(KProcess::NotifyOnExit,true);
	QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
        importpop = new QDialog( this,0,true,Qt::WDestructiveClose);
        QVBoxLayout *vbox=new QVBoxLayout(importpop,3);
        QLabel *tex=new QLabel(importpop);
        tex->setText(i18n("<b>Connecting to the server...</b>"));
        QPushButton *Buttonabort=new QPushButton(i18n("&Abort"),importpop);
        vbox->addWidget(tex);
        vbox->addWidget(Buttonabort);
        importpop->setMinimumWidth(250);
        importpop->adjustSize();
        importpop->show();
        connect(importpop,SIGNAL(destroyed ()),this,SLOT(abortExport()));
	connect(Buttonabort,SIGNAL(clicked ()),importpop,SLOT(close()));
}