| 78 | } |
| 79 | |
| 80 | void 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 | |
| 100 | NotificationManager::NotificationManager(QObject *parent) |
| 101 | : QObject(parent), |
no test coverage detected