qemuctl/0000755000175000017500000000000012224317461011552 5ustar peterpeterqemuctl/icons/0000755000175000017500000000000012224277526012674 5ustar peterpeterqemuctl/icons/bluetooth.png0000644000175000017500000000374212224277526015415 0ustar peterpeterPNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<_IDATX{lT{z~lquKb ^5R5UE}hSJUBBPQDT*ͣ/Ji l k `p1޽{3?vص#ݻwΝo9)Ȧр"X-BVޥjh#;вSxWW3ˊe ( JQ_䵮[rh<'qd {7{=ƾ,Νs>8lKđ߫PB[^]-؉OO5ʙ%+ȪЍEkg`4y^E"DJ uc} >nIlZnk=U^.݈1B"\C9u-~ 3LIHKVՆn]< BBJH-X&te¼j*K\Wܶtpו缠{"?iejP5T 'Y, SLLu:A}^m]C4e!Bb.1" Xa+J8 ib1#8m{^l]KME>dԊ ') 4]_˧2KCSlx?I+ѯKS'U)ńdh"7׏˳B L\Wp|?Q0vxS45T#`h8I GJ @)Ae8{7G]^[;~=Gi㧪YRnh+ x[c֎oǗ.On\S.FCZw )oWر&r]TJnm_^D ' \A]m9+f#L܃~rIhd;O."=r\!q==8wp3EE@)lG:|w=UżCzDG,V+s,o0޵SVQ)G=^J[ 8xS+3(@.́- ;sm\1$JwMG?3TMݼܬ4]4Cj}-cy*t]ǖR3l;>} HD&Kh&/#Y='7.@*ŏ_l;cClLޣ7 Y()bėf* EM[{8r*'?sx8~}9VH:l{ }EL%eC 4 Dܹan'pdZyW/$n:lI.vFF^XL˞@K,gi@,n\_g@{5SINI@Ǒ]iϴ >gEG,vOn $&^Ŏl2`g_:ZVZj{B鋚=`FQsl4\4\ <@4\ܢݟ\R믪,r#q04ϣtvmMZ`IԤhRM@pꪋg IDATXŗo\E?|wql'/425D$zĿ!wHHkJqlB:{C;?-hOw;|wo̸q.Sn»dW\8'{on/bf`tcO[^[ZA`qaG\x!D./ANv"A3"c6$R`(JTt9&B)b"50oIeM 9fn4u4%sEU{b?V~Dd=,=y+X;{sBΥ!ҙ~NCy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`)<]Y_wd&ծIENDB`qemuctl/icons/list-remove.png0000644000175000017500000000116112224277526015647 0ustar peterpeterPNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<tEXtTitleOptical Drive>g IDATX햱@MBt SP  */sP@ANwJHSڱ%PXrV#Nfv&Ib̑>L0Eom\%B !k-_olOGTiճ|PM3 x$\m߸_t.ޕ?.Vˣ bμy(F_^zl6#P}_UNV'Dϟ,p}>;.o;)"]13 r v[=~ȋ4h9O nn6HOg _+;]¡ll?:xzrFlʀlJ`RMI;;;l3ÊغTS+Z[IΆ :;;(~rr"rW$Buuu"{K;###QԎ |+1'Ǝ qDȹ/^KJx,V'_~6H$k(1GdBl&'j։C|q˲G[4 `DlY’2^$I6-4$nKpDZ*p701qkkFU[5sees"KKKUeI"Eo޼e444|$`J>\0P|ˢ|x}} SMC{{{U%iǼ]ݺa SSSx< eqFP$Y*x^{JdE#B image/svg+xml Qemuctl VM Monitor Tool qemuctl/icons/3floppy_unmount.png0000644000175000017500000000232612224277526016566 0ustar peterpeterPNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<tEXtTitleOptical Drive>g 4IDATXWoE~;;qJH4i\ P/8p,7ġP{PzBppC*r*TBh%qI??xߛ]ǩmm;ˌgg{ߛ5$GLzMuxݷq=ϧ G!q$1_YYz`z_^3Fa.9_5Zmͦgx izU'8lҽ[NFl<.~yV(Z~Ӡr3<A@t%:n xK.=!8::F30 %%" z <ϓ5n YS͐ ҢՒ{-C\~G6/zqv:ȴȖzmg IDATXoTU?of:9JRj)]LtQ%bR [DWH ;E 6hl "j\@ b,"$E 8ehKۙ߿޼bZFj$'s} 5/KU \-?IC(uB@gx]=mwx^ɟZk{MyBxA}>m<&YXб"UU#W]ΎOh@= : BK(ӣr؋KK:zZ[+͇y>9r7/!.vW׸b5ܝ ^ln&7>?ROӿ93'Z+ mY_n~ܬRn8rݻ"dvQT.p֏Wv?Z]; fab<؈=;T¶хN.Nѩ.Ç HP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»dW\8'{on/bf`tcO[^[ZA`qaG\x!D./ANv"A3"c6$R`(JTt9&B)b"50oIeM 9fn4u4%sEU{b?V~Dd=,=y+X;{sBΥ!ҙ~NCyVǚk R*/d~׳'c4jofM;LMf'@` " V7C y}ѻ>3 GkWiZjol RRy fV!&*K nuc?CD('dp}2ovcw ! %Y^;,,͝t`e0SVg0c}<Kk714Րeݷ: SllIɘ_(:*w,g+R|yxfM  nC) LydYiy"Y뤮i |eXSR/*<$<:U8c*dZdG?`#&LD*Ie#A|a;sxA }3*`3QfSF2Y!%ȪLu m`f&"5MVQ9Dɀ o0͎5^C=oIDjgnLsb[/ٚxt /qb[U6hAh'a"ЇG~/ܰ9Ķ=O,oJm0_u{b%U%= oJmgP+UiPIdyUP;W:nѠҬomv'y~q:.[RIENDB`qemuctl/icons/exit.png0000644000175000017500000000322612224277526014356 0ustar peterpeterPNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATXÕWklUfv}Jn[hEP-HLHcbLQG"1&&&J &C£4h $6VMҖvcvfL6sgաւ END~ n3,` (//ǶmPQQQ4e.`_@gVwoޤk)$DĘ4P[^e1~$wہ<ƈ5%X7u5% .Xd 6oތNcK1>~Pr+1Tn޳^+?bl(=)'kjj҂|N 3/a ?v-yI'Onʾ:@TUU455ݥbr_+aE*TgRs}k:ϥtmfیؐN}vtadaYO; ]J}~JYrkз+;֭XfљnlDPĴ;o+J}J&Ljq&EUcq⩓'IX3n"k e۱nMBLbODG 8 !4S wJ Ĭ"Q(@<-b> *! xF& ǎZ4gaBTedHbcPؽ.wDFC9IuQ|s؃ zU%W H<ɩ xzYkd9e ^lrIPo3`Z-0ASZ}O6$W#yB 6$fd=u0<2B֯m;#q !@,#r2{_6aJ.YL..$i3D05'#Fry=ju6;,^zMq^aӕ% X,_zEB .GAq$KOjpa!S 5֧=z sZ$45y;IENDB`qemuctl/icons/help-about.png0000644000175000017500000000326412224277526015447 0ustar peterpeterPNG  IHDR szzsBIT|d pHYs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3q:~T\Jwt<|TvqX@+Wb҅n|>xƭx4`*ʬdf ˗_bl_z;+c(*85(=!8<>>^>EY s~=uԁ_y_GGvH5$&z_`-[г/Ϟ~m;oOV_}%|T ݻO' UDİ>Qxg֭[,f%Ъ4JQ5#L$ZgVuSG%f޺{ko:@M[g8uq:Yp0IENDB`qemuctl/icons/icon.png0000644000175000017500000000422512224277526014335 0ustar peterpeterPNG  IHDR@@% bKGDJIDAThYkLTf 3 :T@pAAx`R%bMD1FFWoLoJc o!bRE j[IP5"Ȁ0|9;y  _ٳk^{ I|HOO(8xG:ic2:::jT(,,tXQQ鏆d@Rl]vI!3fUhhw\:&''D|lkk >|bt:AmmG߿Ȇɬ,իR9s7m 5552]6o,;vr5(wڷo~~!ÇquuuҢ{R%B@46n('NĄ eHkkk|ƌj 6MHN<nݒ1&Mt:}hn8HHnwv'@rٲeBbXM+gGbNU}ph"%^rlg6@ 33S׫%6lx gQA||Fq٭>iiimZeVtwwGEE yNN0FPXXhu#{ŋTUU 1:nX9ط-_@PP4!7ofgg aOOѣG₃f%K_.Qegg۷o„ Fq͚5rڼ<&PQQRCY 111͛V/8r_G0D|)S˗p υfK޸qC8No喢D[ZZ>ZR{ ,k/H P`X{_J{0vC9=:L&.> bn1J`D0x`n4o${'+/@U84F $&I#AoAS r y!Iy |d%sr t*$3$6$ȫ<@ƐAXr9[:r XA**E95Aܪ"B:d,Sl@O (Xr&9@%AZr7畞7T(ߓ$ 5SO!K돤Kܟg PLTE333FFFPPPUUUnnn~]tRNS #$%/6=>@COQS]pxyjIDAT8ݓ10 Em'K8 QHM+"S(N/#j  tM@B2T:Xr:Bn}SxqH(|M|EXx,4< ʡa=B#yI>pR ٬ X(#Wp ?q^ȴIENDB`qemuctl/icons/xfce-man.png0000644000175000017500000000447712224277526015114 0ustar peterpeterPNG  IHDR szzsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<tEXtTitleHelp Browserk8tEXtAuthorJakub Steiner/~IDATXW PUvF$NL$ FьZ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6ۖA'-YpZ ' `}Wy(iq;5g@wb$c<'U$1ip@)XYtXլ!s Y*4ONCCXG _X)YiG#B=gX0fF01Jp]$!&r\4߃WxyY JUM%ˍըueNQjxtL r\ b)rJ7판'9]o ;}^䉗G۩?>ۯF"$IPIYh8nw.xrܹҽ{Gϟ=OM{ ]?taoo\ 4 f U۱us] ŋbh(IB{L/y۷7Q/(`9y p!cܸ.-?['=B ln;k6 2a곌k(Jrۿ$\NSft'3v`UPlL (It{ BIENDB`qemuctl/debugmonitor.h0000644000175000017500000000222512224310433014412 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #ifndef DEBUGMONITOR_H #define DEBUGMONITOR_H #include #include #include "ui_debugmonitor.h" class DebugMonitor : public QWidget { Q_OBJECT public: DebugMonitor(QWidget *parent = 0); ~DebugMonitor(); public slots: void newAnswer( QStringList answer, bool ok ); void button(); signals: void send( QString cmd ); private: Ui::DebugMonitorClass ui; QStringList list; }; #endif // DEBUGMONITOR_H qemuctl/qemuctl.qrc0000644000175000017500000000167711474214365013753 0ustar peterpeter icons/bluetooth.png icons/3floppy_unmount.png icons/xfce-man.png icons/gnome-dev-ethernet.png icons/input-mouse.png icons/input-keyboard.png icons/input-tablet.png icons/add.png icons/edit-delete.png icons/exit.png icons/gnome-dev-media-sdmmc.png icons/gnome-help.png icons/harddrive.png icons/help-about.png icons/icon.png icons/input-tablet.png icons/list-add.png icons/list-remove.png icons/media-optical.png icons/player_record.png icons/player_stop.png qemuctl/QHexSpinbox.h0000644000175000017500000000210711517641730014136 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ /* * QHexSpinbox.h * * Created on: Dec 14, 2010 * Author: peter */ #ifndef QHEXSPINBOX_H_ #define QHEXSPINBOX_H_ #include class QHexSpinbox: public QSpinBox { public: QHexSpinbox( QWidget * parent = 0 ); virtual ~QHexSpinbox(); int valueFromText(const QString &text) const; QString textFromValue(int value) const; }; #endif /* QHEXSPINBOX_H_ */ qemuctl/debugmonitor.cpp0000644000175000017500000000252211517641723014762 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #include "debugmonitor.h" DebugMonitor::DebugMonitor(QWidget *parent) : QWidget(parent) { ui.setupUi(this); ui.plainTextEdit->setReadOnly(true); ui.plainTextEdit->setLineWrapMode(QPlainTextEdit::NoWrap); connect( ui.pushButton, SIGNAL(clicked()), this, SLOT(button()) ); connect( ui.lineEdit, SIGNAL(returnPressed()), this, SLOT(button()) ); } DebugMonitor::~DebugMonitor() { } void DebugMonitor::button(){ QString ret = ui.lineEdit->text(); ui.lineEdit->clear(); emit send( ret ); } void DebugMonitor::newAnswer( QStringList answer, bool ok ) { this->list << answer; ui.plainTextEdit->appendPlainText(answer.join("\n")); } qemuctl/Setting.cpp0000644000175000017500000000151511517641723013702 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #include "Setting.h" Setting::Setting(QWidget *parent) : QWidget(parent) { ui.setupUi(this); } Setting::~Setting() { } qemuctl/debian/0000755000175000017500000000000012224277526013003 5ustar peterpeterqemuctl/debian/docs0000644000175000017500000000000012224277526013644 0ustar peterpeterqemuctl/debian/changelog0000644000175000017500000000103112224277526014650 0ustar peterpeterqemuctl (0.3.0-1) unstable; urgency=low * Updated to new upstream version * New maintainer (closes: #595553) -- Evgeny Dolgikh Mon, 10 Jan 2011 16:10:44 +0200 qemuctl (0.2-2) unstable; urgency=low * Added kvm support (Closes: #409573). Thanks to Junichi Uekawa. -- Miguel Gea Milvaques Mon, 28 May 2007 19:05:36 +0200 qemuctl (0.2-1) unstable; urgency=low * Initial release (Closes: #384586) -- Miguel Gea Milvaques Fri, 25 Aug 2006 12:07:53 +0200 qemuctl/debian/dirs0000644000175000017500000000001012224277526013656 0ustar peterpeterusr/bin qemuctl/debian/watch0000644000175000017500000000006712224277526014037 0ustar peterpeterversion = 3 http://sf.net/qemuctl/qemuctl(.*)\.tar\.gz qemuctl/debian/source/0000755000175000017500000000000012224277526014303 5ustar peterpeterqemuctl/debian/source/format0000644000175000017500000000001412224277526015511 0ustar peterpeter3.0 (quilt) qemuctl/debian/copyright0000644000175000017500000000223512224277526014740 0ustar peterpeterThis work was packaged for Debian by: Evgeny Dolgikh on Mon, 10 Jan 2011 15:14:51 +0200 It was downloaded from: http://qemuctl.sourceforge.net Upstream Author(s): Peter Rustler Copyright: Copyright (C) 2005 - Peter Rustler License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA The Debian packaging is: Copyright (C) 2011 Evgeny Dolgikh and is licensed under the GPL version 3, see "/usr/share/common-licenses/GPL-3". qemuctl/debian/compat0000644000175000017500000000000212224277526014201 0ustar peterpeter7 qemuctl/debian/control0000644000175000017500000000201012224277526014377 0ustar peterpeterSource: qemuctl Section: misc Priority: optional Maintainer: Evgeny Dolgikh Build-Depends: debhelper (>= 7.0.50~), libqt4-dev, libx11-dev, libxext-dev Standards-Version: 3.9.1 Homepage: http://qemuctl.sourceforge.net/ Package: qemuctl Architecture: i386 Depends: ${misc:Depends}, ${shlibs:Depends}, qemu Description: This is a GUI for virtual pc emulator "qemu". This is a GUI for virtual pc emulator "qemu". But it is not for configuring devices or starting qemu, no it is for changing media, reset the vm, making screenshots, and so on. And this at runtime. If you are a user of one of the configuring GUI's, just change the path to qemu to qemuctl and it work. So, if you are developing a configuring GUI for qemu and you want qemuctl firing up with your GUI. This can just add a suspend screenshot to your GUI like you would see in vmware, then launch qemuctl instead qemu. Now qemuctl will do the job launching qemu. Now drop me a note and you are on the supported configuring GUI's list. qemuctl/debian/rules0000755000175000017500000000221412224277526014062 0ustar peterpeter#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 configure: configure-stamp configure-stamp: dh_testdir qmake touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp dh_auto_clean dh_clean install: build-stamp dh_testdir dh_testroot dh_installdirs install -m 0755 -o root -g root qemuctl debian/qemuctl/usr/bin/ binary-indep: install dh_testdir dh_testroot dh_installchangelogs dh_installdocs # dh_installman qemuctl.1 dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary-indep binary: binary-arch binary-indep .PHONY: build clean binary binary-arch binary-indep install configure qemuctl/serialconnector.cpp0000644000175000017500000002045412224310433015445 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #include "serialconnector.h" SerialConnector::SerialConnector(QWidget *parent) : QWidget(parent) { ui.setupUi(this); connect( ui.serialTypeComboBox, SIGNAL( activated(int) ), this, SLOT( typeChanged(int) ) ); connect( ui.tcpServerCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( tcpServerCheckBox(int) ) ); connect( ui.donePushButton, SIGNAL( clicked() ), this, SLOT( done() ) ); connect( ui.cancelPushButton, SIGNAL( clicked() ), this, SLOT( cancel() ) ); connect( ui.pipePushButton, SIGNAL( clicked() ), this, SLOT( pipeChoose() ) ); connect( ui.filePushButton, SIGNAL( clicked() ), this, SLOT( fileChoose() ) ); connect( ui.unixPushButton, SIGNAL( clicked() ), this, SLOT( unixChoose() ) ); this->typeChanged(ui.serialTypeComboBox->currentIndex()); this->tcpServerCheckBox(ui.tcpServerCheckBox->isChecked()); } SerialConnector::~SerialConnector() { } void SerialConnector::done(){ this->command = ""; if( ui.monitorCheckBox->isChecked() ){ this->command.prepend("mon:"); } switch( ui.serialTypeComboBox->currentIndex() ){ case 0: if( ui.vcHeightSpinBox->value() > 0 && ui.vcWidthSpinBox-> value() > 0){ this->command.append("vc:"); if( ui.vcCheckBox->isChecked() ){ this->command.append(QString().sprintf("%dCx%dC",ui.vcWidthSpinBox->value(),ui.vcHeightSpinBox->value())); } else { this->command.append(QString().sprintf("%dx%d",ui.vcWidthSpinBox->value(),ui.vcHeightSpinBox->value())); } } else { this->command.append("vc"); } break; case 1: this->command.append("pty"); break; case 2: this->command.append("none"); break; case 3: this->command.append("null"); break; case 4: this->command.append(ui.ttyComboBox->currentText()); break; case 5: this->command.append(ui.parportComboBox->currentText()); break; case 6: this->command.append("file:"); this->command.append(ui.fileLineEdit->text()); break; case 7: this->command.append("stdio"); break; case 8: this->command.append("pipe:"); this->command.append(ui.pipeLineEdit->text()); break; case 9: this->command.append("udp:"); this->command.append( ui.udpDestinationLineEdit->text() ); this->command.append( ":" ); this->command.append( QString().sprintf("%d",ui.udpDestinationSpinBox->value()) ); this->command.append( "@" ); this->command.append( ui.udpSourceComboBox->itemData( ui.udpSourceComboBox->currentIndex(), Qt::UserRole ).toString()); this->command.append( ":" ); this->command.append( QString().sprintf("%d",ui.udpSourceSpinBox->value()) ); break; case 10: if( ui.tcpTelnetCheckBox->isChecked() ){ this->command.append("telnet:"); } else { this->command.append("tcp:"); } if( ui.tcpServerCheckBox->isChecked() ){ this->command.append( ui.tcpComboBox->itemData( ui.tcpComboBox->currentIndex(), Qt::UserRole ).toString()); this->command.append(":"); this->command.append( QString().sprintf("%d",ui.tcpSpinBox->value()) ); this->command.append(",server"); } else { this->command.append( ui.tcpLineEdit->text() ); this->command.append(":"); this->command.append( QString().sprintf("%d",ui.tcpSpinBox->value()) ); } if( ui.tcpNowaitCheckBox->isChecked() ){ this->command.append(",nowait"); } if( ui.tcpNodelayCheckBox->isChecked() ){ this->command.append(",nodelay"); } break; case 11: this->command.append("unix:"); this->command.append(ui.unixLineEdit->text()); if( ui.unixServerCheckBox->isChecked() ){ this->command.append(",server"); } if( ui.unixNowaitCheckBox->isChecked() ){ this->command.append(",nowait"); } break; case 12: this->command.append("braile"); break; case 13: this->command.append("msmouse"); break; default: break; } this->hide(); emit newCommand(command); } void SerialConnector::cancel(){ this->command = ""; this->hide(); } void SerialConnector::fileChoose(){ QString file = QFileDialog::getSaveFileName(this,tr("Output file")); ui.fileLineEdit->setText(file); } void SerialConnector::pipeChoose(){ QString file = QFileDialog::getSaveFileName(this,tr("Named pipe file")); ui.pipeLineEdit->setText(file); } void SerialConnector::unixChoose(){ QString file = QFileDialog::getSaveFileName(this,tr("Unix domain socket file")); ui.unixLineEdit->setText(file); } void SerialConnector::tcpServerCheckBox( int state ){ if( state != 0 ){ ui.tcpLineEdit->hide(); ui.tcpComboBox->show(); } else { ui.tcpLineEdit->show(); ui.tcpComboBox->hide(); } } void SerialConnector::fillHostAdresses(){ QList networks = QNetworkInterface::allInterfaces(); QList addresses; ui.tcpComboBox->clear(); ui.tcpComboBox->addItem( tr("All Interfaces"), "0.0.0.0" ); ui.udpSourceComboBox->clear(); ui.udpSourceComboBox->addItem( tr("All Interfaces"), "0.0.0.0" ); for( int i = 0; i < networks.size(); i++ ){ //qDebug("net: %s",networks.at(i).humanReadableName().toAscii().data()); addresses = networks.at(i).addressEntries(); for( int j = 0; j < addresses.size(); j++ ){ if( addresses.at(j).ip().protocol() == QAbstractSocket::IPv4Protocol ){ qDebug(" address: %s",addresses.at(j).ip().toString().toAscii().data()); QString item = ""; item.append(addresses.at(j).ip().toString()); item.append(" - ( "); #if QT_VERSION >= 0x040600 item.append(networks.at(i).humanReadableName()); #else item.append(networks.at(i).name()); #endif item.append(" "); item.append(networks.at(i).hardwareAddress()); item.append(" )"); ui.tcpComboBox->addItem( item, addresses.at(j).ip().toString() ); ui.udpSourceComboBox->addItem( item, addresses.at(j).ip().toString() ); } } } } void SerialConnector::fillParport(){ QDir dir = QDir("/dev"); dir.setFilter( QDir::System | QDir::Files ); dir.setSorting( QDir::Name ); QStringList filters; filters << "parport*"; dir.setNameFilters(filters); QFileInfoList list = dir.entryInfoList(); ui.parportComboBox->clear(); for( int i = 0; i < list.size(); i++ ){ ui.parportComboBox->addItem(list.at(i).absoluteFilePath()); } } void SerialConnector::fillTTY(){ QDir dir = QDir("/dev"); dir.setFilter( QDir::System | QDir::Files ); dir.setSorting( QDir::Name ); QStringList filters; filters << "ttyS*" << "ttyU*" << "ttyA*"; dir.setNameFilters(filters); QFileInfoList list = dir.entryInfoList(); ui.ttyComboBox->clear(); for( int i = 0; i < list.size(); i++ ){ ui.ttyComboBox->addItem(list.at(i).absoluteFilePath()); } } void SerialConnector::typeChanged( int type ){ ui.fileGroupBox->hide(); ui.vcGroupBox->hide(); ui.pipeGroupBox->hide(); ui.unixGroupBox->hide(); ui.ttyGroupBox->hide(); ui.parportGroupBox->hide(); ui.tcpGroupBox->hide(); ui.udpGroupBox->hide(); QList networks = QNetworkInterface::allInterfaces(); QList adresses; switch( type ){ case 0: ui.vcGroupBox->show(); break; case 1: break; case 2: break; case 3: break; case 4: fillTTY(); ui.ttyGroupBox->show(); break; case 5: fillParport(); ui.parportGroupBox->show(); break; case 6: ui.fileGroupBox->show(); break; case 7: break; case 8: ui.pipeGroupBox->show(); break; case 9: fillHostAdresses(); ui.udpGroupBox->show(); break; case 10: fillHostAdresses(); ui.tcpGroupBox->show(); break; case 11: ui.unixGroupBox->show(); break; case 12: break; case 13: break; default: break; } this->adjustSize(); } const QString SerialConnector::getCommand() { return command; } QVBoxLayout * SerialConnector::getMainLayout(){ return ui.mainVerticalLayout; } qemuctl/doc/0000755000175000017500000000000012224277526012326 5ustar peterpeterqemuctl/doc/README0000644000175000017500000000046512224277526013213 0ustar peterpeterManpage included in POD format. You can visit http://perldoc.perl.org/perlpod.html for more details about POD format. For convertation from POD to man you need only run: $ pod2man qemuctl.pod > qemuctl.1 If you need manpage in html forman then you can use next command: $ pod2html qemuctl.pod > qemuctl.htmlqemuctl/doc/qemuctl.pod0000644000175000017500000000157012224277526014507 0ustar peterpeter=head1 NAME qemuctl - Graphical control for qemu =head1 SYNTAX qemuctl [OPTIONS] =head1 DESCRIPTION This is a controlling GUI for the emulator "qemu". It is not for configuring devices or starting qemu, no it's for changing media, reset the vm, and so on at runtime. You can start it out of your favorite configuring GUI like you would do with qemu. =head1 OPTIONS B<-qemuctl-cmd > Change qemu/kvm executable ( default: /usr/bin/qemu ) B<-qemuctl-suspend-file > Change qemu/kvm suspend file ( default: suspend ) B<-qemuctl-suspend-dir > Change qemu/kvm suspend dir ( default: current dir ) B<-qemuctl-nowakeup > Do not wakeup using default suspend file B<-qemuctl-port > Change qemu/kvm monitor port ( default: 6453 ) =head1 FILES none =head1 ENVIRONMENT VARIABLES none =head1 AUTHORS Peter Rustler =head1 SEE ALSO qemu(1) qemuctl/QDiscFileDialog.ui0000644000175000017500000000065011516637742015047 0ustar peterpeter QDiscFileDialogClass 0 0 400 300 QDiscFileDialog qemuctl/QemuComunication.h0000644000175000017500000000306711517641730015214 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ /* * QemuComunication.h * * Created on: Nov 5, 2010 * Author: peter */ #ifndef QEMUCOMUNICATION_H_ #define QEMUCOMUNICATION_H_ #include #include #include #include #include #include #include #include class QemuComunication: public QThread { Q_OBJECT public: QemuComunication(); virtual ~QemuComunication(); void run(); void setServer( QString host, quint16 port ); public slots: void send( QString comand ); void readSocket(); protected: QString host; quint16 port; bool stop; int timeout; QTcpSocket * socket; QMutex mutex; QMutex command; QTextStream * in; QByteArray * array; signals: void error(int socketError, const QString &message); void newAnswer( QStringList answer, bool ok ); }; #endif /* QEMUCOMUNICATION_H_ */ qemuctl/serialconnector.ui0000644000175000017500000002744611501777707015332 0ustar peterpeter SerialConnectorClass 0 0 577 889 QEMUCTL - Connect to 0 Connection type Virtual Console Pseudo TTY None Null Serial device Parport device Output to file Standard input/output Pipe UDP TCP Unix domain socket Braille MS mouse Use as monitor Unix domain socket options 0 0 0 Socket filename Chose Server No wait TCP options 0 Host IP Port 65535 1024 Telnet Server No wait No delay UDP options 65535 1024 Source IP Destination IP 65535 1024 Port Port VC options Size Use character size File options Filename Chose TTY options TTY device Pipe options Pipe filename Chose Parport options Parport device Cancel Done qemuctl/addmedia.cpp0000644000175000017500000002364212224310433014005 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #include "addmedia.h" AddMedia::AddMedia(QWidget *parent) : QWidget(parent) { ui.setupUi(this); // format ui.formatcomboBox->addItem(tr("Detect ( default )"),""); ui.formatcomboBox->addItem(tr("Raw disk image format to avoid interpreting an untrusted format header( raw )"),"raw"); ui.formatcomboBox->addItem(tr("Host device format ( host_device )"),"host_device"); ui.formatcomboBox->addItem(tr("QEMU image format ( qcow2 )"),"qcow2"); ui.formatcomboBox->addItem(tr("Old QEMU image format ( qcow )"),"qcow"); ui.formatcomboBox->addItem(tr("User Mode Linux Copy On Write image format ( cow )"),"cow"); ui.formatcomboBox->addItem(tr("VirtualBox 1.1 compatible image format ( vdi )"),"vdi"); ui.formatcomboBox->addItem(tr("VMware 3 and 4 compatible image format ( vmdk )"),"vmdk"); ui.formatcomboBox->addItem(tr("VirtualPC compatible image format VHD ( vpc )"),"vpc"); ui.formatcomboBox->addItem(tr("Linux Compressed Loop image ( cloop )"),"cloop"); // media ui.mediacomboBox->addItem(tr("Disk,SD,Flash,Floppy ( Default )"),"disk"); ui.mediacomboBox->addItem(tr("CD-Rom"),"cdrom"); this->mediaChanged(0); // interface ui.interfacecomboBox->addItem(tr("IDE Bus"),"ide"); ui.interfacecomboBox->addItem(tr("SCSI Bus"),"scsi"); ui.interfacecomboBox->addItem(tr("SD Slot"),"sd"); ui.interfacecomboBox->addItem(tr("MTD"),"mtd"); ui.interfacecomboBox->addItem(tr("Floppy"),"floppy"); ui.interfacecomboBox->addItem(tr("Parallel Flash"),"pflash"); ui.interfacecomboBox->addItem(tr("VirtIO"),"virtio"); this->interfaceChanged(0); // index ui.indexcomboBox->addItem(tr("C: / hda ( A: / fd0 for Floppy )"),"0"); ui.indexcomboBox->addItem(tr("D: / hdb ( B: / fd1 for Floppy )"),"1"); ui.indexcomboBox->addItem(tr("E: / hdc"),"2"); ui.indexcomboBox->addItem(tr("F: / hdd"),"3"); ui.indexcomboBox->addItem(tr("G: / hde"),"4"); ui.indexcomboBox->addItem(tr("H: / hdf"),"5"); ui.indexcomboBox->addItem(tr("I: / hdg"),"6"); ui.indexcomboBox->addItem(tr("J: / hdh"),"7"); // cache ui.cachecomboBox->addItem(tr("None ( Default )"),"none"); ui.cachecomboBox->addItem(tr("Writeback"),"writeback"); ui.cachecomboBox->addItem(tr("Writethrough"),"writethrough"); // aio ui.aiocomboBox->addItem(tr("pThread based disk I/O"),"threads"); ui.aiocomboBox->addItem(tr("Native Linux AIO"),"native"); connect( ui.serialcheckBox, SIGNAL( stateChanged(int) ), this, SLOT(serialChanged(int)) ); connect( ui.geometrycheckBox, SIGNAL( stateChanged(int) ), this, SLOT(geometryChanged(int)) ); connect( ui.mediacomboBox, SIGNAL( activated(int) ), this, SLOT(mediaChanged(int)) ); connect( ui.interfacecomboBox, SIGNAL( activated(int) ), this, SLOT(interfaceChanged(int)) ); connect( ui.filepushButton, SIGNAL( clicked() ), this, SLOT( selectFile() ) ); connect( ui.donepushButton, SIGNAL( clicked() ), this, SLOT( doneButton() ) ); connect( ui.cancelpushButton, SIGNAL( clicked() ), this, SLOT( cancelButton() ) ); startNew(); } AddMedia::~AddMedia() { } void AddMedia::doneButton(){ command = ""; if( ! ui.filelineEdit->text().isEmpty() ){ command.append( "file=" ); command.append( ui.filelineEdit->text() ); } if( ui.formatcomboBox->currentIndex() > 0 ){ command.append( ",format=" ); command.append( ui.formatcomboBox->itemData( ui.formatcomboBox->currentIndex(), Qt::UserRole ).toString() ); } if( ui.serialcheckBox->isChecked() && ( ! ui.seriallineEdit->text().isEmpty() ) ){ command.append( ",serial=" ); command.append( ui.seriallineEdit->text() ); } command.append( ",media=" ); command.append( ui.mediacomboBox->itemData( ui.mediacomboBox->currentIndex(), Qt::UserRole ).toString() ); if( ui.geometrycheckBox->isChecked() && ui.mediacomboBox->currentIndex() == 0 ){ command.append( ",cyls=" ); command.append( QString().sprintf( "%d", ui.geo1spinBox->value() ) ); command.append( ",heads=" ); command.append( QString().sprintf( "%d", ui.geo2spinBox->value() ) ); command.append( ",secs=" ); command.append( QString().sprintf( "%d", ui.geo3spinBox->value() ) ); if( ui.geo4spinBox->value() > 0 ){ command.append( ",trans=" ); command.append( QString().sprintf( "%d", ui.geo4spinBox->value() ) ); } } command.append( ",cache=" ); command.append( ui.cachecomboBox->itemData( ui.cachecomboBox->currentIndex(), Qt::UserRole ).toString() ); command.append( ",aio=" ); command.append( ui.aiocomboBox->itemData( ui.aiocomboBox->currentIndex(), Qt::UserRole ).toString() ); command.append( ",if=" ); command.append( ui.interfacecomboBox->itemData( ui.interfacecomboBox->currentIndex(), Qt::UserRole ).toString() ); if( ui.snapshotcheckBox->isChecked() ){ command.append( ",snapshot=on" ); } else { command.append( ",snapshot=off" ); } switch( ui.interfacecomboBox->currentIndex() ){ case 0: // ide case 4: // floppy command.append( ",index=" ); command.append( ui.indexcomboBox->itemData( ui.indexcomboBox->currentIndex(), Qt::UserRole ).toString() ); break; case 1: // scsi command.append( ",bus=" ); command.append( QString().sprintf( "%d", ui.busspinBox->value() ) ); command.append( ",unit=" ); command.append( QString().sprintf( "%d", ui.unitspinBox->value() ) ); break; case 6: // virtio command.append( ",addr=" ); command.append( ui.addresscomboBox->itemData( ui.addresscomboBox->currentIndex(), Qt::UserRole ).toString() ); break; } emit newCommand( command ); this->hide(); qDebug( "AddMedia::doneButton(): %s",command.toAscii().data() ); } void AddMedia::cancelButton(){ command = ""; this->hide(); } QString AddMedia::getCommand() const { return command; } void AddMedia::startNew(){ ui.filelineEdit->setText(""); this->mediaChanged(0); this->interfaceChanged(0); this->serialChanged(0); this->geometryChanged(0); } void AddMedia::selectFile(){ QString string = QFileDialog::getOpenFileName( this, tr("QEMUCTL - Select Disc Image File"), "", tr("Disc Files ( *.bin *.img *.raw *.qcow2 *.qcow *.cow *.vdi *.vmdk *.vpc *.cloop );;All Files(*)")); if( string.size() > 0 ){ ui.filelineEdit->setText(string); } } void AddMedia::mediaChanged( int index ){ switch( index ){ case 0: ui.geo1spinBox->setVisible(1); ui.geo2spinBox->setVisible(1); ui.geo3spinBox->setVisible(1); ui.geo4spinBox->setVisible(1); ui.geometrycheckBox->setVisible(1); ui.geometrylabel->setVisible(1); break; case 1: ui.geo1spinBox->setVisible(0); ui.geo2spinBox->setVisible(0); ui.geo3spinBox->setVisible(0); ui.geo4spinBox->setVisible(0); ui.geometrycheckBox->setVisible(0); ui.geometrylabel->setVisible(0); break; case 2: break; } this->adjustSize(); } void AddMedia::interfaceChanged( int index ){ switch( index ){ case 0: // ide ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); ui.buslabel->setVisible(0); ui.busspinBox->setVisible(0); ui.unitspinBox->setVisible(0); ui.indexcomboBox->setVisible(1); ui.indexlabel->setVisible(1); ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); break; case 1: // scsi ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); ui.buslabel->setVisible(1); ui.busspinBox->setVisible(1); ui.unitspinBox->setVisible(1); ui.indexcomboBox->setVisible(0); ui.indexlabel->setVisible(0); ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); break; case 2: // sd ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); ui.buslabel->setVisible(0); ui.busspinBox->setVisible(0); ui.unitspinBox->setVisible(0); ui.indexcomboBox->setVisible(0); ui.indexlabel->setVisible(0); ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); break; case 3: // mtd ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); ui.buslabel->setVisible(0); ui.busspinBox->setVisible(0); ui.unitspinBox->setVisible(0); ui.indexcomboBox->setVisible(0); ui.indexlabel->setVisible(0); ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); break; case 4: // floppy ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); ui.buslabel->setVisible(0); ui.busspinBox->setVisible(0); ui.unitspinBox->setVisible(0); ui.indexcomboBox->setVisible(1); ui.indexlabel->setVisible(1); ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); break; case 5: // pflash ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); ui.buslabel->setVisible(0); ui.busspinBox->setVisible(0); ui.unitspinBox->setVisible(0); ui.indexcomboBox->setVisible(0); ui.indexlabel->setVisible(0); ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); break; case 6: // virtio ui.addresscomboBox->setVisible(0); ui.addresslabel->setVisible(0); ui.buslabel->setVisible(0); ui.busspinBox->setVisible(0); ui.unitspinBox->setVisible(0); ui.indexcomboBox->setVisible(0); ui.indexlabel->setVisible(0); ui.addresscomboBox->setVisible(1); ui.addresslabel->setVisible(1); break; } this->adjustSize(); } void AddMedia::serialChanged( int index ){ ui.seriallineEdit->setEnabled(index); } void AddMedia::geometryChanged( int index ){ ui.geo1spinBox->setEnabled(index); ui.geo2spinBox->setEnabled(index); ui.geo3spinBox->setEnabled(index); ui.geo4spinBox->setEnabled(index); } qemuctl/Setting.ui0000644000175000017500000000066211514252121013522 0ustar peterpeter SettingClass 0 0 693 436 Setting qemuctl/serialconnector.h0000644000175000017500000000316111517641730015121 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #ifndef SERIALCONNECTOR_H #define SERIALCONNECTOR_H #include #include #include #include #include #include #include #include #include #include #include #include "ui_serialconnector.h" class SerialConnector : public QWidget { Q_OBJECT public: SerialConnector(QWidget *parent = 0); ~SerialConnector(); const QString getCommand(); QVBoxLayout * getMainLayout(); public slots: void typeChanged( int type ); void tcpServerCheckBox( int state ); void done(); void cancel(); void fileChoose(); void pipeChoose(); void unixChoose(); signals: void newCommand( const QString & cmd ); private: Ui::SerialConnectorClass ui; QString command; void fillHostAdresses(); void fillParport(); void fillTTY(); }; #endif // SERIALCONNECTOR_H qemuctl/qemuctl.h0000644000175000017500000000737311517641730013412 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #ifndef QEMUCTL_H #define QEMUCTL_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ui_qemuctl.h" #include "QemuComunication.h" #include "debugmonitor.h" #include "ConsoleInput.h" #include "addmedia.h" #include "serialconnector.h" #include "QHexSpinbox.h" #include "QDiscFileDialog.h" #include #include #define MAX_PROPERTY_VALUE_LEN 4096 //static bool envir_utf8 = true; namespace QEMUCTL{ enum e { Save_Screenshot, Quit, Save_VM, Save_Sound, Stop_Sound, Singlestep, SinglestepOff, Pause, Continue, Power_Off, Reset, Commit, Quit_2, Makros_2, Strg_Alt_Delete, Strg_Alt_Backspace, Strg_Alt_F1, Strg_Alt_F2, Strg_Alt_F3, Strg_Alt_F4, Strg_Alt_F5, Strg_Alt_F6, Strg_Alt_F7, Strg_Alt_F8, Strg_Alt_F9, Strg_Alt_F10, Strg_Alt_F11, Strg_Alt_F12, Monitor_Shell, HelpMonitor, HelpQemu, HelpQemuctl, About_Qemuctl, About_Qt, About_Qemu }; } class qemuctl : public QMainWindow { Q_OBJECT public: qemuctl( QStringList * argv, QWidget *parent = 0); ~qemuctl(); void closeEvent(QCloseEvent *event); public slots: void embedError(QX11EmbedContainer::Error error); void embedClosed( int exitCode, QProcess::ExitStatus exitStatus ); void actionTriggered(const int & action ); void sendProc( QByteArray command ); void newAnswer( QStringList answer, bool ok ); void qemutrigger(); void sendCommand( const QString & cmd ); void gotAction( const QString & action ); void usbConSerial( const QString & action ); private: Ui::qemuctlClass ui; QProcess * qemuProcess; QX11EmbedContainer * qemuContainer; qint16 qemuPort; QString command; QString suspendfile; QString suspenddir; bool nowakeup; bool usecin; QStringList parameter; Display *disp; qint64 winid; void getXWinID(); char * get_property (Display *disp, Window win, Atom xa_prop_type, char *prop_name, unsigned long *size); char * get_window_title (Display *disp, Window win); int list_windows (Display *disp); Window * get_client_list (Display *disp, unsigned long *size); //char * get_output_str (char *str, bool is_utf8); char * get_window_class (Display *disp, Window win); QemuComunication * com; QSignalMapper * mapper; QSignalMapper * dynmapper; QTimer timer; ConsoleInput * conin; DebugMonitor * monitor; AddMedia * addmedia; SerialConnector * usbserialconnector; QLabel * usbserialvendoridlabel; QHexSpinbox * usbserialvendorid; QLabel * usbserialproductidlabel; QHexSpinbox * usbserialproductid; QString usbdir; QAction * savevm; QString lastguicommand; signals: void send( QString cmd ); }; #endif // QEMUCTL_H qemuctl/ConsoleInput.cpp0000644000175000017500000000255411517641723014713 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ /* * ConsoleInput.cpp * * Created on: Nov 8, 2010 * Author: peter */ #include "ConsoleInput.h" ConsoleInput::ConsoleInput() { running = true; } ConsoleInput::~ConsoleInput() { running = false; this->wait(); } void ConsoleInput::run(){ running = true; qDebug("ConsoleInput::run() start"); QFile in; in.open( stdin, ( QIODevice::ReadOnly | QIODevice::Unbuffered ) ); QByteArray input; int len; char * charinput = new char[1000]; while( running == true ){ if( ( len = in.read(charinput,999) ) > 0 ){ charinput[len] = 0; input = charinput; emit gotCin( input ); } usleep(100); } in.close(); qDebug("ConsoleInput::run() stop"); } qemuctl/qemuctl.cpp0000644000175000017500000011515012224311223013721 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #include "qemuctl.h" #include #include #include #include using namespace std; class WindowsMatchingPid { public: WindowsMatchingPid(Display *display, Window wRoot, unsigned long pid) { _display = display; _pid = pid; _atomPID = XInternAtom(display, "_NET_WM_PID", True); if(_atomPID != None) search(wRoot); } const list &result() const { return _result; } private: unsigned long _pid; Atom _atomPID; Display *_display; list _result; void search(Window w) { // Get the PID for the current Window. Atom type; int format; unsigned long nItems; unsigned long bytesAfter; unsigned char *propPID = 0; if(Success == XGetWindowProperty(_display, w, _atomPID, 0, 1, False, XA_CARDINAL, &type, &format, &nItems, &bytesAfter, &propPID)) { if(propPID != 0) { // If the PID matches, add this window to the result set. if(_pid == *((unsigned long *)propPID)) _result.push_back(w); XFree(propPID); } } // Recurse into child windows. Window wRoot; Window wParent; Window *wChild; unsigned int nChildren; if(XQueryTree(_display, w, &wRoot, &wParent, &wChild, &nChildren)) { for(unsigned int i = 0; i < nChildren; i++) search(wChild[i]); } } }; qemuctl::qemuctl( QStringList * argv, QWidget *parent) : QMainWindow(parent) { QDiscFileDialog * dfdialog = new QDiscFileDialog(); dfdialog->show(); winid = 0; bool name = false; ui.setupUi(this); usbdir = "/dev/bus/usb"; lastguicommand = ""; savevm = new QAction(tr("New Slot"),this); qemuContainer = new QX11EmbedContainer(); this->setCentralWidget(qemuContainer); connect(qemuContainer, SIGNAL(error(QX11EmbedContainer::Error)), this, SLOT(embedError(QX11EmbedContainer::Error))); // parsing commandline usecin = false; command = "qemu"; suspendfile = "suspend"; suspenddir = QDir::currentPath(); nowakeup = false; qemuPort = 6453; parameter = *argv; parameter.removeAt(0); this->setWindowTitle("QEMUCTL"); for( int i = 0; i < parameter.size(); i++ ){ // do it for qemu -monitor stdio if( parameter[i].compare( QString("-monitor") ) == 0 && parameter[i+1].compare( QString("stdio") ) == 0 ){ usecin = true; } else // change name to find qemu/kvm window if( parameter[i].compare( QString("-name") ) == 0 ){ i++; if( parameter.size() > i ){ this->setWindowTitle(QString("QEMUCTL (").append(parameter[i]).append(")")); parameter[i] = QString().sprintf( "QEMUCTL %lld", QApplication::applicationPid() ); name = true; } } else // change qemu/kvm executable ( default: /usr/bin/qemu ) if( parameter[i].compare( QString("-qemuctl-cmd") ) == 0 ){ if( parameter.size() > i ){ parameter.removeAt(i); command = parameter[i]; parameter.removeAt(i); i--; } } else // change qemu/kvm suspend file ( default: suspend ) if( parameter[i].compare( QString("-qemuctl-suspend-file") ) == 0 ){ if( parameter.size() > i ){ parameter.removeAt(i); suspendfile = parameter[i]; parameter.removeAt(i); i--; } } else // change qemu/kvm suspend dir ( default: current dir ) if( parameter[i].compare( QString("-qemuctl-suspend-dir") ) == 0 ){ if( parameter.size() > i ){ parameter.removeAt(i); suspenddir = parameter[i]; parameter.removeAt(i); i--; } } else // do not wakeup using default suspend file if( parameter[i].compare( QString("-qemuctl-nowakeup") ) == 0 ){ if( parameter.size() > i ){ nowakeup = true; parameter.removeAt(i); i--; } } else // change qemu/kvm monitor port ( default: 6453 ) if( parameter[i].compare( QString("-qemuctl-port") ) == 0 ){ if( parameter.size() > i ){ parameter.removeAt(i); qemuPort = parameter[i].toUShort(); parameter.removeAt(i); i--; } } } // name set ? if( name == false ){ parameter.push_back( QString("-name") ); parameter.push_back( QString().sprintf( "QEMUCTL %lld", QApplication::applicationPid() ) ); } // setting monitor port parameter.push_back( QString("-monitor") ); parameter.push_back( QString().sprintf( "tcp:127.0.0.1:%d,server,nowait", qemuPort ) ); // start qemu qemuProcess = new QProcess( qemuContainer ); connect(qemuProcess, SIGNAL(finished( int, QProcess::ExitStatus )), this, SLOT(embedClosed( int , QProcess::ExitStatus ))); qemuProcess->setProcessChannelMode(QProcess::ForwardedChannels); qemuProcess->setReadChannelMode(QProcess::ForwardedChannels); qemuProcess->start(command,parameter); // start cin input if( usecin == true ){ conin = new ConsoleInput(); connect( conin, SIGNAL(gotCin(QByteArray)), this, SLOT(sendProc(QByteArray)) ); conin->start(); } // monitor monitor = new DebugMonitor(); // new device dialog addmedia = new AddMedia(); // usb serial connector usbserialconnector = new SerialConnector(); QHBoxLayout * usbseriallayout = new QHBoxLayout(); usbserialvendoridlabel = new QLabel( tr("Vendor ID") ); usbserialvendorid = new QHexSpinbox(); usbserialvendorid->setValue(0x0403); usbserialproductidlabel = new QLabel( tr("Product ID") ); usbserialproductid = new QHexSpinbox(); usbserialproductid->setValue(0x6001); usbseriallayout->addWidget(usbserialvendoridlabel); usbseriallayout->addWidget(usbserialvendorid); usbseriallayout->addWidget(usbserialproductidlabel); usbseriallayout->addWidget(usbserialproductid); usbserialconnector->getMainLayout()->insertLayout( 0, usbseriallayout ); connect( ui.actionUSBSerial, SIGNAL(triggered()), usbserialconnector, SLOT(show())); connect( usbserialconnector, SIGNAL(newCommand( const QString & )), this, SLOT(usbConSerial( const QString & ))); // start connection to qemu server com = new QemuComunication(); com->setServer("127.0.0.1",qemuPort); connect( this, SIGNAL(send(QString)), com, SLOT(send(QString)), Qt::QueuedConnection ); connect( monitor, SIGNAL(send(QString)), com, SLOT(send(QString)), Qt::QueuedConnection ); connect( com, SIGNAL(newAnswer( QStringList, bool )), this, SLOT(newAnswer( QStringList, bool )), Qt::QueuedConnection ); connect( com, SIGNAL(newAnswer( QStringList, bool )), monitor, SLOT(newAnswer( QStringList, bool )), Qt::QueuedConnection ); com->start(); // search winid for 10s int timeout = 1000; while( ( this->winid == 0 ) && ( (timeout--) > 0 ) ){ QApplication::processEvents(); usleep(10); getXWinID(); } // embed xwindow if( this->winid != 0 ){ qemuContainer->embedClient(winid); } else { qDebug("Cant find QEMU/KVM Window"); } // start timer connect( &timer, SIGNAL(timeout()), this, SLOT(qemutrigger()) ); timer.start(3000); dynmapper = new QSignalMapper(this); connect( dynmapper, SIGNAL(mapped( const QString & )), this, SLOT(gotAction( const QString & )) ); mapper = new QSignalMapper(this); // connecting 2way commands connect( ui.menuMedia, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.menuStop_Record_Sound, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.menuDelete_VM_State, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.menuSave_VM_State, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.menuLoad_VM_State, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.menuInfo, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.menuUSBHost, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.menuUSBDisconnect, SIGNAL(aboutToShow()), mapper, SLOT(map()) ); connect( ui.actionUSBMouse, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionUSBKeyboard, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionUSBBraille, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionUSBTablet, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionUSBWacom, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionWatchdogReset, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionWatchdogShutdown, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionWatchdogPoweroff, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionWatchdogPause, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionWatchdogDebug, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionWatchdogNone, SIGNAL(triggered()), mapper, SLOT(map()) ); mapper->setMapping( ui.actionWatchdogReset, "watchdog_action reset" ); mapper->setMapping( ui.actionWatchdogShutdown, "watchdog_action shutdown" ); mapper->setMapping( ui.actionWatchdogPoweroff, "watchdog_action poweroff" ); mapper->setMapping( ui.actionWatchdogPause, "watchdog_action pause" ); mapper->setMapping( ui.actionWatchdogDebug, "watchdog_action debug" ); mapper->setMapping( ui.actionWatchdogNone, "watchdog_action none" ); connect( ui.actionBoot_A, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_B, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_C, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_D, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_E, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_F, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_G, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_H, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_I, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionBoot_J, SIGNAL(triggered()), mapper, SLOT(map()) ); mapper->setMapping( ui.actionBoot_A, "boot_set a" ); mapper->setMapping( ui.actionBoot_B, "boot_set b" ); mapper->setMapping( ui.actionBoot_C, "boot_set c" ); mapper->setMapping( ui.actionBoot_D, "boot_set d" ); mapper->setMapping( ui.actionBoot_E, "boot_set e" ); mapper->setMapping( ui.actionBoot_F, "boot_set f" ); mapper->setMapping( ui.actionBoot_G, "boot_set g" ); mapper->setMapping( ui.actionBoot_H, "boot_set h" ); mapper->setMapping( ui.actionBoot_I, "boot_set i" ); mapper->setMapping( ui.actionBoot_J, "boot_set j" ); mapper->setMapping( ui.menuMedia, "info block" ); mapper->setMapping( ui.menuStop_Record_Sound, "info capture" ); mapper->setMapping( ui.menuDelete_VM_State, "info snapshots" ); mapper->setMapping( ui.menuSave_VM_State, "info snapshots" ); mapper->setMapping( ui.menuLoad_VM_State, "info snapshots" ); mapper->setMapping( ui.menuInfo, "info" ); mapper->setMapping( ui.menuUSBHost, "info usbhost" ); mapper->setMapping( ui.menuUSBDisconnect, "info usb" ); mapper->setMapping( ui.actionUSBMouse, "usb_add mouse" ); mapper->setMapping( ui.actionUSBKeyboard, "usb_add keyboard" ); mapper->setMapping( ui.actionUSBBraille, "usb_add braille" ); mapper->setMapping( ui.actionUSBTablet, "usb_add tablet" ); mapper->setMapping( ui.actionUSBWacom, "usb_add wacom-tablet" ); // connecting 1 way commands connect( ui.actionSave_Screenshot, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionQuit, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( savevm, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionSave_Sound, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionSinglestep, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionSinglestepOff, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionPause, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionContinue, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionPower_Off, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionReset, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionCommit, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionQuit_2, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_Delete, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_Backspace, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F1, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F2, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F3, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F4, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F5, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F6, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F7, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F8, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F9, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F10, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F11, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionStrg_Alt_F12, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionMonitor_Shell, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionHelpMonitor, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionHelpQemu, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionHelpQemuctl, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionAbout_Qt, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionAbout_Qemu, SIGNAL(triggered()), mapper, SLOT(map()) ); connect( ui.actionAbout_Qemuctl, SIGNAL(triggered()), mapper, SLOT(map()) ); mapper->setMapping( ui.actionSave_Screenshot, QEMUCTL::Save_Screenshot ); mapper->setMapping( ui.actionQuit, QEMUCTL::Quit ); mapper->setMapping( savevm, QEMUCTL::Save_VM ); mapper->setMapping( ui.actionSave_Sound, QEMUCTL::Save_Sound ); mapper->setMapping( ui.actionSinglestep, QEMUCTL::Singlestep ); mapper->setMapping( ui.actionSinglestepOff, QEMUCTL::SinglestepOff ); mapper->setMapping( ui.actionPause, QEMUCTL::Pause ); mapper->setMapping( ui.actionContinue, QEMUCTL::Continue ); mapper->setMapping( ui.actionPower_Off, QEMUCTL::Power_Off ); mapper->setMapping( ui.actionReset, QEMUCTL::Reset ); mapper->setMapping( ui.actionCommit, QEMUCTL::Commit ); mapper->setMapping( ui.actionQuit_2, QEMUCTL::Quit_2 ); mapper->setMapping( ui.actionStrg_Alt_Delete, QEMUCTL::Strg_Alt_Delete ); mapper->setMapping( ui.actionStrg_Alt_Backspace, QEMUCTL::Strg_Alt_Backspace ); mapper->setMapping( ui.actionStrg_Alt_F1, QEMUCTL::Strg_Alt_F1 ); mapper->setMapping( ui.actionStrg_Alt_F2, QEMUCTL::Strg_Alt_F2 ); mapper->setMapping( ui.actionStrg_Alt_F3, QEMUCTL::Strg_Alt_F3 ); mapper->setMapping( ui.actionStrg_Alt_F4, QEMUCTL::Strg_Alt_F4 ); mapper->setMapping( ui.actionStrg_Alt_F5, QEMUCTL::Strg_Alt_F5 ); mapper->setMapping( ui.actionStrg_Alt_F6, QEMUCTL::Strg_Alt_F6 ); mapper->setMapping( ui.actionStrg_Alt_F7, QEMUCTL::Strg_Alt_F7 ); mapper->setMapping( ui.actionStrg_Alt_F8, QEMUCTL::Strg_Alt_F8 ); mapper->setMapping( ui.actionStrg_Alt_F9, QEMUCTL::Strg_Alt_F9 ); mapper->setMapping( ui.actionStrg_Alt_F10, QEMUCTL::Strg_Alt_F10 ); mapper->setMapping( ui.actionStrg_Alt_F11, QEMUCTL::Strg_Alt_F11 ); mapper->setMapping( ui.actionStrg_Alt_F12, QEMUCTL::Strg_Alt_F12 ); mapper->setMapping( ui.actionMonitor_Shell, QEMUCTL::Monitor_Shell ); mapper->setMapping( ui.actionHelpQemuctl, QEMUCTL::HelpQemuctl ); mapper->setMapping( ui.actionHelpQemu, QEMUCTL::HelpQemu ); mapper->setMapping( ui.actionHelpMonitor, QEMUCTL::HelpMonitor ); mapper->setMapping( ui.actionAbout_Qt, QEMUCTL::About_Qt); mapper->setMapping( ui.actionAbout_Qemu, QEMUCTL::About_Qemu); mapper->setMapping( ui.actionAbout_Qemuctl, QEMUCTL::About_Qemuctl); connect( mapper, SIGNAL(mapped( const int & )), this, SLOT(actionTriggered( const int & )) ); connect( mapper, SIGNAL(mapped( const QString & )), this, SLOT(sendCommand( const QString & )) ); } qemuctl::~qemuctl() { delete( mapper ); delete( com ); delete( qemuContainer ); delete( qemuProcess ); delete( conin ); } void qemuctl::usbConSerial( const QString & action ){ QString ret = "usb_add serial:vendorid="; ret.append( usbserialvendorid->text() ); ret.append( ",productid=" ); ret.append( usbserialproductid->text() ); ret.append(":"); ret.append(action); emit send(ret); } void qemuctl::sendProc( QByteArray command ){ qemuProcess->write(command); } void qemuctl::actionTriggered(const int & action ){ qDebug("actionTriggered"); QString tempfile; switch( action ){ case QEMUCTL::Save_Screenshot: tempfile = QFileDialog::getSaveFileName( this, tr("QEMUCTL - Select PPM Image File"), "", tr("PPM Files (*.ppm)")); if( tempfile.isEmpty() == false ){ emit send(QString().sprintf("screendump \"%s\"",tempfile.toAscii().data())); } break; case QEMUCTL::Save_VM: bool ok; tempfile = QInputDialog::getText(NULL,tr("Save VM State"),tr("Input name for saved state"),QLineEdit::Normal,"",&ok); if( ok == true ){ emit send(QString().sprintf("savevm \"%s\"",tempfile.toAscii().data())); } break; case QEMUCTL::Quit: emit send("quit"); break; case QEMUCTL::Save_Sound: tempfile = QFileDialog::getSaveFileName( this, tr("QEMUCTL - Select Sound Capture File"), "", tr("WAV Files (*.wav)")); if( tempfile.isEmpty() == false ){ emit send(QString().sprintf("wavcapture \"%s\"",tempfile.toAscii().data())); } break; case QEMUCTL::Stop_Sound: emit send("info capture"); break; case QEMUCTL::Singlestep: emit send("singlestep"); break; case QEMUCTL::SinglestepOff: emit send("singlestep off"); break; case QEMUCTL::Pause: emit send("stop"); emit send("info status"); break; case QEMUCTL::Continue: emit send("cont"); emit send("info status"); break; case QEMUCTL::Power_Off: emit send("system_powerdown"); break; case QEMUCTL::Reset: emit send("system_reset"); break; case QEMUCTL::Commit: emit send("commit all"); break; case QEMUCTL::Quit_2: break; case QEMUCTL::Makros_2: break; case QEMUCTL::Strg_Alt_Delete: emit send("sendkey ctrl-alt-delete"); break; case QEMUCTL::Strg_Alt_Backspace: emit send("sendkey ctrl-alt-backspace"); break; case QEMUCTL::Strg_Alt_F1: emit send("sendkey ctrl-alt-f1"); break; case QEMUCTL::Strg_Alt_F2: emit send("sendkey ctrl-alt-f2"); break; case QEMUCTL::Strg_Alt_F3: emit send("sendkey ctrl-alt-f3"); break; case QEMUCTL::Strg_Alt_F4: emit send("sendkey ctrl-alt-f4"); break; case QEMUCTL::Strg_Alt_F5: emit send("sendkey ctrl-alt-f5"); break; case QEMUCTL::Strg_Alt_F6: emit send("sendkey ctrl-alt-f6"); break; case QEMUCTL::Strg_Alt_F7: emit send("sendkey ctrl-alt-f7"); break; case QEMUCTL::Strg_Alt_F8: emit send("sendkey ctrl-alt-f8"); break; case QEMUCTL::Strg_Alt_F9: emit send("sendkey ctrl-alt-f9"); break; case QEMUCTL::Strg_Alt_F10: emit send("sendkey ctrl-alt-f10"); break; case QEMUCTL::Strg_Alt_F11: emit send("sendkey ctrl-alt-f11"); break; case QEMUCTL::Strg_Alt_F12: emit send("sendkey ctrl-alt-f12"); break; case QEMUCTL::Monitor_Shell: monitor->show(); break; case QEMUCTL::HelpMonitor: lastguicommand = "help"; emit send("help"); break; case QEMUCTL::HelpQemu: //QProcess::execute("man qemu"); break; case QEMUCTL::HelpQemuctl: //QProcess::execute("man qemuctl"); break; case QEMUCTL::About_Qemuctl: QMessageBox::about(NULL,tr("QEMUCTL - About QEMUCTL"),tr("" "" "" "

About Qemuctl

" "http://qemuctl.sourceforge.net

" "(c) by Peter Rustler" "")); break; case QEMUCTL::About_Qt: QMessageBox::aboutQt(NULL,tr("QEMUCTL - About QT")); break; case QEMUCTL::About_Qemu: QMessageBox::about(NULL,tr("QEMUCTL - About QEMU"),tr("" "" "" "

About Qemu

" "http://www.qemu.org

" "(c) by Fabrice Bellard" "")); break; } } void qemuctl::sendCommand( const QString & cmd ){ emit send(cmd); } void qemuctl::embedError(QX11EmbedContainer::Error error) { switch (error) { case QX11EmbedContainer::InvalidWindowID: qDebug("Invalid window ID"); break; default: qDebug("Unknown error"); break; } } void qemuctl::qemutrigger(){ //emit send("info status"); //this->send("info block"); } void qemuctl::gotAction( const QString & action ){ qDebug( "qemuctl::gotAction: %s", action.toAscii().data() ); QString temp = action; // capturestop if( temp.indexOf("capturestop ") == 0 ){ int pos = temp.indexOf("]"); temp.remove( pos, 1000 ); pos = temp.indexOf("["); temp.remove( 0, (pos+1) ); emit send(QString("stopcapture ").append(temp)); } else // usb host add if( temp.indexOf("usbhostadd ") == 0 ){ int pos; pos = temp.indexOf("."); if( pos > 11 ){ int bus,device; bus = temp.mid(11,(pos-11)).toInt(); device = temp.mid(pos+1,2).toInt(); //qDebug("qemuctl::gotAction: usbhostadd %d %d",bus,device); QString devicedir = usbdir; devicedir.append("/%3.3d/%3.3d"); devicedir = QString().sprintf(devicedir.toAscii().data(),bus,device); qDebug("qemuctl::gotAction: devicedir %s",devicedir.toAscii().data()); QString cmd = QString().sprintf("usb_add host:%d.%d",bus,device); #if QT_VERSION >= 0x040600 QFileInfo info(devicedir); if( ! ( info.isReadable() && info.isWritable() ) ){ QString message = tr("You have no rights to access the usb bus.\nI am trying to become the owner of the usbdevice.\nRoot passwort ?"); QString user = QProcessEnvironment::systemEnvironment().value("USER"); QString command = QString().sprintf("gksu --message \"%s\" \"chown -c %s %s\"",message.toAscii().data(),user.toAscii().data(),devicedir.toAscii().data()); qDebug("qemuctl::gotAction: command %s",command.toAscii().data()); int ret = QProcess::execute(command); if( ret == 0 ){ emit send(cmd); } } else { emit send(cmd); } #else emit send(cmd); #endif } } else // removemedia if( temp.indexOf("removemedia ") == 0 ){ temp.remove( temp.indexOf(":"), 1000 ); temp.remove( 0, 12 ); temp.push_front("eject -f "); emit send(temp); } else // commitmedia if( temp.indexOf("commitmedia ") == 0 ){ temp.remove( temp.indexOf(":"), 1000 ); temp.remove( 0, 12 ); temp.push_front("commit "); emit send(temp); } else // insertmedia if( temp.indexOf("insertmedia ") == 0 ){ QString cmd = temp; QString string; cmd.remove( temp.indexOf(":"), 1000 ); cmd.remove( 0, 12 ); cmd.push_front("change "); cmd.push_back(" \""); if ( temp.indexOf("type=cdrom") >= 0 ) { string = QFileDialog::getOpenFileName( this, tr("QEMUCTL - Select CD Image File"), "", tr("Disc Files ( *.bin *.img *.raw *.iso );;All Files(*)")); } else { string = QFileDialog::getOpenFileName( this, tr("QEMUCTL - Select Disc Image File"), "", tr("Disc Files ( *.bin *.img *.raw *.qcow2 *.qcow *.cow *.vdi *.vmdk *.vpc *.cloop );;All Files(*)")); } if( string.size() > 0 ){ cmd.append(string); cmd.push_back("\""); emit send(cmd); } } else // info menu if( temp.indexOf("info ") == 0 ){ int pos = temp.indexOf(" -- "); temp.remove( pos, 1000 ); lastguicommand = temp; emit send(temp); } } void qemuctl::newAnswer( QStringList answer, bool ok ){ // was gui command ? if( lastguicommand.compare(answer[0]) == 0 ){ lastguicommand = ""; QMessageBox::about(NULL,answer[0],answer.join("\n")); } // info snapshots if( ( ok == true ) && ( answer.size() > 0 ) && ( answer[0].compare("info snapshots") == 0 ) ){ ui.menuSave_VM_State->clear(); ui.menuSave_VM_State->addAction(savevm); ui.menuLoad_VM_State->clear(); ui.menuDelete_VM_State->clear(); int pos; QString vmid; for( int i = 4; i < answer.size(); i++ ){ pos = answer[i].indexOf(" "); vmid = answer[i].mid(0,pos); QAction * ac1 = new QAction( answer[i], ui.menuSave_VM_State ); connect( ac1, SIGNAL(triggered()), mapper, SLOT(map()) ); mapper->setMapping( ac1, QString("savevm ").append( vmid ) ); ui.menuSave_VM_State->addAction(ac1); QAction * ac2 = new QAction( answer[i], ui.menuLoad_VM_State ); connect( ac2, SIGNAL(triggered()), mapper, SLOT(map()) ); mapper->setMapping( ac2, QString("loadvm ").append( vmid ) ); ui.menuLoad_VM_State->addAction(ac2); QAction * ac3 = new QAction( answer[i], ui.menuDelete_VM_State ); connect( ac3, SIGNAL(triggered()), mapper, SLOT(map()) ); mapper->setMapping( ac3, QString("delvm ").append( vmid ) ); ui.menuDelete_VM_State->addAction(ac3); } } else // info usbhost if( ( ok == true ) && ( answer.size() > 0 ) && ( answer[0].compare("info usbhost") == 0 ) ){ ui.menuUSBHost->clear(); int pos,end; QString device, venor, menu; for( int i = 1; i < answer.size(); i+=2 ){ if( answer[i].indexOf("husb: using sys file-system with ") == 0 ){ usbdir = answer[i].mid(33,-1); qDebug("usbdir = %s",usbdir.toAscii().data()); } if( ( pos = ( answer[i].indexOf("Device ") + 7 ) ) >= 7 ){ if( ( (i+1) < answer.size() ) && ( answer[i+1].indexOf("Hub:") < 0 ) ){ end = answer[i].indexOf(","); device = answer[i].mid(pos,(end-pos)); menu = QString(device).append(answer[i+1]); QAction * ac = new QAction( menu, ui.menuUSBHost ); connect( ac, SIGNAL(triggered()), dynmapper, SLOT(map()) ); dynmapper->setMapping( ac, QString("usbhostadd ").append( device ) ); ui.menuUSBHost->addAction(ac); } } else { i--; } } } else // info usb if( ( ok == true ) && ( answer.size() > 0 ) && ( answer[0].compare("info usb") == 0 ) ){ ui.menuUSBDisconnect->clear(); int pos,end; QString device; for( int i = 1; i < answer.size(); i++ ){ if( ( pos = ( answer[i].indexOf("Device ") + 7 ) ) >= 7 ){ end = answer[i].indexOf(","); device = answer[i].mid(pos,(end-pos)); QAction * ac = new QAction( answer[i], ui.menuUSBDisconnect ); connect( ac, SIGNAL(triggered()), mapper, SLOT(map()) ); mapper->setMapping( ac, QString("usb_del ").append( device ) ); ui.menuUSBDisconnect->addAction( ac ); } } } else // info status if( ( ok == true ) && ( answer.size() > 1 ) && ( answer[0].compare("info status") == 0 ) ){ if( answer[1].indexOf("VM status:") == 0 ){ ui.statusbar->showMessage( answer[1] ); } } else // info capture if( ( ok == true ) && ( answer.size() > 0 ) && ( answer[0].compare("info capture") == 0 ) ){ ui.menuStop_Record_Sound->clear(); for( int i = 1; i < answer.size(); i++ ){ QAction * ac = new QAction( answer[i], ui.menuStop_Record_Sound ); connect( ac, SIGNAL(triggered()), dynmapper, SLOT(map()) ); dynmapper->setMapping( ac, QString("capturestop ").append( answer[i]) ); ui.menuStop_Record_Sound->addAction(ac); } } else // info block if( ( ok == true ) && ( answer.size() > 0 ) && ( answer[0].compare("info block") == 0 ) ){ ui.menuMedia->clear(); for( int i = 1; i < answer.size(); i++ ){ int pos = answer[i].indexOf(": "); QString caption = answer[i]; caption.remove(pos,1000); QString tooltip = answer[i]; tooltip.remove( 0, ( pos + 2 ) ); QMenu * menu = new QMenu(caption,ui.menuMedia); //menu->setToolTip( tooltip ); QString iconstr = answer[i]; int iconpos = iconstr.indexOf("type=") + 5; int iconlen = iconstr.indexOf(" ",iconpos) - iconpos; iconstr = iconstr.mid(iconpos,iconlen); iconstr.prepend(":icons/"); iconstr.push_back(".png"); QIcon type = QIcon(iconstr); QString acstr = answer[i]; acstr.remove(iconpos-5,iconlen+6); acstr.remove(0,acstr.indexOf(":")+2); QAction * ac = new QAction( type, acstr, menu ); ac->setIconVisibleInMenu(true); menu->addAction(ac); menu->addSeparator(); QAction * ac1 = new QAction( tr("Eject Media"), menu ); ac1->setToolTip( tooltip ); connect( ac1, SIGNAL(triggered()), dynmapper, SLOT(map()) ); dynmapper->setMapping( ac1, QString("removemedia ").append(answer[i]) ); QAction * ac2 = new QAction( tr("Commit"), menu ); ac2->setToolTip( tooltip ); connect( ac2, SIGNAL(triggered()), dynmapper, SLOT(map()) ); dynmapper->setMapping( ac2, QString("commitmedia ").append(answer[i]) ); QAction * ac3 = new QAction( tr("Insert Media"), menu ); ac3->setToolTip( tooltip ); connect( ac3, SIGNAL(triggered()), dynmapper, SLOT(map()) ); dynmapper->setMapping( ac3, QString("insertmedia ").append(answer[i]) ); if( answer[i].indexOf("locked=1") >=0 ){ ac1->setText( ac1->text().append( tr(" ( force )") ) ); ac3->setText( ac3->text().append( tr(" ( force )") ) ); } if( answer[i].indexOf("removable=1") >=0 ){ menu->addAction(ac3); if( answer[i].indexOf("[not inserted]") < 0 ){ menu->addAction(ac1); } } if( answer[i].indexOf("[not inserted]") < 0 && answer[i].indexOf("backing_file=") >= 0 ){ menu->addAction(ac2); } ui.menuMedia->addMenu( menu ); } static QAction * am = new QAction( tr("Add media"), this ); ui.menuMedia->addAction( am ); connect( am, SIGNAL(triggered()), addmedia, SLOT(show())); } else // info if( ( ok == true ) && ( answer.size() > 0 ) && ( answer[0].compare("info") == 0 ) ){ ui.menuInfo->clear(); for( int i = 1; i < answer.size(); i++ ){ QAction * action = new QAction( answer[i], ui.menuInfo ); connect( action, SIGNAL(triggered()), dynmapper, SLOT(map()) ); dynmapper->setMapping( action, answer[i] ); ui.menuInfo->addAction( action ); } } for( int i = 0; i < answer.size(); i++){ qDebug( "qemuctl::newAnswer \"%s\"", answer[i].toAscii().data() ); } } void qemuctl::embedClosed( int exitCode, QProcess::ExitStatus exitStatus ){ if( exitStatus == QProcess::CrashExit ){ QProcess::ProcessError error = qemuProcess->error(); switch( error ){ case QProcess::FailedToStart: qDebug("Failed To Start"); break; case QProcess::Crashed: qDebug("Crashed"); break; case QProcess::Timedout: qDebug("Timedout"); break; case QProcess::WriteError: qDebug("WriteError"); break; case QProcess::ReadError: qDebug("ReadError"); break; case QProcess::UnknownError: default: qDebug("UnknownError"); break; } } exit( exitCode ); } void qemuctl::closeEvent(QCloseEvent *event){ qemuProcess->terminate(); //event->accept(); event->ignore(); } void qemuctl::getXWinID(){ if (! (disp = XOpenDisplay(NULL))) { qDebug("Cannot open display."); exit(1); } list_windows(disp); XCloseDisplay(disp); } int qemuctl::list_windows (Display *disp) {/*{{{*/ Window *client_list; unsigned long client_list_size; unsigned int i; int max_client_machine_len = 0; unsigned long pid = qemuProcess->pid(); Window rootw = XDefaultRootWindow(disp); WindowsMatchingPid match(disp, rootw, pid); const list &result = match.result(); list::const_iterator it; for(list::const_iterator it = result.begin(); it != result.end(); it++) { QString qtitle; qtitle = get_window_title(disp, *it); qDebug("Window %s", get_window_title(disp, *it)); if( qtitle.indexOf( QString().sprintf( "QEMUCTL %lld", QApplication::applicationPid() ) ) >= 0 ) { winid = *it; return EXIT_SUCCESS; } } return EXIT_FAILURE; #if 0 if ((client_list = get_client_list(disp, &client_list_size)) == NULL) { return EXIT_FAILURE; } /* find the longest client_machine name */ for (i = 0; i < client_list_size / sizeof(Window); i++) { char *client_machine; if ((client_machine = get_property(disp, client_list[i], XA_STRING, (char*)("WM_CLIENT_MACHINE"), NULL))) { max_client_machine_len = strlen(client_machine); } //free(client_machine); } /* print the list */ for (i = 0; i < client_list_size / sizeof(Window); i++) { char *title_utf8 = get_window_title(disp, client_list[i]); /* UTF8 */ //char *title_out = get_output_str(title_utf8, TRUE); char *title_out = title_utf8; char *client_machine; //char *class_out = get_window_class(disp, client_list[i]); /* UTF8 */ unsigned long *pid; unsigned long *desktop; int x, y, junkx, junky; unsigned int wwidth, wheight, bw, depth; Window junkroot; /* desktop ID */ if ((desktop = (unsigned long *)get_property(disp, client_list[i], XA_CARDINAL, (char*)("_NET_WM_DESKTOP"), NULL)) == NULL) { desktop = (unsigned long *)get_property(disp, client_list[i], XA_CARDINAL, (char*)("_WIN_WORKSPACE"), NULL); } /* client machine */ client_machine = get_property(disp, client_list[i], XA_STRING, (char*)("WM_CLIENT_MACHINE"), NULL); /* pid */ pid = (unsigned long *)get_property(disp, client_list[i], XA_CARDINAL, (char*)("_NET_WM_PID"), NULL); /* geometry */ XGetGeometry (disp, client_list[i], &junkroot, &junkx, &junky, &wwidth, &wheight, &bw, &depth); XTranslateCoordinates (disp, client_list[i], junkroot, junkx, junky, &x, &y, &junkroot); /* special desktop ID -1 means "all desktops", so we have to convert the desktop value to signed long */ //printf("0x%.8lx %2ld", client_list[i], desktop ? (signed long)*desktop : 0); //if (options.show_pid) { //printf(" %-6lu", pid ? *pid : 0); //} //if (options.show_geometry) { //printf(" %-4d %-4d %-4d %-4d", x, y, wwidth, wheight); //} //if (options.show_class) { //printf(" %-20s ", class_out ? class_out : "N/A"); //} //printf(" %*s %s\n", max_client_machine_len, client_machine ? client_machine : "N/A", title_out ? title_out : "N/A" ); QString qtitle(title_out); if( qtitle.indexOf( QString().sprintf( "QEMUCTL %lld", QApplication::applicationPid() ) ) >= 0 ){ winid = client_list[i]; //this->centralWidget()->setMinimumSize(wwidth,wheight); //this->centralWidget()->setMaximumSize(wwidth,wheight); } ////free(title_utf8); ////free(title_out); ////free(desktop); ////free(client_machine); ////free(class_out); ////free(pid); } ////free(client_list); return EXIT_SUCCESS; #endif }/*}}}*/ char * qemuctl::get_window_title (Display *disp, Window win) {/*{{{*/ char *title_utf8; char *wm_name; char *net_wm_name; wm_name = get_property(disp, win, XA_STRING, (char*)("WM_NAME"), NULL); net_wm_name = get_property(disp, win, XInternAtom(disp, (char*)("UTF8_STRING"), False), (char*)("_NET_WM_NAME"), NULL); if (net_wm_name) { //title_utf8 = g_strdup(net_wm_name); title_utf8 = net_wm_name; } else { if (wm_name) { //title_utf8 = g_locale_to_utf8(wm_name, -1, NULL, NULL, NULL); title_utf8 = wm_name; } else { title_utf8 = NULL; } } //free(wm_name); //free(net_wm_name); return title_utf8; }/*}}}*/ char * qemuctl::get_property (Display *disp, Window win, /*{{{*/ Atom xa_prop_type, char *prop_name, unsigned long *size) { Atom xa_prop_name; Atom xa_ret_type; int ret_format; unsigned long ret_nitems; unsigned long ret_bytes_after; unsigned long tmp_size; unsigned char *ret_prop; char *ret; xa_prop_name = XInternAtom(disp, prop_name, False); /* MAX_PROPERTY_VALUE_LEN / 4 explanation (XGetWindowProperty manpage): * * long_length = Specifies the length in 32-bit multiples of the * data to be retrieved. */ if (XGetWindowProperty(disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False, xa_prop_type, &xa_ret_type, &ret_format, &ret_nitems, &ret_bytes_after, &ret_prop) != Success) { //p_verbose("Cannot get %s property.\n", prop_name); return NULL; } if (xa_ret_type != xa_prop_type) { //p_verbose("Invalid type of %s property.\n", prop_name); XFree(ret_prop); return NULL; } /* null terminate the result to make string handling easier */ tmp_size = (ret_format / 8) * ret_nitems; //ret = malloc(tmp_size + 1); ret = new char[tmp_size + 1]; memcpy(ret, ret_prop, tmp_size); ret[tmp_size] = '\0'; if (size) { *size = tmp_size; } XFree(ret_prop); return ret; }/*}}}*/ Window * qemuctl::get_client_list (Display *disp, unsigned long *size) {/*{{{*/ Window *client_list; if ((client_list = (Window *)get_property(disp, DefaultRootWindow(disp), XA_WINDOW, (char*)("_NET_CLIENT_LIST"), size)) == NULL) { if ((client_list = (Window *)get_property(disp, DefaultRootWindow(disp), XA_CARDINAL, (char*)("_WIN_CLIENT_LIST"), size)) == NULL) { fputs("Cannot get client list properties. \n" "(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)" "\n", stderr); return NULL; } } return client_list; }/*}}}*/ //char * qemuctl::get_output_str (char *str, bool is_utf8) {/*{{{*/ // return str; //}/*}}}*/ char * qemuctl::get_window_class (Display *disp, Window win) {/*{{{*/ char *class_utf8; char *wm_class; unsigned long size; wm_class = get_property(disp, win, XA_STRING, (char*)("WM_CLASS"), &size); if (wm_class) { char *p_0 = strchr(wm_class, '\0'); if (wm_class + size - 1 > p_0) { *(p_0) = '.'; } //class_utf8 = g_locale_to_utf8(wm_class, -1, NULL, NULL, NULL); class_utf8 = wm_class; } else { class_utf8 = NULL; } //free(wm_class); return class_utf8; }/*}}}*/ qemuctl/QDiscFileDialog.h0000644000175000017500000000201112224310433014630 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #ifndef QDISCFILEDIALOG_H #define QDISCFILEDIALOG_H #include #include "ui_QDiscFileDialog.h" class QDiscFileDialog : public QWidget { Q_OBJECT public: QDiscFileDialog(QWidget *parent = 0); ~QDiscFileDialog(); private: Ui::QDiscFileDialogClass ui; }; #endif // QDISCFILEDIALOG_H qemuctl/addmedia.ui0000644000175000017500000001351311467667752013667 0ustar peterpeter AddMediaClass 0 0 727 528 QEMUCTL - Add Media :/icon.png:/icon.png QFormLayout::AllNonFixedFieldsGrow Filename Fileformat Serial Number of Device Enabled Media Interface Bus ID / Unit ID Index ( hda,hdb ...) Geometry ( cylinder, heads, sectors, [ trans ] ) Enabled Cache Qemu IO Pci Address Snapshot Mode Enabled Cancel Done Select qemuctl/QHexSpinbox.cpp0000644000175000017500000000220711517641723014474 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ /* * QHexSpinbox.cpp * * Created on: Dec 14, 2010 * Author: peter */ #include "QHexSpinbox.h" QHexSpinbox::QHexSpinbox( QWidget * parent ) : QSpinBox(parent) { this->setMaximum(0xffff); } QHexSpinbox::~QHexSpinbox() { } int QHexSpinbox::valueFromText( const QString & text ) const{ bool ok; return text.toInt(&ok, 16); } QString QHexSpinbox::textFromValue( int value ) const{ return QString().sprintf( "%4.4x",value ); } qemuctl/qemuctl.pro0000644000175000017500000000143212224310433013736 0ustar peterpeterTEMPLATE = app TARGET = qemuctl QT += core \ gui \ network CONFIG += debug \ console HEADERS += QDiscFileDialog.h \ Setting.h \ QHexSpinbox.h \ serialconnector.h \ addmedia.h \ debugmonitor.h \ ConsoleInput.h \ QemuComunication.h \ qemuctl.h SOURCES += QDiscFileDialog.cpp \ Setting.cpp \ QHexSpinbox.cpp \ serialconnector.cpp \ addmedia.cpp \ debugmonitor.cpp \ ConsoleInput.cpp \ QemuComunication.cpp \ main.cpp \ qemuctl.cpp FORMS += QDiscFileDialog.ui \ Setting.ui \ serialconnector.ui \ addmedia.ui \ debugmonitor.ui \ qemuctl.ui RESOURCES += qemuctl.qrc INCLUDEPATH += /usr/include/ \ /usr/include/X11/ LIBS += -lX11 \ -lXext target.path += $$[QT_INSTALL_BINS] INSTALLS += target qemuctl/QemuComunication.cpp0000644000175000017500000000570412224310433015534 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ /* * QemuComunication.cpp * * Created on: Nov 5, 2010 * Author: peter */ #include "QemuComunication.h" QemuComunication::QemuComunication(){ stop = false; timeout = 5000; socket = NULL; } QemuComunication::~QemuComunication() { this->quit(); } void QemuComunication::setServer( QString host, quint16 port ){ mutex.lock(); this->host = host; this->port = port; mutex.unlock(); } void QemuComunication::send( QString comand ){ //this->command.lock(); qDebug("QemuComunication::send: %s", comand.toAscii().data() ); if( socket->isWritable() && this->isRunning() ){ this->command.lock(); comand.append( '\n' ); const QByteArray array = comand.toAscii(); socket->write(array); } } void QemuComunication::readSocket(){ int len; int pos; int timeout = 100; char * input = new char[10000]; QByteArray array; while( ( pos = array.indexOf("\n(qemu)") ) < 0 && timeout > 0 ){ if( ( len = socket->read(input,9999) ) > 0 ){ input[len] = 0; array.append(input); } usleep(10); timeout--; } QStringList ret = QString(array).split( "\r\n", QString::KeepEmptyParts ); int parse; for( int i = 0; i < ret.size(); i++ ){ parse = ret[i].lastIndexOf("\033[D"); if( parse >= 0 ){ ret[i].remove(0,parse+3); } parse = ret[i].indexOf("\033[K"); if( parse >= 0 ){ ret[i].remove(parse,3); } } if( pos > 0 ){ if( ret.size() > 1 ){ qDebug( "found %d %d", pos, ret.size() ); ret.pop_back(); emit newAnswer( ret, true ); this->command.unlock(); } } else { if( ret.size() > 0 ){ if( ! ( ret.size() == 1 && ret[0].isEmpty() == true ) ){ qDebug( "found %d %d", pos, ret.size() ); emit newAnswer( ret, false ); this->command.unlock(); } } } } void QemuComunication::run(){ sleep( 1 ); this->array = new QByteArray(); this->socket = new QTcpSocket(); connect( socket, SIGNAL(readyRead()), this, SLOT(readSocket()) ); mutex.lock(); QString serverName = host; quint16 serverPort = port; mutex.unlock(); socket->connectToHost( serverName, serverPort ); if (!socket->waitForConnected(timeout)) { emit error(socket->error(), socket->errorString()); qDebug( "QemuComunication: %s", socket->errorString().toAscii().data() ); return; } exec(); } qemuctl/main.cpp0000644000175000017500000000332611517641723013213 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #include #include #include #include /* #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QX11EmbedContainer frame; QProcess mplayer; mplayer.start("/usr/bin/qemu", QStringList("-wid") << QString::number(frame.winId()) << "http://blip.tv/file/get/Lc-BdaleGarbee394.OGG"); frame.resize(800,600); frame.show(); return app.exec(); }*/ #include #include #include #include "qemuctl.h" int main(int argc, char *argv[]) { QStringList * arguments = new QStringList(); for( int i = 0; i < argc; i++ ){ arguments->append(QString::fromLocal8Bit(argv[i])); } QApplication a(argc, argv); QApplication::setOrganizationName("Qemuctl"); QCoreApplication::setOrganizationDomain("qemuctl.sourceforge.net"); QCoreApplication::setApplicationName("Qemuctl"); Q_INIT_RESOURCE(qemuctl); qemuctl w(arguments); w.show(); return a.exec(); } qemuctl/QDiscFileDialog.cpp0000644000175000017500000000156511517641723015215 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #include "QDiscFileDialog.h" QDiscFileDialog::QDiscFileDialog(QWidget *parent) : QWidget(parent) { ui.setupUi(this); } QDiscFileDialog::~QDiscFileDialog() { } qemuctl/COPYING0000644000175000017500000010451311517636725012624 0ustar peterpeter GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . qemuctl/qemuctl.ui0000644000175000017500000004504711516647133013602 0ustar peterpeter qemuctlClass 0 0 800 600 QEMUCTL :/icons/icon.png:/icons/icon.png 0 0 800 27 &File Load VM State Save VM State Delete VM State false Stop Record Sound false H&ardware USB Connect Native from Host Disconnect Boot Device Watchdog Action &Send Keys Makros Status and &Debug Info &Help &Media &Info Se&ttings Qemu size Save Screenshot QAction::TextHeuristicRole false :/icons/exit.png:/icons/exit.png Quit true Pause Continue Power Off Reset Commit VM State Quit Strg-Alt-Delete Strg-Alt-Backspace Strg-Alt-F1 Strg-Alt-F2 Strg-Alt-F3 Strg-Alt-F4 Strg-Alt-F5 Strg-Alt-F6 Strg-Alt-F7 Strg-Alt-F8 Strg-Alt-F9 Strg-Alt-F10 Strg-Alt-F11 Strg-Alt-F12 Monitor Shell Qemu Commandline Qemuctl Info Default Default Default Eject Eject Eject Qemu Monitor Qemuctl Commandline - - false :/icons/player_record.png:/icons/player_record.png Start Record Sound true Start Gdbserver :/icons/icon.png:/icons/icon.png About Qemuctl true About_Qt About Qemu false :/icons/input-mouse.png:/icons/input-mouse.png Mouse true :/icons/input-tablet.png:/icons/input-tablet.png Tablet true :/icons/input-tablet.png:/icons/input-tablet.png Wacom Tablet true :/icons/input-keyboard.png:/icons/input-keyboard.png Keyboard true Braille true Serial true :/icons/gnome-dev-ethernet.png:/icons/gnome-dev-ethernet.png Network true :/icons/bluetooth.png:/icons/bluetooth.png Bluetooth true :/icons/harddrive.png:/icons/harddrive.png Disc true A B C D E F G H I J Reset Shutdown Poweroff Pause Debug None Singlestep On Singlestep Off 640x480 800x600 1024x768 Qemuctl qemuctl/ConsoleInput.h0000644000175000017500000000216111517641730014350 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ /* * ConsoleInput.h * * Created on: Nov 8, 2010 * Author: peter */ #ifndef CONSOLEINPUT_H_ #define CONSOLEINPUT_H_ #include #include #include #include class ConsoleInput: public QThread { Q_OBJECT public: ConsoleInput(); virtual ~ConsoleInput(); void run(); private: bool running; signals: void gotCin( QByteArray array ); }; #endif /* CONSOLEINPUT_H_ */ qemuctl/Setting.h0000644000175000017500000000171112224310433013330 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #ifndef SETTING_H #define SETTING_H #include #include "ui_Setting.h" class Setting : public QWidget { Q_OBJECT public: Setting(QWidget *parent = 0); ~Setting(); private: Ui::SettingClass ui; }; #endif // SETTING_H qemuctl/debugmonitor.ui0000644000175000017500000000334111467667752014633 0ustar peterpeter DebugMonitorClass 0 0 532 375 QEMUCTL - DebugMonitor :/icon.png:/icon.png Qt::NoFocus false Debug false Qt::WheelFocus true Qt::WheelFocus Send Command qemuctl/addmedia.h0000644000175000017500000000250211517641730013455 0ustar peterpeter/* Copyright (C) 2010 Peter Rustler This file is part of qemuctl. qemuctl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qemuctl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with qemuctl. If not, see . */ #ifndef ADDMEDIA_H #define ADDMEDIA_H #include #include #include "ui_addmedia.h" class AddMedia : public QWidget { Q_OBJECT public: AddMedia(QWidget *parent = 0); ~AddMedia(); QString getCommand() const; public slots: void mediaChanged(int index); void interfaceChanged(int index); void serialChanged(int index); void geometryChanged(int index); void selectFile(); void doneButton(); void cancelButton(); void startNew(); signals: void newCommand( const QString & cmd ); private: Ui::AddMediaClass ui; QString command; }; #endif // ADDMEDIA_H