qmlfrontend/preview_image_provider.h
author S.D.
Tue, 27 Sep 2022 14:59:03 +0300
changeset 15878 fc3cb23fd26f
parent 14154 8354b390f1a2
permissions -rw-r--r--
Allow to see rooms of incompatible versions in the lobby For the new clients the room version is shown in a separate column. There is also a hack for previous versions clients: the room vesion specifier is prepended to the room names for rooms of incompatible versions, and the server shows 'incompatible version' error if the client tries to join them.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     1
#ifndef PREVIEWIMAGEPROVIDER_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     2
#define PREVIEWIMAGEPROVIDER_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     3
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     4
#include <QPixmap>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     5
#include <QQuickImageProvider>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     6
#include <QSize>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     7
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     8
class PreviewImageProvider : public QQuickImageProvider {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     9
 public:
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    10
  PreviewImageProvider();
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    11
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    12
  QPixmap requestPixmap(const QString &id, QSize *size,
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    13
                        const QSize &requestedSize);
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    14
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    15
  void setImage(const QImage &preview);
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    16
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    17
 private:
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    18
  QPixmap m_px;
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    19
};
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    20
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    21
#endif  // PREVIEWIMAGEPROVIDER_H