LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
pagenotification.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
pagenotification.h
"
10
#include <stdexcept>
11
#include <QVBoxLayout>
12
13
namespace
LC::Util
14
{
15
PageNotification::PageNotification
(QWidget *
widget
)
16
: QWidget (
widget
)
17
{
18
auto
lay
=
qobject_cast<QVBoxLayout*>
(
widget
->parentWidget ()->layout ());
19
if
(!
lay
)
20
throw
std::runtime_error (
"Passed parent object has no QVBoxLayout"
);
21
22
const
auto
idx
=
lay
->indexOf (
widget
);
23
lay
->insertWidget (
idx
+ 1,
this
);
24
}
25
}
LC::Util::PageNotification::PageNotification
PageNotification(QWidget *parent)
Creates the widget embedding into the parent layout of the parent widget.
Definition
pagenotification.cpp:15
LC::Util
Definition
icoreproxy.h:34
LC::Util::Filter
Container< T > Filter(const Container< T > &c, F f)
Definition
prelude.h:118
pagenotification.h
src
util
gui
pagenotification.cpp
Generated by
1.10.0