MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / addContent

Method addContent

src/plugins/core/notify/notificationmanager.cpp:80–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void NotificationManagerPrivate::addContent(QWidget *widget)
81{
82 if (!notificationContent) {
83 notificationContent = new QWidget(mainWindow);
84 notificationContent->setFixedWidth(420);
85 notificationContent->setObjectName(NotificationContentName);
86 notificationContent->setWindowFlag(Qt::WindowStaysOnTopHint, true);
87 notificationContent->setAttribute(Qt::WA_AlwaysStackOnTop);
88 notificationContent->installEventFilter(q);
89 mainWindow->installEventFilter(q);
90 QVBoxLayout *layout = new QVBoxLayout(notificationContent);
91 layout->setSpacing(0);
92 layout->setMargin(0);
93 layout->setDirection(QBoxLayout::BottomToTop);
94 notificationContent->show();
95 }
96
97 static_cast<QBoxLayout *>(notificationContent->layout())->addWidget(widget, 0, Qt::AlignHCenter);
98}
99
100NotificationManager::NotificationManager(QObject *parent)
101 : QObject(parent),

Callers 15

doProjectOpenMethod · 0.80
initUIMethod · 0.80
initUIMethod · 0.80
handleEventsMethod · 0.80
initUiMethod · 0.80
showErrorInfoDialogMethod · 0.80
confirmProjectKitMethod · 0.80
actionRenameDocumentMethod · 0.80
actionNewDirectoryMethod · 0.80
actionNewDocumentMethod · 0.80
showDetailsMethod · 0.80

Calls 4

setAttributeMethod · 0.45
setMarginMethod · 0.45
showMethod · 0.45
addWidgetMethod · 0.45

Tested by

no test coverage detected