Internal
Public Access
Milestone 8 UX: folder tree workflows, about dialog, and app icon polish
This commit is contained in:
+34
-6
@@ -5,18 +5,24 @@
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <QPointer>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
class QListWidget;
|
||||
class QListWidgetItem;
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QComboBox;
|
||||
class QPoint;
|
||||
class SessionWindow;
|
||||
class ProfilesTreeWidget;
|
||||
|
||||
class ProfilesWindow : public QMainWindow
|
||||
{
|
||||
@@ -28,21 +34,43 @@ public:
|
||||
|
||||
private:
|
||||
QLineEdit* m_searchBox;
|
||||
QListWidget* m_profilesList;
|
||||
QComboBox* m_viewModeBox;
|
||||
QComboBox* m_sortBox;
|
||||
QComboBox* m_protocolFilterBox;
|
||||
QComboBox* m_tagFilterBox;
|
||||
ProfilesTreeWidget* m_profilesTree;
|
||||
QPushButton* m_newButton;
|
||||
QPushButton* m_editButton;
|
||||
QPushButton* m_deleteButton;
|
||||
QPointer<SessionWindow> m_sessionWindow;
|
||||
std::unique_ptr<ProfileRepository> m_repository;
|
||||
std::unordered_map<qint64, Profile> m_profileCache;
|
||||
QString m_pendingTagFilterPreference;
|
||||
|
||||
void setupUi();
|
||||
void loadProfiles(const QString& query = QString());
|
||||
void loadProfiles();
|
||||
ProfileSortOrder selectedSortOrder() const;
|
||||
bool isFolderViewEnabled() const;
|
||||
QString selectedProtocolFilter() const;
|
||||
QString selectedTagFilter() const;
|
||||
void updateTagFilterOptions(const std::vector<Profile>& profiles);
|
||||
QTreeWidgetItem* upsertFolderNode(const QStringList& folderParts,
|
||||
std::map<QString, QTreeWidgetItem*>& folderNodes);
|
||||
void addProfileNode(QTreeWidgetItem* parent, const Profile& profile);
|
||||
QString folderPathForItem(const QTreeWidgetItem* item) const;
|
||||
void showTreeContextMenu(const QPoint& pos);
|
||||
void createFolderInContext(const QString& baseFolderPath);
|
||||
void persistFolderAssignmentsFromTree();
|
||||
void collectProfileAssignments(const QTreeWidgetItem* item,
|
||||
const QString& parentFolderPath,
|
||||
std::unordered_map<qint64, QString>& assignments) const;
|
||||
void loadUiPreferences();
|
||||
void saveUiPreferences() const;
|
||||
std::optional<Profile> selectedProfile() const;
|
||||
void createProfile();
|
||||
void createProfile(const QString& defaultFolderPath = QString());
|
||||
void editSelectedProfile();
|
||||
void deleteSelectedProfile();
|
||||
void openSessionForItem(QListWidgetItem* item);
|
||||
void openSessionForItem(QTreeWidgetItem* item);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user