2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Make tabbed selector working in scheduled section.

This commit is contained in:
John Preston
2019-08-16 15:44:20 +03:00
parent 385a7eb00d
commit 3e895d0e85
27 changed files with 341 additions and 250 deletions

View File

@@ -27,14 +27,16 @@ class TabbedPanel : public Ui::RpWidget {
public:
TabbedPanel(
QWidget *parent,
not_null<Window::SessionController*> controller);
not_null<Window::SessionController*> controller,
not_null<TabbedSelector*> selector);
TabbedPanel(
QWidget *parent,
not_null<Window::SessionController*> controller,
object_ptr<TabbedSelector> selector);
object_ptr<TabbedSelector> takeSelector();
QPointer<TabbedSelector> getSelector() const;
[[nodiscard]] bool isSelectorStolen() const;
[[nodiscard]] not_null<TabbedSelector*> selector() const;
void moveBottomRight(int bottom, int right);
void setDesiredHeightValues(
float64 ratio,
@@ -64,6 +66,12 @@ protected:
bool eventFilter(QObject *obj, QEvent *e) override;
private:
TabbedPanel(
QWidget *parent,
not_null<Window::SessionController*> controller,
object_ptr<TabbedSelector> ownedSelector,
TabbedSelector *nonOwnedSelector);
void hideByTimerOrLeave();
void moveByBottom();
bool isDestroying() const {
@@ -89,8 +97,9 @@ private:
bool preventAutoHide() const;
void updateContentHeight();
not_null<Window::SessionController*> _controller;
object_ptr<TabbedSelector> _selector;
const not_null<Window::SessionController*> _controller;
const object_ptr<TabbedSelector> _ownedSelector = { nullptr };
const not_null<TabbedSelector*> _selector;
int _contentMaxHeight = 0;
int _contentHeight = 0;