-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathqpixmap_implement.h
More file actions
33 lines (30 loc) · 1.13 KB
/
Copy pathqpixmap_implement.h
File metadata and controls
33 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "framework.h"
#include <qpixmap.h>
#include "core/qsize_implement.h"
#include "core/qrect_implement.h"
#include "qcolor_implement.h"
#include "qimage_implement.h"
#include "qpixmap_p.h"
#include "qpixmap_wrapper.h"
namespace shelllet {
namespace gui {
using namespace core;
class Pixmap : public QPixmapWrapper<QPixmap, Pixmap, true>
{
using ReturnType = QPixmapPrivate<QPixmap, true>;
using ReturnType2 = QPixmapPrivate<QPixmap, false>;
ReturnType* Private(const v8::FunctionCallbackInfo<v8::Value>& args) {
return new ReturnType(args.GetIsolate(), args.This());
}
public:
Pixmap(const v8::FunctionCallbackInfo<v8::Value>& args) : QPixmapWrapper(*Private(args), args) {}
Pixmap(QPixmap* p, const v8::FunctionCallbackInfo<v8::Value>& args) : QPixmapWrapper(*new ReturnType2(args.GetIsolate(), args.This(), p), args)
{
}
Pixmap(v8::Isolate* isolate, const v8::Local<v8::FunctionTemplate>& tpl) :QPixmapWrapper(isolate, tpl) {}
Pixmap(v8::Isolate* isolate, const v8::Local<v8::ObjectTemplate>& proto) :QPixmapWrapper(isolate, proto) {}
static const char* Name() { return "Pixmap"; }
};
}
}