Files
orbithub/src/session_window.h
T
ksmithandClaude Sonnet 5 a89748be67 Merge Profiles and Session windows into a single window
ProfilesWindow and SessionWindow were two independent top-level windows,
coordinated through a QPointer and manual show/create-or-reuse logic, with
duplicated Help menus and a path where Quit didn't actually quit if a
SessionWindow happened to be open. ProfilesWindow is now an embedded QWidget
shown as a permanent, unclosable "Profiles" tab inside SessionWindow's tab
widget; SessionWindow is the app's sole top-level window. Double-clicking a
profile opens a session tab in the same window instead of finding-or-creating
a second one, and closing all session tabs falls back to the Profiles tab
rather than closing the app.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 15:59:53 -06:00

33 lines
693 B
C++

#ifndef ORBITHUB_SESSION_WINDOW_H
#define ORBITHUB_SESSION_WINDOW_H
#include "profile_repository.h"
#include "session_tab.h"
#include <QMainWindow>
class QTabWidget;
class ProfilesWindow;
class SessionWindow : public QMainWindow
{
Q_OBJECT
public:
explicit SessionWindow(QWidget* parent = nullptr);
void openProfile(const Profile& profile);
private:
QTabWidget* m_tabs;
ProfilesWindow* m_profilesWidget;
SessionUiPreferences m_preferences;
void addSessionTab(const Profile& profile);
void updateTabTitle(SessionTab* tab, const QString& title);
void loadUiPreferences();
void saveUiPreferences() const;
int sessionTabCount() const;
};
#endif