2023-10-23 21:50:26 -05:00
|
|
|
#ifndef NETWORKSELECTOR_H
|
|
|
|
#define NETWORKSELECTOR_H
|
|
|
|
|
|
|
|
#include <NetworkManagerQt/Connection>
|
2023-12-02 23:56:15 -06:00
|
|
|
#include <QList>
|
2023-10-23 21:50:26 -05:00
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QStandardItem>
|
2023-12-02 23:56:15 -06:00
|
|
|
|
|
|
|
class QStandardItemModel;
|
2023-10-23 21:50:26 -05:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
namespace Ui { class NetworkSelector; }
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
class NetworkSelector : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
NetworkSelector(QWidget *parent = nullptr);
|
|
|
|
~NetworkSelector();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void onTreeSingleClicked(QModelIndex index);
|
|
|
|
void onTreeDoubleClicked(QModelIndex index);
|
|
|
|
void onCreateClicked();
|
|
|
|
void onDeleteClicked();
|
|
|
|
void onModifyClicked();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QStandardItem *connGroupItem(QString itemName);
|
|
|
|
void regenConnTree();
|
|
|
|
void modifyConnection(QModelIndex index);
|
|
|
|
|
|
|
|
Ui::NetworkSelector *ui;
|
|
|
|
QStandardItemModel *connTreeModel;
|
|
|
|
QList<QStandardItem *> connTreeList;
|
|
|
|
NetworkManager::Connection::List connList;
|
|
|
|
|
|
|
|
QDialog *dialogWindow;
|
|
|
|
};
|
|
|
|
#endif // NETWORKSELECTOR_H
|