File indexing completed on 2025-02-02 15:39:18
0001 /* 0002 SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef IPV4ROUTESWIDGET_H 0008 #define IPV4ROUTESWIDGET_H 0009 0010 #include <QDialog> 0011 #include <QStyledItemDelegate> 0012 0013 #include <NetworkManagerQt/IpConfig> 0014 0015 class QStandardItem; 0016 class QItemSelection; 0017 0018 class IpV4RoutesWidget : public QDialog 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit IpV4RoutesWidget(QWidget *parent = nullptr); 0023 ~IpV4RoutesWidget() override; 0024 0025 void setRoutes(const QList<NetworkManager::IpRoute> &list); 0026 QList<NetworkManager::IpRoute> routes(); 0027 void setNeverDefault(bool checked); 0028 bool neverDefault() const; 0029 void setIgnoreAutoRoutes(bool checked); 0030 void setIgnoreAutoRoutesCheckboxEnabled(bool enabled); 0031 bool ignoreautoroutes() const; 0032 0033 private Q_SLOTS: 0034 void addRoute(); 0035 void removeRoute(); 0036 /** 0037 * Update remove IP button depending on if there is a selection 0038 */ 0039 void selectionChanged(const QItemSelection &); 0040 void tableViewItemChanged(QStandardItem *); 0041 0042 private: 0043 class Private; 0044 Private *const d; 0045 }; 0046 0047 #endif // IPV4ROUTESWIDGET_H