mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
36 lines
864 B
C++
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
|