92 lines
2.0 KiB
C++
92 lines
2.0 KiB
C++
//
|
|
// Created by arjun-flowylabs on 1/10/2026.
|
|
//
|
|
|
|
#ifndef LLINK_MAINWINDOW_H
|
|
#define LLINK_MAINWINDOW_H
|
|
|
|
#include "store.h"
|
|
#include "networkstreammodel.h"
|
|
#include "particlelistmodel.h"
|
|
#include <QMainWindow>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QSystemTrayIcon;
|
|
class AuthManager;
|
|
class QItemSelection;
|
|
class QLabel;
|
|
QT_END_NAMESPACE
|
|
|
|
class AuthDialog;
|
|
class CreateStreamDialog;
|
|
class MemberPickerDialog;
|
|
class SettingsDialog;
|
|
class TextInputDialog;
|
|
|
|
namespace Ui
|
|
{
|
|
class MainWindow;
|
|
}
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
|
|
|
private slots:
|
|
void on_exitButton_clicked();
|
|
|
|
void on_settingsButton_clicked();
|
|
|
|
void onTreeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
|
void onParticleSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
|
void onTextMessageSubmitted(const QString &text);
|
|
|
|
protected:
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
|
void mousePressEvent(QMouseEvent *event) override;
|
|
void mouseMoveEvent(QMouseEvent *event) override;
|
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
|
|
|
private:
|
|
void setupTrayIcon();
|
|
void setupModels();
|
|
|
|
QSystemTrayIcon *m_trayIcon;
|
|
Ui::MainWindow *ui;
|
|
|
|
AuthManager *m_authManager;
|
|
AuthDialog *m_authDialog;
|
|
|
|
SettingsDialog *m_settingsDialog;
|
|
TextInputDialog *m_textInputDialog;
|
|
CreateStreamDialog *m_createStreamDialog;
|
|
|
|
// Data and models
|
|
Store *m_store;
|
|
NetworkStreamModel *m_networkStreamModel;
|
|
ParticleListModel *m_particleListModel;
|
|
|
|
void showTextInputDialog();
|
|
void updateStatusBar();
|
|
QString m_selectedParticleId;
|
|
QString m_selectedNetworkName;
|
|
QString m_selectedStreamId;
|
|
int m_selectedParticleRow;
|
|
QLabel *m_currentPathLabel;
|
|
QLabel *m_positionLabel;
|
|
QLabel *m_storageLabel;
|
|
QLabel *m_pingLabel;
|
|
QTimer *m_pingTimer;
|
|
|
|
// Window dragging
|
|
QPoint m_dragPosition;
|
|
bool m_isDragging;
|
|
};
|
|
|
|
#endif // LLINK_MAINWINDOW_H
|