2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2008-12-02 14:09:21 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
#include "core_global.h"
|
2009-07-21 17:48:24 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QPointer>
|
|
|
|
|
#include <QWidget>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace Core {
|
2014-08-11 17:31:27 +02:00
|
|
|
namespace Internal { class FindToolBar; }
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
class CORE_EXPORT FindToolBarPlaceHolder : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2018-05-07 17:34:42 +02:00
|
|
|
explicit FindToolBarPlaceHolder(QWidget *owner, QWidget *parent = nullptr);
|
2018-05-07 15:00:03 +02:00
|
|
|
~FindToolBarPlaceHolder() override;
|
2017-12-08 17:20:48 +01:00
|
|
|
|
|
|
|
|
static const QList<FindToolBarPlaceHolder *> allFindToolbarPlaceHolders();
|
|
|
|
|
|
2009-07-21 17:48:24 +02:00
|
|
|
QWidget *owner() const;
|
2014-06-06 16:59:11 +02:00
|
|
|
bool isUsedByWidget(QWidget *widget);
|
|
|
|
|
|
2014-08-11 17:31:27 +02:00
|
|
|
void setWidget(Internal::FindToolBar *widget);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
static FindToolBarPlaceHolder *getCurrent();
|
2009-07-21 11:10:02 +02:00
|
|
|
static void setCurrent(FindToolBarPlaceHolder *placeHolder);
|
|
|
|
|
|
2014-08-11 17:31:27 +02:00
|
|
|
void setLightColored(bool lightColored);
|
|
|
|
|
bool isLightColored() const;
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
private:
|
2009-07-21 17:48:24 +02:00
|
|
|
QWidget *m_owner;
|
2014-08-11 17:31:27 +02:00
|
|
|
QPointer<Internal::FindToolBar> m_subWidget;
|
2018-07-21 21:11:46 +02:00
|
|
|
bool m_lightColored = false;
|
2008-12-02 12:01:29 +01:00
|
|
|
static FindToolBarPlaceHolder *m_current;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Core
|