Exemplo n.º 1
0
void WidgetMain::createConnections()
{
    connect(ui->actionConfigSave, SIGNAL(triggered()), this, SLOT(saveConfig()), Qt::DirectConnection);
    connect(ui->actionConfigSaveAs, SIGNAL(triggered()), this, SLOT(saveConfigAs()), Qt::DirectConnection);
    connect(ui->actionConfigOpen, SIGNAL(triggered()), this, SLOT(openConfig()), Qt::DirectConnection);
    connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(close()), Qt::DirectConnection);

    connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()), Qt::DirectConnection);
    connect(ui->actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()), Qt::DirectConnection);

    connect(d_hponic.data(), SIGNAL(transmissionStatusChanged(Transmission::Status)),
            this, SLOT(onTransmissionStatusChanged(Transmission::Status)), Qt::DirectConnection);
    connect(d_hponic.data(), SIGNAL(transmissionCommandSend(Command::Result)),
            this, SLOT(onTransmissionCommandSend(Command::Result)), Qt::DirectConnection);

    connect(d_hponic.data(), SIGNAL(exportStarted()), this, SLOT(onExportStarted()), Qt::DirectConnection);
    connect(d_hponic.data(), SIGNAL(exportStopped()), this, SLOT(onExportStopped()), Qt::DirectConnection);
    connect(d_hponic.data(), SIGNAL(exportProgress(int,int)), this, SLOT(onExportProgress(int,int)), Qt::DirectConnection);
}
Exemplo n.º 2
0
ExportDialog::ExportDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ExportDialog)
{
    ui->setupUi(this);

#ifdef Q_WS_MAC
    setWindowFlags((windowFlags() & ~Qt::WindowType_Mask) | Qt::Sheet);
    setStyleSheet(styleSheet() + " #ExportDialog { border: 1px solid rgba(0, 0, 0, 100); border-top: none; }");
#else
    setWindowFlags((windowFlags() & ~Qt::WindowType_Mask) | Qt::Dialog);
#endif

    connect(ui->buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
    connect(ui->buttonExport, SIGNAL(clicked()), this, SLOT(exportDatabase()));
    connect(ui->buttonChooseDir, SIGNAL(clicked()), this, SLOT(chooseExportDirectory()));
    connect(Manager::instance()->mediaCenterInterface(), SIGNAL(sigExportStarted()), this, SLOT(onExportStarted()));
    connect(Manager::instance()->mediaCenterInterface(), SIGNAL(sigExportProgress(int,int)), this, SLOT(onExportProgress(int,int)));
    connect(Manager::instance()->mediaCenterInterface(), SIGNAL(sigExportDone()), this, SLOT(onExportFinished()));
    connect(Manager::instance()->mediaCenterInterface(), SIGNAL(sigExportRaiseError(QString)), this, SLOT(onExportError(QString)));
}