void Advanced_Settings_Window::on_TB_QEMU_IMG_Browse_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Select executable"), Get_Last_Dir_Path(ui.Edit_After_Stop_Command->text()), tr("All Files (*)") ); if( ! fileName.isEmpty() ) ui.Edit_QEMU_IMG_Path->setText( QDir::toNativeSeparators(fileName) ); }
void Advanced_Settings_Window::on_TB_Browse_Before_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Select executable"), Get_Last_Dir_Path(ui.Edit_Before_Start_Command->text()), tr("All Files (*);;Scripts (*.sh)") ); if( ! fileName.isEmpty() ) ui.Edit_Before_Start_Command->setText( QDir::toNativeSeparators(fileName) ); }
void Advanced_Settings_Window::on_TB_Log_File_clicked() { QString fileName = QFileDialog::getSaveFileName( this, tr("Select or Create Log File"), Get_Last_Dir_Path(ui.Edit_Log_Path->text()), tr("All Files (*)") ); if( ! fileName.isEmpty() ) ui.Edit_Log_Path->setText( QDir::toNativeSeparators(fileName) ); }
void Emulator_Options_Window::on_TB_Browse_clicked() { QString dir = QFileDialog::getExistingDirectory( this, tr("Select Directory"), Get_Last_Dir_Path(ui.Edit_Path_to_Dir->text()), QFileDialog::ShowDirsOnly ); if( ! dir.isEmpty() ) ui.Edit_Path_to_Dir->setText( QDir::toNativeSeparators(dir) ); }
void Properties_Window::on_TB_HDD_Image_Browse_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Open HDD Image File"), Get_Last_Dir_Path(ui.Edit_HDD_Image_Path->text()), tr("All Files (*);;Images Files (*.img *.qcow *.wmdk)") ); if( ! fileName.isEmpty() ) ui.Edit_HDD_Image_Path->setText( QDir::toNativeSeparators(fileName) ); }
void Add_New_Device_Window::on_TB_File_Path_Browse_clicked() { QString file_name = QFileDialog::getOpenFileName( this, tr("Select your device"), Get_Last_Dir_Path(ui.Edit_File_Path->text()), tr("All Files (*)") ); if( ! file_name.isEmpty() ) ui.Edit_File_Path->setText( QDir::toNativeSeparators(file_name) ); }
void VM_Wizard_Window::on_Button_Existing_clicked() { QString hddPath = QFileDialog::getOpenFileName( this, tr("Select HDD Image"), Get_Last_Dir_Path(ui.Edit_HDA_File_Name->text()), tr("All Files (*)") ); if( ! hddPath.isEmpty() ) ui.Edit_HDA_File_Name->setText( QDir::toNativeSeparators(hddPath) ); }
void Convert_HDD_Image_Window::on_Button_Browse_Output_clicked() { QString fileName = QFileDialog::getSaveFileName( this, tr("Save Out HDD Image File"), Get_Last_Dir_Path(ui.Edit_Output_File_Name->text()), tr("All Files (*);;Images Files (*.img *.qcow *.qcow2 *.wmdk)") ); if( ! fileName.isEmpty() ) ui.Edit_Output_File_Name->setText( QDir::toNativeSeparators(fileName) ); }
void Advanced_Settings_Window::on_TB_VM_Folder_clicked() { QString folder = QFileDialog::getExistingDirectory( this, tr("Set your VM folder"), Get_Last_Dir_Path(ui.Edit_VM_Folder->text()) ); if( ! folder.isEmpty() ) { if( ! (folder.endsWith("/") || folder.endsWith("\\")) ) folder += "/"; ui.Edit_VM_Folder->setText( QDir::toNativeSeparators(folder) ); } }
void Emulator_Options_Window::on_Table_Systems_itemDoubleClicked( QTableWidgetItem *item ) { QString binName = QFileDialog::getOpenFileName( this, tr("Select QEMU Binary File"), Get_Last_Dir_Path(ui.Edit_Path_to_Dir->text()), tr("All Files (*)") ); if( ! binName.isEmpty() ) { if( ui.Table_Systems->currentRow() < 0 ) return; ui.Table_Systems->item( ui.Table_Systems->currentRow(), 1 )->setText( QDir::toNativeSeparators(binName) ); Update_Info = true; // Update emulator info } }
void Select_Icon_Window::on_Button_Browse_clicked() { QString iconPath = QFileDialog::getOpenFileName( this, tr("Select Icon File:"), Get_Last_Dir_Path(ui.Edit_Other_Icon_Path->text()), tr("PNG Images (*.png)") ); if( iconPath.isEmpty() ) return; iconPath = QDir::toNativeSeparators( iconPath ); if( ! QFile::exists(iconPath) ) { AQError( "void Select_Icon_Window::on_Button_Browse_clicked()", "File No Exists!" ); } else { ui.Edit_Other_Icon_Path->setText( iconPath ); } }
void Emulator_Control_Window::on_actionCDROM_Other_triggered() { if( ! CD_ROM_Available() ) return; QString fileName = QFileDialog::getOpenFileName( this, tr("Open Device or Image File"), Get_Last_Dir_Path(Cur_VM->Get_CD_ROM().Get_File_Name()), tr("All Files (*);;Images Files (*.iso)") ); if( ! fileName.isEmpty() ) { fileName = QDir::toNativeSeparators( fileName ); on_actionCDROM_Eject_triggered(); Set_Device( "cdrom", fileName ); // Add to Recent Menu Add_To_Recent_CD_Files( fileName ); Update_Recent_CD_ROM_Images_List(); } }
void Convert_HDD_Image_Window::on_Button_Browse_Base_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Select Base HDD Image File"), Get_Last_Dir_Path(ui.Edit_Base_File_Name->text()), tr("All Files (*);;Images Files (*.img *.qcow *.qcow2 *.wmdk)") ); if( fileName.isEmpty() ) return; fileName = QDir::toNativeSeparators( fileName ); ui.Edit_Base_File_Name->setText( fileName ); if( ! QFile::exists(fileName) ) { AQGraphic_Warning( tr("Error!"), tr("Cannot Locate Input File!") ); return; } // Get info about image HDD_Info->Update_Disk_Info( fileName ); }
void Properties_Window::on_TB_CDROM_Image_Browse_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Open CD\\DVD-ROM Image File"), Get_Last_Dir_Path(ui.CB_CDROM_Devices->lineEdit()->text()), tr("All Files (*);;Images Files (*.iso)") ); if( ! fileName.isEmpty() ) { fileName = QDir::toNativeSeparators( fileName ); ui.CB_CDROM_Devices->lineEdit()->setText( fileName ); Add_To_Recent_CD_Files( fileName ); // Add this path to ComboBox items? for( int ix = 0; ix < ui.CB_CDROM_Devices->count(); ++ix ) { if( ui.CB_CDROM_Devices->itemText(ix) == fileName ) return; } ui.CB_CDROM_Devices->addItem( fileName ); } }