2017-03-12 23:26:04 +01:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
KLayout Layout Viewer
|
|
|
|
|
Copyright (C) 2006-2017 Matthias Koefferlein
|
|
|
|
|
|
|
|
|
|
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 2 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, write to the Free Software
|
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2017-03-19 22:44:46 +01:00
|
|
|
#ifndef HDR_laySaltManagerDialog
|
|
|
|
|
#define HDR_laySaltManagerDialog
|
2017-03-12 23:26:04 +01:00
|
|
|
|
|
|
|
|
#include "ui_SaltManagerDialog.h"
|
|
|
|
|
|
2017-03-25 23:33:07 +01:00
|
|
|
#include <QDialog>
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
2017-03-12 23:26:04 +01:00
|
|
|
namespace lay
|
|
|
|
|
{
|
|
|
|
|
|
2017-03-18 22:36:33 +01:00
|
|
|
class Salt;
|
|
|
|
|
class SaltGrain;
|
2017-03-19 22:44:46 +01:00
|
|
|
class SaltGrainPropertiesDialog;
|
2017-03-18 22:36:33 +01:00
|
|
|
|
2017-03-12 23:26:04 +01:00
|
|
|
/**
|
|
|
|
|
* @brief The dialog for managing the Salt ("Packages")
|
|
|
|
|
*/
|
|
|
|
|
class SaltManagerDialog
|
|
|
|
|
: public QDialog, private Ui::SaltManagerDialog
|
|
|
|
|
{
|
2017-03-18 22:36:33 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
2017-03-12 23:26:04 +01:00
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* @brief Constructor
|
|
|
|
|
*/
|
|
|
|
|
SaltManagerDialog (QWidget *parent);
|
|
|
|
|
|
2017-03-18 22:36:33 +01:00
|
|
|
private slots:
|
|
|
|
|
/**
|
|
|
|
|
* @brief Called when the list of packages (grains) has changed
|
|
|
|
|
*/
|
|
|
|
|
void salt_changed ();
|
|
|
|
|
|
2017-03-25 10:15:24 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Called when the repository (salt mine) has changed
|
|
|
|
|
*/
|
|
|
|
|
void salt_mine_changed ();
|
|
|
|
|
|
2017-03-18 22:36:33 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Called when the currently selected package (grain) has changed
|
|
|
|
|
*/
|
|
|
|
|
void current_changed ();
|
|
|
|
|
|
2017-03-25 10:15:24 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Called when the currently selected package from the salt mine has changed
|
|
|
|
|
*/
|
|
|
|
|
void mine_current_changed ();
|
|
|
|
|
|
2017-03-19 22:44:46 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Called when the "edit" button is pressed
|
|
|
|
|
*/
|
|
|
|
|
void edit_properties ();
|
|
|
|
|
|
2017-03-23 22:19:13 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Called when the "edit" button is pressed
|
|
|
|
|
*/
|
|
|
|
|
void create_grain ();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Called when the "delete" button is pressed
|
|
|
|
|
*/
|
|
|
|
|
void delete_grain ();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Called when the "install" button is pressed
|
|
|
|
|
*/
|
|
|
|
|
void install_grain ();
|
|
|
|
|
|
2017-03-25 10:15:24 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Called when the mode tab changed
|
|
|
|
|
*/
|
|
|
|
|
void mode_changed ();
|
|
|
|
|
|
2017-03-25 23:33:07 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Called when one search text changed
|
|
|
|
|
*/
|
|
|
|
|
void search_text_changed (const QString &text);
|
|
|
|
|
|
2017-03-18 22:36:33 +01:00
|
|
|
private:
|
2017-03-25 10:15:24 +01:00
|
|
|
lay::Salt *mp_salt, *mp_salt_mine;
|
2017-03-25 23:33:07 +01:00
|
|
|
std::auto_ptr<lay::SaltGrain> m_remote_grain;
|
2017-03-18 22:36:33 +01:00
|
|
|
bool m_current_changed_enabled;
|
2017-03-19 22:44:46 +01:00
|
|
|
lay::SaltGrainPropertiesDialog *mp_properties_dialog;
|
|
|
|
|
|
|
|
|
|
lay::SaltGrain *current_grain ();
|
2017-03-25 10:15:24 +01:00
|
|
|
lay::SaltGrain *mine_current_grain ();
|
2017-03-12 23:26:04 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|