diff options
Diffstat (limited to 'src/libs/installer/componentselectionpage_p.h')
-rw-r--r-- | src/libs/installer/componentselectionpage_p.h | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/src/libs/installer/componentselectionpage_p.h b/src/libs/installer/componentselectionpage_p.h index 6169a06f5..187fce61d 100644 --- a/src/libs/installer/componentselectionpage_p.h +++ b/src/libs/installer/componentselectionpage_p.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2024 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -31,9 +31,11 @@ #include <QObject> #include <QWidget> +#include <QHeaderView> #include "componentmodel.h" #include "packagemanagergui.h" +#include "componentsortfilterproxymodel.h" class QTreeView; class QLabel; @@ -44,12 +46,15 @@ class QListWidgetItem; class QProgressBar; class QVBoxLayout; class QHBoxLayout; +class QGridLayout; +class QStackedLayout; namespace QInstaller { class PackageManagerCore; class ComponentModel; class ComponentSelectionPage; +class CustomComboBox; class ComponentSelectionPagePrivate : public QObject { @@ -61,49 +66,67 @@ public: explicit ComponentSelectionPagePrivate(ComponentSelectionPage *qq, PackageManagerCore *core); ~ComponentSelectionPagePrivate(); - void allowCompressedRepositoryInstall(); + void setAllowCreateOfflineInstaller(bool allow); void showCompressedRepositoryButton(); void hideCompressedRepositoryButton(); + void showCreateOfflineInstallerButton(bool show); void setupCategoryLayout(); void showCategoryLayout(bool show); void updateTreeView(); + void expandDefault(); + void expandSearchResults(); + bool componentsResolved() const; public slots: void currentSelectedChanged(const QModelIndex ¤t); + void updateAllCheckStates(int which); void selectAll(); void deselectAll(); - void checkboxStateChanged(); - void enableRepositoryCategory(const QString &repositoryName, bool enable); void updateWidgetVisibility(bool show); void fetchRepositoryCategories(); - void customButtonClicked(int which); + void createOfflineButtonClicked(); + void qbspButtonClicked(); void onProgressChanged(int progress); void setMessage(const QString &msg); void setTotalProgress(int totalProgress); void selectDefault(); void onModelStateChanged(QInstaller::ComponentModel::ModelState state); + void setSearchPattern(const QString &text); + +private: + void storeHeaderResizeModes(); + void restoreHeaderResizeModes(); + void setComboBoxItemEnabled(int index, bool enabled); private: ComponentSelectionPage *q; PackageManagerCore *m_core; QTreeView *m_treeView; + QTabWidget *m_tabWidget; + QWidget *m_descriptionBaseWidget; QLabel *m_sizeLabel; - QScrollArea *m_descriptionScrollArea; QLabel *m_descriptionLabel; - QVBoxLayout *m_descriptionVLayout; - QPushButton *m_checkAll; - QPushButton *m_uncheckAll; - QPushButton *m_checkDefault; + QPushButton *m_createOfflinePushButton; + QPushButton *m_qbspPushButton; + CustomComboBox *m_checkStateComboBox; QWidget *m_categoryWidget; QGroupBox *m_categoryGroupBox; QLabel *m_metadataProgressLabel; QProgressBar *m_progressBar; - QHBoxLayout *m_mainHLayout; - QVBoxLayout *m_treeViewVLayout; - bool m_allowCompressedRepositoryInstall; + QGridLayout *m_mainGLayout; + QVBoxLayout *m_rightSideVLayout; + bool m_allowCreateOfflineInstaller; + bool m_categoryLayoutVisible; ComponentModel *m_allModel; ComponentModel *m_updaterModel; ComponentModel *m_currentModel; + QStackedLayout *m_stackedLayout; + ComponentSortFilterProxyModel *m_proxyModel; + QLineEdit *m_searchLineEdit; + bool m_componentsResolved; + + bool m_headerStretchLastSection; + QHash<int, QHeaderView::ResizeMode> m_headerResizeModes; }; } // namespace QInstaller |