MCPcopy Create free account
hub / github.com/alpha-liu-01/SpeedyNote / MarkdownNoteEntry

Method MarkdownNoteEntry

source/text/MarkdownNoteEntry.cpp:11–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <QTimer>
10
11MarkdownNoteEntry::MarkdownNoteEntry(const MarkdownNoteData &data, QWidget *parent)
12 : QFrame(parent), noteData(data)
13{
14 // Custom QFrame subclass: opt in to styled-background painting so the
15 // stylesheet's background-color actually fills the widget rect. Without
16 // this, Qt may leave the widget transparent and the view delegate's
17 // selection fill (#4d4d4d) bleeds through where the widget is placed.
18 setAttribute(Qt::WA_StyledBackground, true);
19 isDarkMode = palette().color(QPalette::Window).lightness() < 128;
20 setupUI();
21 applyStyle();
22 updatePreview();
23}
24
25// Phase M.3: New constructor for LinkObject-based notes
26MarkdownNoteEntry::MarkdownNoteEntry(const NoteDisplayData &data, QWidget *parent)

Callers

nothing calls this directly

Calls 3

connectFunction · 0.85
colorMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected