#include "data.h" Data::Data(QObject *parent) : QObject(parent) { initializeFakeData(); } void Data::initializeFakeData() { // Network 1: Private Network net1; net1.id = "net-private"; net1.name = "Private"; net1.openStreamCount = 2; net1.openStreamCapacity = 5; net1.countHumans = 1; m_networks.append(net1); // Stream: Personal Notes Stream stream1; stream1.id = "stream-notes"; stream1.name = "Personal Notes"; stream1.status = Stream::OPEN; stream1.unseenCount = 3; m_streams[net1.id].append(stream1); // Particles for Personal Notes m_particles[stream1.id].append({"p1", "text", "viet@flowy.com", "Meeting notes from standup", true}); m_particles[stream1.id].append({"p2", "link", "viet@flowy.com", "API documentation for new endpoint", true}); m_particles[stream1.id].append({"p3", "image", "stephen@flowy.com", "Screenshot of bug in login flow", false}); m_particles[stream1.id].append({"p4", "text", "stephen@flowy.com", "Quick thought about architecture refactor", false}); m_particles[stream1.id].append({"p5", "link", "anthony@flowy.com", "Design inspiration board from Dribbble", false}); // Stream: Quick Captures Stream stream2; stream2.id = "stream-captures"; stream2.name = "Quick Captures"; stream2.status = Stream::OPEN; stream2.unseenCount = 0; m_streams[net1.id].append(stream2); // Particles for Quick Captures m_particles[stream2.id].append({"p6", "text", "alice@flowy.com", "Remember to follow up on client feedback", true}); m_particles[stream2.id].append({"p7", "image", "bob@flowy.com", "Mockup for new feature dashboard", true}); // Network 2: Flowy Labs, Inc Network net2; net2.id = "net-flowy"; net2.name = "Flowy Labs, Inc"; net2.openStreamCount = 3; net2.openStreamCapacity = 10; net2.countHumans = 12; m_networks.append(net2); // Stream: Engineering Stream stream3; stream3.id = "stream-eng"; stream3.name = "wild-shape"; stream3.status = Stream::OPEN; stream3.unseenCount = 10; m_streams[net2.id].append(stream3); // Particles for Engineering m_particles[stream3.id].append({"p8", "text", "charlie@flowy.com", "hey team, anyone seeing issues with the auth service?", true}); m_particles[stream3.id].append({"p9", "text", "dave@flowy.com", "yeah, getting 401s on the staging server", true}); m_particles[stream3.id].append({"p10", "text", "eve@flowy.com", "i think it's the JWT expiration. checking now", true}); m_particles[stream3.id].append({"p11", "link", "eve@flowy.com", "https://github.com/flowy/api/pull/234", true}); m_particles[stream3.id].append({"p12", "text", "eve@flowy.com", "^ PR ready for review. fixed the token refresh logic", false}); m_particles[stream3.id].append({"p13", "text", "frank@flowy.com", "looking at it now", false}); m_particles[stream3.id].append({"p14", "text", "grace@flowy.com", "nice catch! left a few comments about error handling", false}); m_particles[stream3.id].append({"p15", "text", "eve@flowy.com", "updated, should be good to merge", false}); m_particles[stream3.id].append({"p16", "text", "charlie@flowy.com", "merged! deploying to staging now", false}); m_particles[stream3.id].append({"p17", "text", "henry@flowy.com", "btw, we should probably add monitoring for token expiration", false}); m_particles[stream3.id].append({"p18", "text", "dave@flowy.com", "good idea, i can set that up after lunch", false}); m_particles[stream3.id].append({"p19", "text", "ivy@flowy.com", "also, can someone review my database migration PR?", false}); m_particles[stream3.id].append({"p20", "image", "ivy@flowy.com", "here's the schema changes", false}); m_particles[stream3.id].append({"p21", "text", "jack@flowy.com", "looks good to me. just run it by charlie for final approval", false}); // Stream: Design Stream stream4; stream4.id = "stream-design"; stream4.name = "arch-rival"; stream4.status = Stream::OPEN; stream4.unseenCount = 4; m_streams[net2.id].append(stream4); // Particles for Design m_particles[stream4.id].append({"p22", "text", "karen@flowy.com", "starting on the mobile dashboard redesign", true}); m_particles[stream4.id].append({"p23", "image", "karen@flowy.com", "initial mockup - thoughts?", true}); m_particles[stream4.id].append({"p24", "text", "leo@flowy.com", "love the direction! maybe try a darker header?", true}); m_particles[stream4.id].append({"p25", "text", "maya@flowy.com", "agreed, and can we use the new color palette from the design system?", true}); m_particles[stream4.id].append({"p26", "link", "maya@flowy.com", "https://figma.com/design-system-v2", true}); m_particles[stream4.id].append({"p27", "text", "karen@flowy.com", "oh perfect! i'll update it", true}); m_particles[stream4.id].append({"p28", "text", "nathan@flowy.com", "hey, should the settings page follow the same style?", false}); m_particles[stream4.id].append({"p29", "text", "leo@flowy.com", "yes definitely, keeping it consistent across all pages", false}); m_particles[stream4.id].append({"p30", "image", "nathan@flowy.com", "cool, here's my wireframe draft", false}); m_particles[stream4.id].append({"p31", "text", "maya@flowy.com", "looks great! can you add that to the figma file?", false}); // Stream: Archive Stream stream5; stream5.id = "stream-archive"; stream5.name = "anthem-project"; stream5.status = Stream::CLOSED; stream5.unseenCount = 0; m_streams[net2.id].append(stream5); // Particles for Archive m_particles[stream5.id].append({"p32", "text", "oliver@flowy.com", "so we're officially deprecating the old API next week", true}); m_particles[stream5.id].append({"p33", "text", "patricia@flowy.com", "yep, all clients have migrated to v2", true}); m_particles[stream5.id].append({"p34", "text", "quinn@flowy.com", "great work everyone! this project was a long journey", true}); m_particles[stream5.id].append({"p35", "link", "quinn@flowy.com", "https://docs.flowy.com/api/v1-migration-guide", true}); m_particles[stream5.id].append({"p36", "text", "rachel@flowy.com", "should we keep the docs around for a bit?", true}); m_particles[stream5.id].append({"p37", "text", "sam@flowy.com", "yeah i'd say 6 months, then archive everything", true}); m_particles[stream5.id].append({"p38", "text", "tina@flowy.com", "agreed. i'll set a reminder", true}); m_particles[stream5.id].append({"p39", "text", "oliver@flowy.com", "also documented all the lessons learned", true}); m_particles[stream5.id].append({"p40", "text", "patricia@flowy.com", "nice! that'll be super helpful for future projects", true}); m_particles[stream5.id].append({"p41", "text", "quinn@flowy.com", "alright, marking this stream as closed. good job team!", true}); } const QList& Data::networks() const { return m_networks; } const QList& Data::streamsForNetwork(const QString &networkId) const { static QList emptyList; auto it = m_streams.find(networkId); if (it == m_streams.end()) { return emptyList; } return it.value(); } const QList& Data::particlesForStream(const QString &streamId) const { static QList emptyList; auto it = m_particles.find(streamId); if (it == m_particles.end()) { return emptyList; } return it.value(); } int Data::networkCount() const { return m_networks.size(); } int Data::streamCount(const QString &networkId) const { return m_streams.value(networkId).size(); } int Data::particleCount(const QString &streamId) const { return m_particles.value(streamId).size(); }