Warning, file /system/dolphin/src/panels/panel.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <ludmiloff@gmail.com>
0003  * SPDX-FileCopyrightText: 2006-2010 Peter Penz <peter.penz19@gmail.com>
0004  *
0005  * SPDX-License-Identifier: GPL-2.0-or-later
0006  */
0007 
0008 #include "panel.h"
0009 
0010 Panel::Panel(QWidget *parent)
0011     : QWidget(parent)
0012     , m_url()
0013     , m_customContextMenuActions()
0014 {
0015 }
0016 
0017 Panel::~Panel()
0018 {
0019 }
0020 
0021 QUrl Panel::url() const
0022 {
0023     return m_url;
0024 }
0025 
0026 void Panel::setCustomContextMenuActions(const QList<QAction *> &actions)
0027 {
0028     m_customContextMenuActions = actions;
0029 }
0030 
0031 QList<QAction *> Panel::customContextMenuActions() const
0032 {
0033     return m_customContextMenuActions;
0034 }
0035 
0036 QSize Panel::sizeHint() const
0037 {
0038     // The size hint will be requested already when starting Dolphin even
0039     // if the panel is invisible. For performance reasons most panels delay
0040     // the creation and initialization of widgets until a showEvent() is called.
0041     // Because of this the size-hint of the embedded widgets cannot be used
0042     // and a default size is provided:
0043     return QSize(180, 180);
0044 }
0045 
0046 void Panel::setUrl(const QUrl &url)
0047 {
0048     if (url.matches(m_url, QUrl::StripTrailingSlash)) {
0049         return;
0050     }
0051 
0052     const QUrl oldUrl = m_url;
0053     m_url = url;
0054     if (!urlChanged()) {
0055         m_url = oldUrl;
0056     }
0057 }
0058 
0059 void Panel::readSettings()
0060 {
0061 }
0062 
0063 #include "moc_panel.cpp"