Internal
Public Access
Milestone 8 UX: folder tree workflows, about dialog, and app icon polish
This commit is contained in:
+39
-1
@@ -5,9 +5,11 @@
|
||||
#include "session_backend.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
class QPlainTextEdit;
|
||||
class QThread;
|
||||
@@ -15,14 +17,24 @@ class SessionBackend;
|
||||
class TerminalView;
|
||||
class RdpDisplayWidget;
|
||||
class QToolButton;
|
||||
class QLineEdit;
|
||||
class QComboBox;
|
||||
class KodoTerm;
|
||||
|
||||
struct SessionUiPreferences
|
||||
{
|
||||
QString terminalThemeName = QStringLiteral("Dark");
|
||||
bool eventsPanelExpanded = false;
|
||||
};
|
||||
|
||||
class SessionTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SessionTab(const Profile& profile, QWidget* parent = nullptr);
|
||||
explicit SessionTab(const Profile& profile,
|
||||
const SessionUiPreferences& preferences,
|
||||
QWidget* parent = nullptr);
|
||||
~SessionTab() override;
|
||||
|
||||
QString tabTitle() const;
|
||||
@@ -34,10 +46,17 @@ public:
|
||||
QString terminalThemeName() const;
|
||||
bool supportsThemeSelection() const;
|
||||
bool supportsClearAction() const;
|
||||
bool isEventsPanelExpanded() const;
|
||||
void setEventsPanelExpanded(bool expanded);
|
||||
void clearEvents();
|
||||
void copyEvents() const;
|
||||
void exportEventsToFile();
|
||||
|
||||
signals:
|
||||
void tabTitleChanged(const QString& title);
|
||||
void tabStateChanged(SessionState state);
|
||||
void terminalThemeChanged(const QString& themeName);
|
||||
void eventsPanelVisibilityChanged(bool expanded);
|
||||
void requestConnect(const SessionConnectOptions& options);
|
||||
void requestDisconnect();
|
||||
void requestReconnect(const SessionConnectOptions& options);
|
||||
@@ -75,7 +94,24 @@ private:
|
||||
TerminalView* m_terminalOutput;
|
||||
QPlainTextEdit* m_eventLog;
|
||||
QToolButton* m_toggleEventsButton;
|
||||
QLineEdit* m_eventFilterInput;
|
||||
QComboBox* m_eventSeverityFilterInput;
|
||||
QToolButton* m_clearEventsButton;
|
||||
QToolButton* m_exportEventsButton;
|
||||
QWidget* m_eventsPanel;
|
||||
enum class EventSeverity {
|
||||
Info,
|
||||
Warning,
|
||||
Error,
|
||||
};
|
||||
struct EventEntry {
|
||||
QString line;
|
||||
EventSeverity severity;
|
||||
};
|
||||
std::vector<EventEntry> m_eventEntries;
|
||||
QString m_eventFilter;
|
||||
EventSeverity m_eventSeverityFilter;
|
||||
bool m_eventsPanelExpanded;
|
||||
|
||||
void setupUi();
|
||||
std::optional<SessionConnectOptions> buildConnectOptions();
|
||||
@@ -87,6 +123,8 @@ private:
|
||||
void setPanelExpanded(QToolButton* button, QWidget* panel, const QString& name, bool expanded);
|
||||
bool startSshTerminal(const SessionConnectOptions& options);
|
||||
void applyTerminalTheme(const QString& themeName);
|
||||
void refreshEventLogView();
|
||||
static EventSeverity classifyEventSeverity(const QString& message);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user