35 lines
1.0 KiB
C++

#ifndef NORMALCONTAINER_H
#define NORMALCONTAINER_H
#include "abstractcontainer.h"
class NormalContainer : public AbstractContainer
{
Q_OBJECT
public:
explicit NormalContainer(TrayPlugin *trayPlugin, QWidget *parent = nullptr);
// AbstractContainer interface
public:
bool acceptWrapper(FashionTrayWidgetWrapper *wrapper) Q_DECL_OVERRIDE;
void addWrapper(FashionTrayWidgetWrapper *wrapper) Q_DECL_OVERRIDE;
void refreshVisible() Q_DECL_OVERRIDE;
void setExpand(const bool expand) Q_DECL_OVERRIDE;
QSize sizeHint() const override;
protected:
int whereToInsert(FashionTrayWidgetWrapper *wrapper) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent *event) override;
private:
int whereToInsertByDefault(FashionTrayWidgetWrapper *wrapper) const;
int whereToInsertAppTrayByDefault(FashionTrayWidgetWrapper *wrapper) const;
int whereToInsertSystemTrayByDefault(FashionTrayWidgetWrapper *wrapper) const;
void compositeChanged();
private:
mutable QVariantAnimation *m_sizeAnimation;
};
#endif // NORMALCONTAINER_H