swift
viewbaseproxystyle.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2016 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_VIEWBASE_PROXYSTYLE_H
7 #define SWIFT_GUI_VIEWBASE_PROXYSTYLE_H
8 
9 #include <QPainter>
10 #include <QProxyStyle>
11 
12 namespace swift::gui::views
13 {
14  class CViewBaseNonTemplate;
15 
19  class CViewBaseProxyStyle : public QProxyStyle
20  {
21  Q_OBJECT
22 
23  public:
25  CViewBaseProxyStyle(CViewBaseNonTemplate *view, QStyle *style = nullptr);
26 
29 
31  virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter,
32  const QWidget *widget) const override;
34 
35  private:
36  CViewBaseNonTemplate *m_view = nullptr;
37  };
38 } // namespace swift::gui::views
39 #endif // SWIFT_GUI_VIEWBASE_PROXYSTYLE_H
Non templated base class, allows Q_OBJECT and signals / slots to be used.
Definition: viewbase.h:87
Proxy for style of our views.
CViewBaseProxyStyle(CViewBaseNonTemplate *view, QStyle *style=nullptr)
Constructor.
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
Views, mainly QTableView.