Files
create/src/Gui/QSint/actionpanel/taskheader_p.h
wmayer 09ae3b2ab8 Gui: Qt6 port
* QString::indexOf() is now marked as [[nodiscard]]
* Replace deprecated methods of QMessageBox
* QMouseEvent::globalPos() is deprecated, use globalPosition().toPoint()
* QWidget::enterEvent() requires a QEnterEvent as argument
* QLibraryInfo::location() is deprecated, use path()
* QVariant::Type is deprecated, use QMetaType::Type
* QVariant::canConvert(int) is deprecated, use QVariant::canConvert(QMetaType) or QVariant::canConvert<T>()
* QMessageBox::standardIcon is deprecated, use QStyle::standardIcon()
* Replace deprecated method QMessageBox::question(), ...
* QApplication::fontMetrics() is deprecated
* QDropEvent::mouseButtons() is deprecated, use buttons()
* QDropEvent::keyboardModifiers() is deprecated, use modifiers()
* Constructor of QFontDatabase is deprecated, use static methods instead
* Qt::AA_DisableHighDpiScaling is deprecated
* Qt::AA_EnableHighDpiScaling is deprecated
* Qt::AA_UseHighDpiPixmaps is deprecated
2022-12-31 21:54:45 +01:00

79 lines
1.8 KiB
C++

/***************************************************************************
* *
* Copyright: https://code.google.com/p/qsint/ *
* License: LGPL *
* *
***************************************************************************/
#ifndef TASKHEADER_P_H
#define TASKHEADER_P_H
#include "actionlabel.h"
#include "actionpanelscheme.h"
#include <QLabel>
namespace QSint
{
class TaskHeader : public QFrame
{
Q_OBJECT
typedef QFrame BaseClass;
friend class ActionGroup;
public:
TaskHeader(const QIcon &icon, const QString &title, bool expandable, QWidget *parent = nullptr);
inline bool expandable() const { return myExpandable; }
void setExpandable(bool expandable);
void setScheme(ActionPanelScheme *scheme);
Q_SIGNALS:
void activated();
public:
void setFold(bool);
public Q_SLOTS:
void fold();
protected Q_SLOTS:
void animate();
protected:
void paintEvent ( QPaintEvent * event ) override;
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
void enterEvent ( QEvent * event ) override;
#else
void enterEvent ( QEnterEvent * event ) override;
#endif
void leaveEvent ( QEvent * event ) override;
void mouseReleaseEvent ( QMouseEvent * event ) override;
void keyPressEvent ( QKeyEvent * event ) override;
void keyReleaseEvent ( QKeyEvent * event ) override;
bool eventFilter(QObject *obj, QEvent *event) override;
void changeIcons();
ActionPanelScheme *myScheme;
bool myExpandable;
bool m_over, m_buttonOver, m_fold;
double m_opacity;
ActionLabel *myTitle;
QLabel *myButton;
};
}
#endif // TASKHEADER_P_H