kde-playground/kemu/kemumainwindow.h
Ivailo Monev 4928a08c7e kemu: move status bar code to a method and call it from machineFinished()
otherwise if a machine is stopped via the Window Manager, not the
start/stop button, the status bar does not get updated

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2016-09-16 06:17:03 +00:00

57 lines
No EOL
1.7 KiB
C++

/* This file is part of the KDE libraries
Copyright (C) 2016 Ivailo Monev <xakepa10@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2, as published by the Free Software Foundation.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KEMUMAINWINDOW_H
#define KEMUMAINWINDOW_H
#include <KXmlGuiWindow>
#include <QListWidgetItem>
#include <QSettings>
#include <QProcess>
class Ui_KEmuWindow;
class KEmuMainWindow: public KXmlGuiWindow
{
Q_OBJECT
public:
KEmuMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
~KEmuMainWindow();
public slots:
void createHardDisk();
void quit();
private slots:
void machineLoad(const QString machine);
void machineSave(const QString ignored);
void machineSave(int ignored);
void machineChanged(QItemSelection ignored, QItemSelection ignored2);
void machineFinished(int exitCode, QProcess::ExitStatus exitStatus);
void addMachine(const QString machine);
void startStopMachine();
void removeMachine(const QString machine);
private:
void updateStatus();
Ui_KEmuWindow *m_kemuui;
QSettings *m_settings;
QHash<QString,QProcess*> m_machines;
};
#endif // KEMUMAINWINDOW_H