コード例 #1
0
Solid::OpticalDrive::OpticalDrive(QObject *backendObject)
    : StorageDrive(*new OpticalDrivePrivate(), backendObject)
{
    connect(backendObject, SIGNAL(ejectPressed(QString)),
            this, SIGNAL(ejectPressed(QString)));
    connect(backendObject, SIGNAL(ejectDone(Solid::ErrorType,QVariant,QString)),
            this, SIGNAL(ejectDone(Solid::ErrorType,QVariant,QString)));
    connect(backendObject, SIGNAL(ejectRequested(QString)),
            this, SIGNAL(ejectRequested(QString)));
}
コード例 #2
0
ファイル: ejectdialog.cpp プロジェクト: pashazz/winegame
void EjectDialog::switchDisc()
{
	hide();
	bool result;
	emit ejectRequested(result);
	if (!result)
	{
		QMessageBox::warning(this, tr("Error"), tr("Failed to switch disc. Maybe device is busy?"));
	}
	show();
}