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

new photo viewer done, testing, added compressed checkbox in send-from-clipboard

This commit is contained in:
John Preston
2014-08-11 13:03:45 +04:00
parent f62db48251
commit d26afe1b64
29 changed files with 1274 additions and 491 deletions

View File

@@ -81,54 +81,3 @@ private:
BoxShadow shadow;
};
class LayerWidget : public QWidget, public Animated {
Q_OBJECT
public:
LayerWidget(QWidget *parent, PhotoData *photo, HistoryItem *item);
LayerWidget(QWidget *parent, VideoData *video, HistoryItem *item);
PhotoData *photoShown();
bool event(QEvent *e);
void touchEvent(QTouchEvent *e);
void paintEvent(QPaintEvent *e);
void keyPressEvent(QKeyEvent *e);
void mousePressEvent(QMouseEvent *e);
void resizeEvent(QResizeEvent *e);
void contextMenuEvent(QContextMenuEvent *e);
bool animStep(float64 ms);
~LayerWidget();
public slots:
void onTouchTimer();
void saveContextImage();
void copyContextImage();
void startHide();
void deleteMessage();
void forwardMessage();
void onMenuDestroy(QObject *obj);
private:
PhotoData *photo;
VideoData *video;
anim::fvalue aBackground, aOver;
anim::ivalue iX, iY, iW;
anim::transition iCoordFunc, aBackgroundFunc, aOverFunc;
bool hiding;
bool _touchPress, _touchMove, _touchRightButton;
QTimer _touchTimer;
QPoint _touchStart;
QMenu *_menu;
};