Fix build: synchronize Request API, fix GmailSynchronizer, and migrate UI to Qt6 Widgets
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// /mnt/c/Users/javie/wino-mail-dtkqt/include/folderlistmodel.h
|
||||
#ifndef FOLDERLISTMODEL_H
|
||||
#define FOLDERLISTMODEL_H
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QStringList>
|
||||
#include <QModelIndex>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
class FolderListModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FolderListModel(QObject *parent = nullptr);
|
||||
|
||||
// QAbstractItemModel interface
|
||||
QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(int row, const QModelIndex &parent = QModelIndex()) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
// Public interface for setting data
|
||||
void setFolders(const QStringList& folders);
|
||||
|
||||
// Helper to get data (for demonstration)
|
||||
QStringList getFolders() const { return m_folders; }
|
||||
|
||||
private:
|
||||
QStringList m_folders;
|
||||
};
|
||||
|
||||
#endif // FOLDERLISTMODEL_H
|
||||
Reference in New Issue
Block a user