This repository has been archived on 2025-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
organicmaps-tmp/qt/qt_common/spinner.hpp
2017-04-28 15:02:06 +03:00

23 lines
357 B
C++

#pragma once
#include <cstddef>
#include <vector>
#include <QtGui/QPixmap>
#include <QtWidgets/QLabel>
class Spinner : private QLabel
{
public:
Spinner();
void Show();
void Hide();
QLabel & AsWidget() { return static_cast<QLabel &>(*this); }
private:
std::vector<QPixmap> m_pixmaps;
QTimer * m_timer = nullptr;
size_t m_progress = 0;
};