1 /**************************************************************************** 2 ** 3 ** Copyright (C) 2009-2010 Andrey Rijov <ANDron142@yandex.ru> 4 ** 5 ** This file is part of AQEMU. 6 ** 7 ** This program is free software; you can redistribute it and/or modify 8 ** it under the terms of the GNU General Public License as published by 9 ** the Free Software Foundation; either version 2 of the License. 10 ** 11 ** This program is distributed in the hope that it will be useful, 12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ** GNU General Public License for more details. 15 ** 16 ** You should have received a copy of the GNU General Public License 17 ** along with this program; if not, write to the Free Software 18 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 ** Boston, MA 02110-1301, USA. 20 ** 21 ****************************************************************************/ 22 23 #ifndef HDD_IMAGE_INFO_H 24 #define HDD_IMAGE_INFO_H 25 26 #include <QProcess> 27 #include "VM_Devices.h" 28 29 class HDD_Image_Info : public QObject 30 { 31 Q_OBJECT 32 33 public: 34 HDD_Image_Info( QObject *parent = 0 ); 35 VM::Disk_Info Get_Disk_Info() const; 36 37 public slots: 38 void Update_Disk_Info( const QString &path ); 39 40 private slots: 41 void Parse_Info( int exitCode, QProcess::ExitStatus exitStatus ); 42 void Clear_Info(); 43 44 signals: 45 void Completed( bool ok ); 46 47 private: 48 VM::Disk_Info Info; 49 QProcess* QEMU_IMG_Proc; 50 }; 51 52 #endif 53