Files
pilotclient/src/blackgui/horizontalcombobox.h
Lars Toenning bcc4bdd31e Add SPDX identifiers for REUSE compliance
Co-authored-by: Mat Sutcliffe <oktal3700@gmail.com>
2023-10-03 09:29:49 +02:00

36 lines
864 B
C++

// SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
//! \file
#ifndef BLACKGUI_HORIZONTALCOMBOBOX_H
#define BLACKGUI_HORIZONTALCOMBOBOX_H
#include <QComboBox>
#include <QListView>
namespace BlackGui
{
//! A combobox where the dropdown is horizontally and not vertically
class CHorizontalComboBox : public QComboBox
{
Q_OBJECT
public:
//! ComboBox displaying the values horizontally
explicit CHorizontalComboBox(QWidget *parent = nullptr);
//! \copydoc QComboBox::showPopup
virtual void showPopup() override;
//! Width of the popup
void setPopupWidth(int w);
private:
QListView *m_view = nullptr;
int m_popupWidth = -1;
};
} // ns
#endif // guard