2 * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <ludmiloff@gmail.com>
3 * SPDX-FileCopyrightText: 2006-2010 Peter Penz <peter.penz19@gmail.com>
5 * SPDX-License-Identifier: GPL-2.0-or-later
10 Panel::Panel(QWidget
*parent
)
13 , m_customContextMenuActions()
21 QUrl
Panel::url() const
26 void Panel::setCustomContextMenuActions(const QList
<QAction
*> &actions
)
28 m_customContextMenuActions
= actions
;
31 QList
<QAction
*> Panel::customContextMenuActions() const
33 return m_customContextMenuActions
;
36 QSize
Panel::sizeHint() const
38 // The size hint will be requested already when starting Dolphin even
39 // if the panel is invisible. For performance reasons most panels delay
40 // the creation and initialization of widgets until a showEvent() is called.
41 // Because of this the size-hint of the embedded widgets cannot be used
42 // and a default size is provided:
43 return QSize(180, 180);
46 void Panel::setUrl(const QUrl
&url
)
48 if (url
.matches(m_url
, QUrl::StripTrailingSlash
)) {
52 const QUrl oldUrl
= m_url
;
59 void Panel::readSettings()
63 #include "moc_panel.cpp"