2016-05-29 18:38:55 +00:00
|
|
|
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
|
|
|
// Copyright (C) 2010 Winch Gate Property Limited
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-06-12 13:44:48 +00:00
|
|
|
#ifndef UNINSTALLDIALOG_H
|
|
|
|
#define UNINSTALLDIALOG_H
|
2016-05-29 18:38:55 +00:00
|
|
|
|
2016-06-12 13:44:48 +00:00
|
|
|
#include "ui_uninstalldialog.h"
|
2016-06-04 18:11:55 +00:00
|
|
|
#include "operation.h"
|
2016-05-29 18:38:55 +00:00
|
|
|
|
|
|
|
/**
|
2016-06-12 13:44:48 +00:00
|
|
|
* Wizard displayed when uninstalling components from Add/Remove Program under Windows
|
|
|
|
* or when user clicks on Uninstall in main menu.
|
2016-05-29 18:38:55 +00:00
|
|
|
*
|
|
|
|
* \author Cedric 'Kervala' OCHS
|
|
|
|
* \date 2016
|
|
|
|
*/
|
2016-06-12 13:44:48 +00:00
|
|
|
class CUninstallDialog : public QDialog, public Ui::UninstallDialog
|
2016-05-29 18:38:55 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-06-12 13:44:48 +00:00
|
|
|
CUninstallDialog(QWidget *parent = NULL);
|
|
|
|
virtual ~CUninstallDialog();
|
2016-05-29 18:38:55 +00:00
|
|
|
|
2016-06-19 19:10:23 +00:00
|
|
|
void setSelectedComponents(const SComponents &components);
|
|
|
|
SComponents getSelectedCompenents() const;
|
2016-05-29 18:38:55 +00:00
|
|
|
|
2016-06-04 18:11:55 +00:00
|
|
|
signals:
|
|
|
|
void updateSize(int row, const QString &text);
|
|
|
|
void updateLayout();
|
2016-05-29 18:38:55 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void accept();
|
|
|
|
void onItemChanged(QStandardItem *item);
|
2016-06-04 18:11:55 +00:00
|
|
|
void onUpdateSize(int row, const QString &text);
|
|
|
|
void onUpdateLayout();
|
2016-05-29 18:38:55 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-04 18:11:55 +00:00
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
|
2016-05-29 18:38:55 +00:00
|
|
|
void updateSizes();
|
|
|
|
void updateButtons();
|
|
|
|
|
|
|
|
// key is original ID, value is row index
|
2016-06-14 18:18:10 +00:00
|
|
|
typedef QMap<QString, int> IDIndicesMap;
|
|
|
|
|
|
|
|
IDIndicesMap m_serversIndices;
|
|
|
|
IDIndicesMap m_profilesIndices;
|
2016-05-29 18:38:55 +00:00
|
|
|
|
|
|
|
int m_installerIndex;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|