chore: tweak ux for particles
This commit is contained in:
+36
-36
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 16.0.2, 2026-01-28T08:11:26. -->
|
<!-- Written by QtCreator 16.0.2, 2026-01-28T08:56:09. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
@@ -106,15 +106,15 @@
|
|||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||||
-DCMAKE_GENERATOR:STRING=Ninja
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||||
|
-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||||
|
-DCMAKE_GENERATOR:STRING=Ninja</value>
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Debug</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
@@ -164,15 +164,15 @@
|
|||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||||
-DCMAKE_GENERATOR:STRING=Ninja
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||||
|
-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||||
|
-DCMAKE_GENERATOR:STRING=Ninja</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Release</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
@@ -219,15 +219,15 @@
|
|||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||||
-DCMAKE_GENERATOR:STRING=Ninja
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||||
|
-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||||
|
-DCMAKE_GENERATOR:STRING=Ninja</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-RelWithDebInfo</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-RelWithDebInfo</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
@@ -274,15 +274,15 @@
|
|||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||||
-DCMAKE_GENERATOR:STRING=Ninja
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||||
|
-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||||
|
-DCMAKE_GENERATOR:STRING=Ninja</value>
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Profile</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Profile</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
@@ -330,15 +330,15 @@
|
|||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||||
-DCMAKE_GENERATOR:STRING=Ninja
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||||
|
-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||||
|
-DCMAKE_GENERATOR:STRING=Ninja</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-MinSizeRel</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-MinSizeRel</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
|||||||
+32
-2
@@ -23,7 +23,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
ui = new Ui::MainWindow;
|
ui = new Ui::MainWindow;
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
this->setWindowFlags(Qt::FramelessWindowHint);
|
// this->setWindowFlags(Qt::FramelessWindowHint);
|
||||||
|
|
||||||
ui->splitter->setStretchFactor(0, 1);
|
ui->splitter->setStretchFactor(0, 1);
|
||||||
ui->splitter->setStretchFactor(1, 1);
|
ui->splitter->setStretchFactor(1, 1);
|
||||||
@@ -121,11 +121,21 @@ void MainWindow::setupModels()
|
|||||||
m_particleListModel = new ParticleListModel(m_data, this);
|
m_particleListModel = new ParticleListModel(m_data, this);
|
||||||
ui->particlesView->setModel(m_particleListModel);
|
ui->particlesView->setModel(m_particleListModel);
|
||||||
|
|
||||||
|
// Configure particle list view to use ellipses for long text
|
||||||
|
ui->particlesView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
ui->particlesView->setTextElideMode(Qt::ElideRight);
|
||||||
|
|
||||||
// Connect selection changes
|
// Connect selection changes
|
||||||
connect(ui->topLevelParticlesView->selectionModel(),
|
connect(ui->topLevelParticlesView->selectionModel(),
|
||||||
&QItemSelectionModel::selectionChanged,
|
&QItemSelectionModel::selectionChanged,
|
||||||
this,
|
this,
|
||||||
&MainWindow::onTreeSelectionChanged);
|
&MainWindow::onTreeSelectionChanged);
|
||||||
|
|
||||||
|
// Connect particle selection changes
|
||||||
|
connect(ui->particlesView->selectionModel(),
|
||||||
|
&QItemSelectionModel::selectionChanged,
|
||||||
|
this,
|
||||||
|
&MainWindow::onParticleSelectionChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onTreeSelectionChanged(
|
void MainWindow::onTreeSelectionChanged(
|
||||||
@@ -160,8 +170,28 @@ void MainWindow::onTreeSelectionChanged(
|
|||||||
ui->particlesView->setFocus();
|
ui->particlesView->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else // network selected
|
||||||
{
|
{
|
||||||
m_particleListModel->setStreamId(QString());
|
m_particleListModel->setStreamId(QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::onParticleSelectionChanged(
|
||||||
|
const QItemSelection &selected,
|
||||||
|
const QItemSelection &deselected)
|
||||||
|
{
|
||||||
|
Q_UNUSED(deselected);
|
||||||
|
|
||||||
|
if (selected.indexes().isEmpty())
|
||||||
|
{
|
||||||
|
ui->label->setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QModelIndex index = selected.indexes().first();
|
||||||
|
const Particle *particle = m_particleListModel->particleAtRow(index.row());
|
||||||
|
if (particle)
|
||||||
|
{
|
||||||
|
ui->label->setText(particle->summary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public:
|
|||||||
void on_settingsButton_clicked();
|
void on_settingsButton_clicked();
|
||||||
|
|
||||||
void onTreeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
void onTreeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||||
|
void onParticleSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupTrayIcon();
|
void setupTrayIcon();
|
||||||
|
|||||||
+34
-23
@@ -25,11 +25,11 @@ void Data::initializeFakeData()
|
|||||||
m_streams[net1.id].append(stream1);
|
m_streams[net1.id].append(stream1);
|
||||||
|
|
||||||
// Particles for Personal Notes
|
// Particles for Personal Notes
|
||||||
m_particles[stream1.id].append({"p1", "text", true});
|
m_particles[stream1.id].append({"p1", "text", "[email protected]", "Meeting notes from standup", true});
|
||||||
m_particles[stream1.id].append({"p2", "link", false});
|
m_particles[stream1.id].append({"p2", "link", "[email protected]", "API documentation for new endpoint", false});
|
||||||
m_particles[stream1.id].append({"p3", "image", true});
|
m_particles[stream1.id].append({"p3", "image", "[email protected]", "Screenshot of bug in login flow", true});
|
||||||
m_particles[stream1.id].append({"p4", "text", false});
|
m_particles[stream1.id].append({"p4", "text", "[email protected]", "Quick thought about architecture refactor", false});
|
||||||
m_particles[stream1.id].append({"p5", "link", true});
|
m_particles[stream1.id].append({"p5", "link", "[email protected]", "Design inspiration board from Dribbble", true});
|
||||||
|
|
||||||
// Stream: Quick Captures
|
// Stream: Quick Captures
|
||||||
Stream stream2;
|
Stream stream2;
|
||||||
@@ -40,8 +40,8 @@ void Data::initializeFakeData()
|
|||||||
m_streams[net1.id].append(stream2);
|
m_streams[net1.id].append(stream2);
|
||||||
|
|
||||||
// Particles for Quick Captures
|
// Particles for Quick Captures
|
||||||
m_particles[stream2.id].append({"p6", "text", true});
|
m_particles[stream2.id].append({"p6", "text", "[email protected]", "Remember to follow up on client feedback", true});
|
||||||
m_particles[stream2.id].append({"p7", "image", true});
|
m_particles[stream2.id].append({"p7", "image", "[email protected]", "Mockup for new feature dashboard", true});
|
||||||
|
|
||||||
// Network 2: Flowy Labs, Inc
|
// Network 2: Flowy Labs, Inc
|
||||||
Network net2;
|
Network net2;
|
||||||
@@ -61,14 +61,14 @@ void Data::initializeFakeData()
|
|||||||
m_streams[net2.id].append(stream3);
|
m_streams[net2.id].append(stream3);
|
||||||
|
|
||||||
// Particles for Engineering
|
// Particles for Engineering
|
||||||
m_particles[stream3.id].append({"p8", "text", false});
|
m_particles[stream3.id].append({"p8", "text", "[email protected]", "Sprint planning notes for Q1", false});
|
||||||
m_particles[stream3.id].append({"p9", "link", true});
|
m_particles[stream3.id].append({"p9", "link", "[email protected]", "GitHub PR for authentication refactor", true});
|
||||||
m_particles[stream3.id].append({"p10", "text", false});
|
m_particles[stream3.id].append({"p10", "text", "[email protected]", "Performance optimization opportunities", false});
|
||||||
m_particles[stream3.id].append({"p11", "image", true});
|
m_particles[stream3.id].append({"p11", "image", "[email protected]", "Architecture diagram for new service", true});
|
||||||
m_particles[stream3.id].append({"p12", "text", false});
|
m_particles[stream3.id].append({"p12", "text", "[email protected]", "Code review feedback summary", false});
|
||||||
m_particles[stream3.id].append({"p13", "link", false});
|
m_particles[stream3.id].append({"p13", "link", "[email protected]", "Documentation for API v2 endpoints", false});
|
||||||
m_particles[stream3.id].append({"p14", "text", true});
|
m_particles[stream3.id].append({"p14", "text", "[email protected]", "Bug report from production", true});
|
||||||
m_particles[stream3.id].append({"p15", "image", false});
|
m_particles[stream3.id].append({"p15", "image", "[email protected]", "Database schema migration plan", false});
|
||||||
|
|
||||||
// Stream: Design
|
// Stream: Design
|
||||||
Stream stream4;
|
Stream stream4;
|
||||||
@@ -79,10 +79,10 @@ void Data::initializeFakeData()
|
|||||||
m_streams[net2.id].append(stream4);
|
m_streams[net2.id].append(stream4);
|
||||||
|
|
||||||
// Particles for Design
|
// Particles for Design
|
||||||
m_particles[stream4.id].append({"p16", "image", false});
|
m_particles[stream4.id].append({"p16", "image", "[email protected]", "UI mockup for mobile dashboard", false});
|
||||||
m_particles[stream4.id].append({"p17", "text", true});
|
m_particles[stream4.id].append({"p17", "text", "[email protected]", "Design system color palette updates", true});
|
||||||
m_particles[stream4.id].append({"p18", "link", false});
|
m_particles[stream4.id].append({"p18", "link", "[email protected]", "Figma file for user onboarding flow", false});
|
||||||
m_particles[stream4.id].append({"p19", "image", true});
|
m_particles[stream4.id].append({"p19", "image", "[email protected]", "Wireframes for settings page", true});
|
||||||
|
|
||||||
// Stream: Archive
|
// Stream: Archive
|
||||||
Stream stream5;
|
Stream stream5;
|
||||||
@@ -93,10 +93,21 @@ void Data::initializeFakeData()
|
|||||||
m_streams[net2.id].append(stream5);
|
m_streams[net2.id].append(stream5);
|
||||||
|
|
||||||
// Particles for Archive
|
// Particles for Archive
|
||||||
for (int i = 20; i < 35; i++)
|
m_particles[stream5.id].append({"p20", "text", "[email protected]", "Old project requirements document", true});
|
||||||
{
|
m_particles[stream5.id].append({"p21", "text", "[email protected]", "Archived meeting notes from Q4", true});
|
||||||
m_particles[stream5.id].append({QString("p%1").arg(i), "text", true});
|
m_particles[stream5.id].append({"p22", "link", "[email protected]", "Deprecated API documentation", true});
|
||||||
}
|
m_particles[stream5.id].append({"p23", "text", "[email protected]", "Legacy feature specification", true});
|
||||||
|
m_particles[stream5.id].append({"p24", "image", "[email protected]", "Old design mockups", true});
|
||||||
|
m_particles[stream5.id].append({"p25", "text", "[email protected]", "Historical performance metrics", true});
|
||||||
|
m_particles[stream5.id].append({"p26", "link", "[email protected]", "Archive of old blog posts", true});
|
||||||
|
m_particles[stream5.id].append({"p27", "text", "[email protected]", "Sunset project final report", true});
|
||||||
|
m_particles[stream5.id].append({"p28", "image", "[email protected]", "Previous branding assets", true});
|
||||||
|
m_particles[stream5.id].append({"p29", "text", "[email protected]", "Completed milestone summary", true});
|
||||||
|
m_particles[stream5.id].append({"p30", "link", "[email protected]", "Old repository backup link", true});
|
||||||
|
m_particles[stream5.id].append({"p31", "text", "[email protected]", "Archived customer feedback", true});
|
||||||
|
m_particles[stream5.id].append({"p32", "image", "[email protected]", "Previous UI iteration screenshots", true});
|
||||||
|
m_particles[stream5.id].append({"p33", "text", "[email protected]", "Legacy code documentation", true});
|
||||||
|
m_particles[stream5.id].append({"p34", "link", "[email protected]", "Historical release notes", true});
|
||||||
}
|
}
|
||||||
|
|
||||||
const QList<Network>& Data::networks() const
|
const QList<Network>& Data::networks() const
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ struct Particle
|
|||||||
{
|
{
|
||||||
QString id;
|
QString id;
|
||||||
QString type;
|
QString type;
|
||||||
|
QString createdBy;
|
||||||
|
QString summary;
|
||||||
bool seen;
|
bool seen;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+85
-13
@@ -171,19 +171,91 @@
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLabel" name="label">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<widget class="QFrame" name="frame">
|
||||||
<x>140</x>
|
<property name="sizePolicy">
|
||||||
<y>300</y>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<width>111</width>
|
<horstretch>0</horstretch>
|
||||||
<height>16</height>
|
<verstretch>2</verstretch>
|
||||||
</rect>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="frameShape">
|
||||||
<string>Main content area</string>
|
<enum>QFrame::Shape::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>2</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>36</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p>hey I'll take a look later today</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>376</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>[email protected]</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>30</y>
|
||||||
|
<width>376</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>acked by: arthur, ed, sam</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#include "particlelistmodel.h"
|
#include "particlelistmodel.h"
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QStyle>
|
||||||
|
|
||||||
ParticleListModel::ParticleListModel(Data *data, QObject *parent)
|
ParticleListModel::ParticleListModel(Data *data, QObject *parent)
|
||||||
: QAbstractListModel(parent), m_data(data), m_currentStreamId()
|
: QAbstractListModel(parent), m_data(data), m_currentStreamId()
|
||||||
@@ -22,7 +24,7 @@ int ParticleListModel::rowCount(const QModelIndex &parent) const
|
|||||||
|
|
||||||
QVariant ParticleListModel::data(const QModelIndex &index, int role) const
|
QVariant ParticleListModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
if (!index.isValid() || role != Qt::DisplayRole)
|
if (!index.isValid())
|
||||||
{
|
{
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@@ -41,15 +43,33 @@ QVariant ParticleListModel::data(const QModelIndex &index, int role) const
|
|||||||
|
|
||||||
const Particle &particle = particles.at(index.row());
|
const Particle &particle = particles.at(index.row());
|
||||||
|
|
||||||
// Show dot (•) for unseen, nothing for seen
|
if (role == Qt::DisplayRole)
|
||||||
if (particle.seen)
|
|
||||||
{
|
{
|
||||||
return particle.type;
|
QString emailPrefix = particle.createdBy.split("@")[0];
|
||||||
|
QString display = QString("[%1] - %2").arg(emailPrefix, particle.summary);
|
||||||
|
if (!particle.seen)
|
||||||
|
{
|
||||||
|
display += " •";
|
||||||
|
}
|
||||||
|
return display;
|
||||||
}
|
}
|
||||||
else
|
else if (role == Qt::DecorationRole)
|
||||||
{
|
{
|
||||||
return QString("%1 •").arg(particle.type);
|
// Return icon based on type
|
||||||
|
QStyle::StandardPixmap pixmap;
|
||||||
|
if (particle.type == "text")
|
||||||
|
pixmap = QStyle::SP_FileIcon;
|
||||||
|
else if (particle.type == "link")
|
||||||
|
pixmap = QStyle::SP_CommandLink;
|
||||||
|
else if (particle.type == "image")
|
||||||
|
pixmap = QStyle::SP_FileDialogContentsView;
|
||||||
|
else
|
||||||
|
return QVariant();
|
||||||
|
|
||||||
|
return qApp->style()->standardIcon(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticleListModel::setStreamId(const QString &streamId)
|
void ParticleListModel::setStreamId(const QString &streamId)
|
||||||
@@ -75,5 +95,17 @@ int ParticleListModel::firstUnseenRow() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1; // All seen or empty
|
return -1; // All seen or empty
|
||||||
|
}
|
||||||
|
|
||||||
|
const Particle *ParticleListModel::particleAtRow(int row) const
|
||||||
|
{
|
||||||
|
if (m_currentStreamId.isEmpty())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
const QList<Particle> &particles = m_data->particlesForStream(m_currentStreamId);
|
||||||
|
if (row >= 0 && row < particles.size())
|
||||||
|
return &particles.at(row);
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public:
|
|||||||
|
|
||||||
void setStreamId(const QString &streamId);
|
void setStreamId(const QString &streamId);
|
||||||
int firstUnseenRow() const; // Returns -1 if none unseen
|
int firstUnseenRow() const; // Returns -1 if none unseen
|
||||||
|
const Particle* particleAtRow(int row) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Data *m_data;
|
Data *m_data;
|
||||||
|
|||||||
Reference in New Issue
Block a user