Fix build: synchronize Request API, fix GmailSynchronizer, and migrate UI to Qt6 Widgets
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// /mnt/c/Users/javie/wino-mail-dtkqt/include/synchronizerprovider.h
|
||||
#ifndef SYNCHRONIZERPROVIDER_H
|
||||
#define SYNCHRONIZERPROVIDER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
|
||||
// Forward declarations for models (assuming they are defined elsewhere)
|
||||
class FolderListModel;
|
||||
class EmailListModel;
|
||||
|
||||
class SynchronizerProvider : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SynchronizerProvider(QObject *parent = nullptr);
|
||||
|
||||
// Primary method to fetch all necessary data
|
||||
void syncAllData();
|
||||
|
||||
signals:
|
||||
// Signals emitted upon successful synchronization
|
||||
void dataSynchronized(const QList<QString>& folders, const QList<EmailItem>& emails);
|
||||
|
||||
public slots:
|
||||
// This slot will be called by the main window to initiate the load
|
||||
void requestSync();
|
||||
|
||||
private:
|
||||
// Simulated backend interaction methods
|
||||
QList<QString> fetchFoldersFromBackend() const;
|
||||
QList<EmailItem> fetchEmailsFromBackend(const QString& folder) const;
|
||||
};
|
||||
|
||||
#endif // SYNCHRONIZERPROVIDER_H
|
||||
Reference in New Issue
Block a user