LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
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
Definition:
icoreproxy.h:33
pagenotification.h
LC::Util::PageNotification::PageNotification
PageNotification(QWidget *parent)
Creates the widget embedding into the parent layout of the parent widget.
Definition:
pagenotification.cpp:21
src
util
gui
pagenotification.cpp
Generated by
1.8.17