diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4cb44b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/deploy diff --git a/darwin/Contents/Info.plist b/darwin/Contents/Info.plist new file mode 100644 index 0000000..96ae0e5 --- /dev/null +++ b/darwin/Contents/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleExecutable + annie-mingui + CFBundleGetInfoString + Created by Qt/QMake + CFBundleIconFile + annie-mingui.icns + CFBundleIdentifier + org.zhimingwang.annie-mingui + CFBundleName + annie-mingui + CFBundlePackageType + APPL + CFBundleShortVersionString + 2020.02.09 + CFBundleSignature + ???? + LSMinimumSystemVersion + 10.11 + NOTE + This file was generated by Qt/QMake. + NSPrincipalClass + NSApplication + NSHighResolutionCapable + + NSSupportsAutomaticGraphicsSwitching + + + diff --git a/darwin/Contents/Resources/annie-mingui.icns b/darwin/Contents/Resources/annie-mingui.icns new file mode 100644 index 0000000..616032b Binary files /dev/null and b/darwin/Contents/Resources/annie-mingui.icns differ diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000..78ca029 Binary files /dev/null and b/icon.ico differ diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..997fe70 Binary files /dev/null and b/icon.png differ diff --git a/icon.rc b/icon.rc new file mode 100644 index 0000000..1bc463a --- /dev/null +++ b/icon.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "icon.ico" diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..00d0b68 --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ +icons diff --git a/main.go b/main.go new file mode 100644 index 0000000..263734b --- /dev/null +++ b/main.go @@ -0,0 +1,521 @@ +package main + +import ( + "bufio" + "flag" + "fmt" + "io" + "net/url" + "os" + "os/signal" + "regexp" + "strings" + "syscall" + "time" + + "golang.org/x/text/language" + + "github.com/cloudfoundry-attic/jibber_jabber" + "github.com/golang/glog" + + "github.com/therecipe/qt/core" + "github.com/therecipe/qt/gui" + "github.com/therecipe/qt/widgets" + + "github.com/iawia002/annie/config" + "github.com/iawia002/annie/downloader" + "github.com/iawia002/annie/extractors/bcy" + "github.com/iawia002/annie/extractors/bilibili" + "github.com/iawia002/annie/extractors/douyin" + "github.com/iawia002/annie/extractors/douyu" + "github.com/iawia002/annie/extractors/facebook" + "github.com/iawia002/annie/extractors/geekbang" + "github.com/iawia002/annie/extractors/instagram" + "github.com/iawia002/annie/extractors/iqiyi" + "github.com/iawia002/annie/extractors/mgtv" + "github.com/iawia002/annie/extractors/miaopai" + "github.com/iawia002/annie/extractors/netease" + "github.com/iawia002/annie/extractors/pixivision" + "github.com/iawia002/annie/extractors/pornhub" + "github.com/iawia002/annie/extractors/qq" + "github.com/iawia002/annie/extractors/tangdou" + "github.com/iawia002/annie/extractors/tiktok" + "github.com/iawia002/annie/extractors/tumblr" + "github.com/iawia002/annie/extractors/twitter" + "github.com/iawia002/annie/extractors/udn" + "github.com/iawia002/annie/extractors/universal" + "github.com/iawia002/annie/extractors/vimeo" + "github.com/iawia002/annie/extractors/weibo" + "github.com/iawia002/annie/extractors/xvideos" + "github.com/iawia002/annie/extractors/yinyuetai" + "github.com/iawia002/annie/extractors/youku" + "github.com/iawia002/annie/extractors/youtube" + "github.com/iawia002/annie/utils" + + "github.com/fanaticscripter/annie-mingui/util" +) + +const appName = "annie-mingui" +const appAuthor = "Zhiming Wang" +const appAuthorDomain = "zhimingwang.org" +const about = `

annie-mingui v2020.02.09

+

Copyright (c) 2020 Zhiming Wang

+

annie-mingui is a Qt wrapper for iawia002/annie the video downloader. Credits:

+ +

Project URL: github.com/fanaticscripter/annie-mingui.

+` + +// GUIConfig carries all application configurations. +type GUIConfig struct { + DestinationFolder string + PlaylistEnabled bool +} + +// GetDestinationFolder attempts to retrieve (if not yet) and returns the +// configured destination folder. +func (c *GUIConfig) GetDestinationFolder() string { + fallback := util.DefaultDownloadsFolder() + val := settings.Value("destinationFolder", core.NewQVariant12(fallback)).ToString() + c.DestinationFolder = val + return val +} + +// GetPlaylistEnabled attempts to retrieve (if not yet) and returns the +// configured value of whether playlist download is enabled. +func (c *GUIConfig) GetPlaylistEnabled() bool { + fallback := true + val := settings.Value("playlistEnabled", core.NewQVariant9(fallback)).ToBool() + c.PlaylistEnabled = val + return val +} + +// SetDestinationFolder sets and persists the configured destination folder. +func (c *GUIConfig) SetDestinationFolder(val string) { + c.DestinationFolder = val + go func() { settings.SetValue("destinationFolder", core.NewQVariant12(val)) }() +} + +// SetPlaylistEnabled sets and persists the configured value of whether playlist +// download is enabled. +func (c *GUIConfig) SetPlaylistEnabled(val bool) { + c.PlaylistEnabled = val + go func() { settings.SetValue("playlistEnabled", core.NewQVariant9(val)) }() +} + +// LoadGUIConfig loads config values from persisted settings if possible, or +// loads defaults otherwise. +func LoadGUIConfig() *GUIConfig { + c := &GUIConfig{} + c.GetDestinationFolder() + c.GetPlaylistEnabled() + return c +} + +var settings *core.QSettings +var guiConfig *GUIConfig + +var locales = map[string]map[string]string{ + "zh-Hans": { + "About": "关于", + "Application": "应用", + "Awaiting user input": "等待用户输入", + "Destination folder": "目标文件夹", + "Download": "下载", + "Download playlists": "下载完整播单", + "Download started": "下载已开始", + "On network errors, e.g. HTTP 403, please retry a few times.": "如遇HTTP 403等网络错误,请重试几次。", + "Pick another folder": "选择文件夹", + "Video URL": "视频链接", + }, +} +var locale map[string]string + +// Poor man's gettext. +func tr(s string) string { + t, ok := locale[s] + if ok { + return t + } + return s +} + +// ----- START ANNIE CODE ----- +// +// The following code is slightly modified from +// +// https://github.com/iawia002/annie/blob/master/main.go + +func printError(url string, err error) { + fmt.Printf( + "Downloading %s error:\n%s\n", url, err, + ) +} + +func download(videoURL string) bool { + var ( + domain string + err error + data []downloader.Data + ) + bilibiliShortLink := utils.MatchOneOf(videoURL, `^(av|ep)\d+`) + if bilibiliShortLink != nil && len(bilibiliShortLink) > 1 { + bilibiliURL := map[string]string{ + "av": "https://www.bilibili.com/video/", + "ep": "https://www.bilibili.com/bangumi/play/", + } + domain = "bilibili" + videoURL = bilibiliURL[bilibiliShortLink[1]] + videoURL + } else { + u, err := url.ParseRequestURI(videoURL) + if err != nil { + printError(videoURL, err) + return false + } + domain = utils.Domain(u.Host) + } + switch domain { + case "douyin", "iesdouyin": + data, err = douyin.Extract(videoURL) + case "bilibili": + data, err = bilibili.Extract(videoURL) + case "bcy": + data, err = bcy.Extract(videoURL) + case "pixivision": + data, err = pixivision.Extract(videoURL) + case "youku": + data, err = youku.Extract(videoURL) + case "youtube", "youtu": // youtu.be + data, err = youtube.Extract(videoURL) + case "iqiyi": + data, err = iqiyi.Extract(videoURL) + case "mgtv": + data, err = mgtv.Extract(videoURL) + case "tangdou": + data, err = tangdou.Extract(videoURL) + case "tumblr": + data, err = tumblr.Extract(videoURL) + case "vimeo": + data, err = vimeo.Extract(videoURL) + case "facebook": + data, err = facebook.Extract(videoURL) + case "douyu": + data, err = douyu.Extract(videoURL) + case "miaopai": + data, err = miaopai.Extract(videoURL) + case "163": + data, err = netease.Extract(videoURL) + case "weibo": + data, err = weibo.Extract(videoURL) + case "instagram": + data, err = instagram.Extract(videoURL) + case "twitter": + data, err = twitter.Extract(videoURL) + case "qq": + data, err = qq.Extract(videoURL) + case "yinyuetai": + data, err = yinyuetai.Extract(videoURL) + case "geekbang": + data, err = geekbang.Extract(videoURL) + case "pornhub": + data, err = pornhub.Extract(videoURL) + case "xvideos": + data, err = xvideos.Extract(videoURL) + case "udn": + data, err = udn.Extract(videoURL) + case "tiktok": + data, err = tiktok.Extract(videoURL) + default: + data, err = universal.Extract(videoURL) + } + if err != nil { + // if this error occurs, it means that an error occurred before actually starting to extract data + // (there is an error in the preparation step), and the data list is empty. + printError(videoURL, err) + return false + } + var isErr bool + for _, item := range data { + if item.Err != nil { + // if this error occurs, the preparation step is normal, but the data extraction is wrong. + // the data is an empty struct. + printError(item.URL, item.Err) + isErr = true + continue + } + err = downloader.Download(item, videoURL, config.ChunkSizeMB) + if err != nil { + printError(item.URL, err) + isErr = true + } + } + return !isErr +} + +// ----- END ANNIE CODE ----- + +// PlainTextEdit extends QPlainTextEdit. +type PlainTextEdit struct { + widgets.QPlainTextEdit + + _ func() `constructor:"init"` + + _ func(string) `slot:"addLine"` + + carriageReturnInAction bool +} + +func (p *PlainTextEdit) init() { + p.carriageReturnInAction = false + p.ConnectAddLine(p.addLine) +} + +// addLines adds a line that might end in LF, CRLF, CR, or none of the above (in +// which case an LF is appended). Aware of CR and scroll position. +func (p *PlainTextEdit) addLine(line string) { + scrollBar := p.VerticalScrollBar() + currentScroll := scrollBar.Value() + userScrolledBack := currentScroll != scrollBar.Maximum() + + cursor := p.TextCursor() + cursor.MovePosition(gui.QTextCursor__End, gui.QTextCursor__MoveAnchor, 1) + if p.carriageReturnInAction { + // Remove last line. + cursor.Select(gui.QTextCursor__LineUnderCursor) + cursor.RemoveSelectedText() + } + p.carriageReturnInAction = false + if len(line) > 0 { + switch lastCh := line[len(line)-1]; lastCh { + case '\n': + cursor.InsertText(line) + case '\r': + cursor.InsertText(line[:len(line)-1]) + p.carriageReturnInAction = true + default: + cursor.InsertText(line + "\n") + } + } else { + cursor.InsertText("\n") + } + + if userScrolledBack { + scrollBar.SetValue(currentScroll) + } else { + scrollBar.SetValue(scrollBar.Maximum()) + } +} + +type outputBuffer struct { + textEdit *PlainTextEdit + reader *bufio.Reader + scanner *bufio.Scanner +} + +func newOutputBuffer(textEdit *PlainTextEdit) *outputBuffer { + return &outputBuffer{ + textEdit: textEdit, + reader: nil, + scanner: nil, + } +} + +func (b *outputBuffer) attachReader(r io.Reader) { + b.reader = bufio.NewReaderSize(r, 64*1024) + b.scanner = bufio.NewScanner(b.reader) + re := regexp.MustCompile(`^[^\r\n]*(\r\n|\r|\n)`) + b.scanner.Split(func(data []byte, atEOF bool) (advance int, token []byte, err error) { + token = re.Find(data) + if token != nil { + return len(token), token, nil + } + if !atEOF { + return 0, nil, nil + } + return 0, data, bufio.ErrFinalToken + }) +} + +func (b *outputBuffer) addLine(line string) { + b.textEdit.AddLine(line) +} + +func (b *outputBuffer) readLineAndUpdate() (fullLine string, err error) { + if !b.scanner.Scan() { + err = b.scanner.Err() + if err != nil { + return "", err + } + err = io.EOF + } + fullLine = b.scanner.Text() + if len(fullLine) > 0 { + b.addLine(fullLine) + } + return +} + +func init() { + flag.Parse() + + userLang, err := jibber_jabber.DetectIETF() + if err != nil { + userLang = "en" + } + availableLangs := []string{"en"} + availableTags := []language.Tag{language.English} + for l := range locales { + availableLangs = append(availableLangs, l) + availableTags = append(availableTags, language.Make(l)) + } + matcher := language.NewMatcher(availableTags) + _, index, _ := matcher.Match(language.Make(userLang)) + locale = locales[availableLangs[index]] + + core.QCoreApplication_SetOrganizationName(appAuthor) + core.QCoreApplication_SetOrganizationDomain(appAuthorDomain) + + settings = core.NewQSettings5(nil) + guiConfig = LoadGUIConfig() +} + +func initAboutWindow() *widgets.QDialog { + w := widgets.NewQDialog(nil, 0) + label := widgets.NewQLabel2(about, nil, 0) + label.SetOpenExternalLinks(true) + layout := widgets.NewQVBoxLayout() + layout.AddWidget(label, 0, 0) + w.SetLayout(layout) + return w +} + +func main() { + widgets.NewQApplication(len(os.Args), os.Args) + + window := widgets.NewQMainWindow(nil, 0) + window.SetWindowTitle(appName) + window.ConnectCloseEvent(func(*gui.QCloseEvent) { + settings.SetValue("_geometry", core.NewQVariant13(window.SaveGeometry())) + settings.SetValue("_windowState", core.NewQVariant13(window.SaveState(0))) + }) + + window.RestoreGeometry(settings.Value("_geometry", core.NewQVariant()).ToByteArray()) + window.RestoreState(settings.Value("_windowState", core.NewQVariant()).ToByteArray(), 0) + + centralWidget := widgets.NewQWidget(window, 0) + window.SetCentralWidget(centralWidget) + + menuBar := window.MenuBar() + applicationMenu := menuBar.AddMenu2(tr("Application")) + aboutWindow := initAboutWindow() + aboutAction := applicationMenu.AddAction(tr("About")) + aboutAction.SetMenuRole(widgets.QAction__AboutRole) + aboutAction.ConnectTriggered(func(bool) { + aboutWindow.Show() + aboutWindow.Raise() + }) + + urlLineEdit := widgets.NewQLineEdit(nil) + + folderLineEdit := widgets.NewQLineEdit2(guiConfig.DestinationFolder, nil) + folderLineEdit.SetReadOnly(true) + folderLineEdit.SetMinimumWidth(250) + folderButton := widgets.NewQPushButton2(tr("Pick another folder"), nil) + folderDialog := widgets.NewQFileDialog2(nil, tr("Destination folder"), guiConfig.DestinationFolder, "") + folderDialog.SetFileMode(widgets.QFileDialog__DirectoryOnly) + folderButton.ConnectClicked(func(bool) { + if folderDialog.Exec() != int(widgets.QDialog__Accepted) { + return + } + destinationFolder := core.QDir_ToNativeSeparators(folderDialog.SelectedFiles()[0]) + folderLineEdit.SetText(destinationFolder) + guiConfig.SetDestinationFolder(destinationFolder) + }) + folderHBoxLayout := widgets.NewQHBoxLayout() + folderHBoxLayout.AddWidget(folderLineEdit, 1, 0) + folderHBoxLayout.AddWidget(folderButton, 0, 0) + + playlistCheckBox := widgets.NewQCheckBox(nil) + playlistCheckBox.SetChecked(guiConfig.PlaylistEnabled) + playlistCheckBox.ConnectToggled(func(checked bool) { + guiConfig.SetPlaylistEnabled(checked) + }) + + inputFormLayout := widgets.NewQFormLayout(nil) + inputFormLayout.SetFieldGrowthPolicy(widgets.QFormLayout__AllNonFixedFieldsGrow) + inputFormLayout.AddRow3(tr("Video URL"), urlLineEdit) + inputFormLayout.AddRow4(tr("Destination folder"), folderHBoxLayout) + inputFormLayout.AddRow3(tr("Download playlists"), playlistCheckBox) + + outputTextEdit := NewPlainTextEdit(nil) + outputTextEdit.SetReadOnly(true) + outputTextEdit.SetMinimumHeight(400) + outputTextEdit.SetMinimumWidth(1000) + outputTextEdit.SetLineWrapMode(widgets.QPlainTextEdit__NoWrap) + monospaceFont := gui.NewQFont2("Courier", -1, -1, false) + monospaceFont.SetStyleHint(gui.QFont__Monospace, 0) + outputTextEdit.SetFont(monospaceFont) + output := newOutputBuffer(outputTextEdit) + output.addLine(tr("Awaiting user input")) + + downloadButton := widgets.NewQPushButton2(tr("Download"), nil) + downloadButton.ConnectClicked(func(bool) { + url := strings.TrimSpace(urlLineEdit.Text()) + if len(url) > 0 { + output.addLine(time.Now().Format("15:04:05 ") + tr("Download started")) + + config.OutputPath = guiConfig.DestinationFolder + config.Playlist = guiConfig.PlaylistEnabled + glog.Infof("downloading %s => %s", url, config.OutputPath) + + savedStdout := os.Stdout + r, w, _ := os.Pipe() + output.attachReader(r) + os.Stdout = w + + go func() { + for { + _, err := output.readLineAndUpdate() + if err != nil { + if err == io.EOF { + break + } + glog.Fatal(err) + } + // fmt.Fprint(savedStdout, line) + } + output.addLine("") + }() + + go func() { + if !download(url) { + fmt.Println(tr("On network errors, e.g. HTTP 403, please retry a few times.")) + } + w.Close() + os.Stdout = savedStdout + }() + } + }) + + layout := widgets.NewQVBoxLayout() + layout.AddLayout(inputFormLayout, 0) + layout.AddWidget(downloadButton, 0, 0) + layout.AddWidget(outputTextEdit, 1, 0) + centralWidget.SetLayout(layout) + + window.Show() + + sigs := make(chan os.Signal) + signal.Notify(sigs, syscall.SIGSEGV, syscall.SIGABRT) + go func() { + for { + sig := <-sigs + glog.Error(sig) + } + }() + + widgets.QApplication_Exec() +} diff --git a/moc.cpp b/moc.cpp new file mode 100644 index 0000000..bcbe30b --- /dev/null +++ b/moc.cpp @@ -0,0 +1,787 @@ + + +#define protected public +#define private public + +#include "moc.h" +#include "_cgo_export.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef QT_QML_LIB + #include +#endif + + +class PlainTextEditb1a9c9: public QPlainTextEdit +{ +Q_OBJECT +public: + PlainTextEditb1a9c9(QWidget *parent = Q_NULLPTR) : QPlainTextEdit(parent) {qRegisterMetaType("quintptr");PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType();PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaTypes();callbackPlainTextEditb1a9c9_Constructor(this);}; + PlainTextEditb1a9c9(const QString &text, QWidget *parent = Q_NULLPTR) : QPlainTextEdit(text, parent) {qRegisterMetaType("quintptr");PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType();PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaTypes();callbackPlainTextEditb1a9c9_Constructor(this);}; + ~PlainTextEditb1a9c9() { callbackPlainTextEditb1a9c9_DestroyPlainTextEdit(this); }; + void appendHtml(const QString & html) { QByteArray* t950a39 = new QByteArray(html.toUtf8()); Moc_PackedString htmlPacked = { const_cast(t950a39->prepend("WHITESPACE").constData()+10), t950a39->size()-10, t950a39 };callbackPlainTextEditb1a9c9_AppendHtml(this, htmlPacked); }; + void appendPlainText(const QString & text) { QByteArray* t372ea0 = new QByteArray(text.toUtf8()); Moc_PackedString textPacked = { const_cast(t372ea0->prepend("WHITESPACE").constData()+10), t372ea0->size()-10, t372ea0 };callbackPlainTextEditb1a9c9_AppendPlainText(this, textPacked); }; + void Signal_BlockCountChanged(int newBlockCount) { callbackPlainTextEditb1a9c9_BlockCountChanged(this, newBlockCount); }; + bool canInsertFromMimeData(const QMimeData * source) const { return callbackPlainTextEditb1a9c9_CanInsertFromMimeData(const_cast(static_cast(this)), const_cast(source)) != 0; }; + void centerCursor() { callbackPlainTextEditb1a9c9_CenterCursor(this); }; + void changeEvent(QEvent * e) { callbackPlainTextEditb1a9c9_ChangeEvent(this, e); }; + void clear() { callbackPlainTextEditb1a9c9_Clear(this); }; + void contextMenuEvent(QContextMenuEvent * event) { callbackPlainTextEditb1a9c9_ContextMenuEvent(this, event); }; + void copy() { callbackPlainTextEditb1a9c9_Copy(this); }; + void Signal_CopyAvailable(bool yes) { callbackPlainTextEditb1a9c9_CopyAvailable(this, yes); }; + QMimeData * createMimeDataFromSelection() const { return static_cast(callbackPlainTextEditb1a9c9_CreateMimeDataFromSelection(const_cast(static_cast(this)))); }; + void Signal_CursorPositionChanged() { callbackPlainTextEditb1a9c9_CursorPositionChanged(this); }; + void cut() { callbackPlainTextEditb1a9c9_Cut(this); }; + void dragEnterEvent(QDragEnterEvent * e) { callbackPlainTextEditb1a9c9_DragEnterEvent(this, e); }; + void dragLeaveEvent(QDragLeaveEvent * e) { callbackPlainTextEditb1a9c9_DragLeaveEvent(this, e); }; + void dragMoveEvent(QDragMoveEvent * e) { callbackPlainTextEditb1a9c9_DragMoveEvent(this, e); }; + void dropEvent(QDropEvent * e) { callbackPlainTextEditb1a9c9_DropEvent(this, e); }; + void focusInEvent(QFocusEvent * e) { callbackPlainTextEditb1a9c9_FocusInEvent(this, e); }; + bool focusNextPrevChild(bool next) { return callbackPlainTextEditb1a9c9_FocusNextPrevChild(this, next) != 0; }; + void focusOutEvent(QFocusEvent * e) { callbackPlainTextEditb1a9c9_FocusOutEvent(this, e); }; + void inputMethodEvent(QInputMethodEvent * e) { callbackPlainTextEditb1a9c9_InputMethodEvent(this, e); }; + QVariant inputMethodQuery(Qt::InputMethodQuery property) const { return *static_cast(callbackPlainTextEditb1a9c9_InputMethodQuery(const_cast(static_cast(this)), property)); }; + void insertFromMimeData(const QMimeData * source) { callbackPlainTextEditb1a9c9_InsertFromMimeData(this, const_cast(source)); }; + void insertPlainText(const QString & text) { QByteArray* t372ea0 = new QByteArray(text.toUtf8()); Moc_PackedString textPacked = { const_cast(t372ea0->prepend("WHITESPACE").constData()+10), t372ea0->size()-10, t372ea0 };callbackPlainTextEditb1a9c9_InsertPlainText(this, textPacked); }; + void keyPressEvent(QKeyEvent * e) { callbackPlainTextEditb1a9c9_KeyPressEvent(this, e); }; + void keyReleaseEvent(QKeyEvent * e) { callbackPlainTextEditb1a9c9_KeyReleaseEvent(this, e); }; + QVariant loadResource(int ty, const QUrl & name) { return *static_cast(callbackPlainTextEditb1a9c9_LoadResource(this, ty, const_cast(&name))); }; + void Signal_ModificationChanged(bool changed) { callbackPlainTextEditb1a9c9_ModificationChanged(this, changed); }; + void mouseDoubleClickEvent(QMouseEvent * e) { callbackPlainTextEditb1a9c9_MouseDoubleClickEvent(this, e); }; + void mouseMoveEvent(QMouseEvent * e) { callbackPlainTextEditb1a9c9_MouseMoveEvent(this, e); }; + void mousePressEvent(QMouseEvent * e) { callbackPlainTextEditb1a9c9_MousePressEvent(this, e); }; + void mouseReleaseEvent(QMouseEvent * e) { callbackPlainTextEditb1a9c9_MouseReleaseEvent(this, e); }; + void paintEvent(QPaintEvent * e) { callbackPlainTextEditb1a9c9_PaintEvent(this, e); }; + void paste() { callbackPlainTextEditb1a9c9_Paste(this); }; + void redo() { callbackPlainTextEditb1a9c9_Redo(this); }; + void Signal_RedoAvailable(bool available) { callbackPlainTextEditb1a9c9_RedoAvailable(this, available); }; + void resizeEvent(QResizeEvent * e) { callbackPlainTextEditb1a9c9_ResizeEvent(this, e); }; + void scrollContentsBy(int dx, int dy) { callbackPlainTextEditb1a9c9_ScrollContentsBy(this, dx, dy); }; + void selectAll() { callbackPlainTextEditb1a9c9_SelectAll(this); }; + void Signal_SelectionChanged() { callbackPlainTextEditb1a9c9_SelectionChanged(this); }; + void setPlainText(const QString & text) { QByteArray* t372ea0 = new QByteArray(text.toUtf8()); Moc_PackedString textPacked = { const_cast(t372ea0->prepend("WHITESPACE").constData()+10), t372ea0->size()-10, t372ea0 };callbackPlainTextEditb1a9c9_SetPlainText(this, textPacked); }; + void showEvent(QShowEvent * vqs) { callbackPlainTextEditb1a9c9_ShowEvent(this, vqs); }; + void Signal_TextChanged() { callbackPlainTextEditb1a9c9_TextChanged(this); }; + void undo() { callbackPlainTextEditb1a9c9_Undo(this); }; + void Signal_UndoAvailable(bool available) { callbackPlainTextEditb1a9c9_UndoAvailable(this, available); }; + void Signal_UpdateRequest(const QRect & rect, int dy) { callbackPlainTextEditb1a9c9_UpdateRequest(this, const_cast(&rect), dy); }; + void wheelEvent(QWheelEvent * e) { callbackPlainTextEditb1a9c9_WheelEvent(this, e); }; + void zoomIn(int ran) { callbackPlainTextEditb1a9c9_ZoomIn(this, ran); }; + void zoomOut(int ran) { callbackPlainTextEditb1a9c9_ZoomOut(this, ran); }; + bool event(QEvent * event) { return callbackPlainTextEditb1a9c9_Event(this, event) != 0; }; + QSize minimumSizeHint() const { return *static_cast(callbackPlainTextEditb1a9c9_MinimumSizeHint(const_cast(static_cast(this)))); }; + void setupViewport(QWidget * viewport) { callbackPlainTextEditb1a9c9_SetupViewport(this, viewport); }; + QSize sizeHint() const { return *static_cast(callbackPlainTextEditb1a9c9_SizeHint(const_cast(static_cast(this)))); }; + bool viewportEvent(QEvent * event) { return callbackPlainTextEditb1a9c9_ViewportEvent(this, event) != 0; }; + QSize viewportSizeHint() const { return *static_cast(callbackPlainTextEditb1a9c9_ViewportSizeHint(const_cast(static_cast(this)))); }; + void actionEvent(QActionEvent * event) { callbackPlainTextEditb1a9c9_ActionEvent(this, event); }; + bool close() { return callbackPlainTextEditb1a9c9_Close(this) != 0; }; + void closeEvent(QCloseEvent * event) { callbackPlainTextEditb1a9c9_CloseEvent(this, event); }; + void Signal_CustomContextMenuRequested(const QPoint & pos) { callbackPlainTextEditb1a9c9_CustomContextMenuRequested(this, const_cast(&pos)); }; + void enterEvent(QEvent * event) { callbackPlainTextEditb1a9c9_EnterEvent(this, event); }; + bool hasHeightForWidth() const { return callbackPlainTextEditb1a9c9_HasHeightForWidth(const_cast(static_cast(this))) != 0; }; + int heightForWidth(int w) const { return callbackPlainTextEditb1a9c9_HeightForWidth(const_cast(static_cast(this)), w); }; + void hide() { callbackPlainTextEditb1a9c9_Hide(this); }; + void hideEvent(QHideEvent * event) { callbackPlainTextEditb1a9c9_HideEvent(this, event); }; + void initPainter(QPainter * painter) const { callbackPlainTextEditb1a9c9_InitPainter(const_cast(static_cast(this)), painter); }; + void leaveEvent(QEvent * event) { callbackPlainTextEditb1a9c9_LeaveEvent(this, event); }; + void lower() { callbackPlainTextEditb1a9c9_Lower(this); }; + int metric(QPaintDevice::PaintDeviceMetric m) const { return callbackPlainTextEditb1a9c9_Metric(const_cast(static_cast(this)), m); }; + void moveEvent(QMoveEvent * event) { callbackPlainTextEditb1a9c9_MoveEvent(this, event); }; + bool nativeEvent(const QByteArray & eventType, void * message, long * result) { return callbackPlainTextEditb1a9c9_NativeEvent(this, const_cast(&eventType), message, result) != 0; }; + QPaintEngine * paintEngine() const { return static_cast(callbackPlainTextEditb1a9c9_PaintEngine(const_cast(static_cast(this)))); }; + void raise() { callbackPlainTextEditb1a9c9_Raise(this); }; + void repaint() { callbackPlainTextEditb1a9c9_Repaint(this); }; + void setDisabled(bool disable) { callbackPlainTextEditb1a9c9_SetDisabled(this, disable); }; + void setEnabled(bool vbo) { callbackPlainTextEditb1a9c9_SetEnabled(this, vbo); }; + void setFocus() { callbackPlainTextEditb1a9c9_SetFocus2(this); }; + void setHidden(bool hidden) { callbackPlainTextEditb1a9c9_SetHidden(this, hidden); }; + void setStyleSheet(const QString & styleSheet) { QByteArray* t728ae7 = new QByteArray(styleSheet.toUtf8()); Moc_PackedString styleSheetPacked = { const_cast(t728ae7->prepend("WHITESPACE").constData()+10), t728ae7->size()-10, t728ae7 };callbackPlainTextEditb1a9c9_SetStyleSheet(this, styleSheetPacked); }; + void setVisible(bool visible) { callbackPlainTextEditb1a9c9_SetVisible(this, visible); }; + void setWindowModified(bool vbo) { callbackPlainTextEditb1a9c9_SetWindowModified(this, vbo); }; + void setWindowTitle(const QString & vqs) { QByteArray* tda39a3 = new QByteArray(vqs.toUtf8()); Moc_PackedString vqsPacked = { const_cast(tda39a3->prepend("WHITESPACE").constData()+10), tda39a3->size()-10, tda39a3 };callbackPlainTextEditb1a9c9_SetWindowTitle(this, vqsPacked); }; + void show() { callbackPlainTextEditb1a9c9_Show(this); }; + void showFullScreen() { callbackPlainTextEditb1a9c9_ShowFullScreen(this); }; + void showMaximized() { callbackPlainTextEditb1a9c9_ShowMaximized(this); }; + void showMinimized() { callbackPlainTextEditb1a9c9_ShowMinimized(this); }; + void showNormal() { callbackPlainTextEditb1a9c9_ShowNormal(this); }; + void tabletEvent(QTabletEvent * event) { callbackPlainTextEditb1a9c9_TabletEvent(this, event); }; + void update() { callbackPlainTextEditb1a9c9_Update(this); }; + void updateMicroFocus() { callbackPlainTextEditb1a9c9_UpdateMicroFocus(this); }; + void Signal_WindowIconChanged(const QIcon & icon) { callbackPlainTextEditb1a9c9_WindowIconChanged(this, const_cast(&icon)); }; + void Signal_WindowTitleChanged(const QString & title) { QByteArray* t3c6de1 = new QByteArray(title.toUtf8()); Moc_PackedString titlePacked = { const_cast(t3c6de1->prepend("WHITESPACE").constData()+10), t3c6de1->size()-10, t3c6de1 };callbackPlainTextEditb1a9c9_WindowTitleChanged(this, titlePacked); }; + void childEvent(QChildEvent * event) { callbackPlainTextEditb1a9c9_ChildEvent(this, event); }; + void connectNotify(const QMetaMethod & sign) { callbackPlainTextEditb1a9c9_ConnectNotify(this, const_cast(&sign)); }; + void customEvent(QEvent * event) { callbackPlainTextEditb1a9c9_CustomEvent(this, event); }; + void deleteLater() { callbackPlainTextEditb1a9c9_DeleteLater(this); }; + void Signal_Destroyed(QObject * obj) { callbackPlainTextEditb1a9c9_Destroyed(this, obj); }; + void disconnectNotify(const QMetaMethod & sign) { callbackPlainTextEditb1a9c9_DisconnectNotify(this, const_cast(&sign)); }; + bool eventFilter(QObject * watched, QEvent * event) { return callbackPlainTextEditb1a9c9_EventFilter(this, watched, event) != 0; }; + void Signal_ObjectNameChanged(const QString & objectName) { QByteArray* taa2c4f = new QByteArray(objectName.toUtf8()); Moc_PackedString objectNamePacked = { const_cast(taa2c4f->prepend("WHITESPACE").constData()+10), taa2c4f->size()-10, taa2c4f };callbackPlainTextEditb1a9c9_ObjectNameChanged(this, objectNamePacked); }; + void timerEvent(QTimerEvent * event) { callbackPlainTextEditb1a9c9_TimerEvent(this, event); }; +signals: +public slots: + void addLine(QString v0) { QByteArray* tea1dd7 = new QByteArray(v0.toUtf8()); Moc_PackedString v0Packed = { const_cast(tea1dd7->prepend("WHITESPACE").constData()+10), tea1dd7->size()-10, tea1dd7 };callbackPlainTextEditb1a9c9_AddLine(this, v0Packed); }; +private: +}; + +Q_DECLARE_METATYPE(PlainTextEditb1a9c9*) + + +void PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaTypes() { +} + +void PlainTextEditb1a9c9_AddLine(void* ptr, struct Moc_PackedString v0) +{ + QMetaObject::invokeMethod(static_cast(ptr), "addLine", Q_ARG(QString, QString::fromUtf8(v0.data, v0.len))); +} + +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType() +{ + return qRegisterMetaType(); +} + +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType2(char* typeName) +{ + return qRegisterMetaType(const_cast(typeName)); +} + +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType() +{ +#ifdef QT_QML_LIB + return qmlRegisterType(); +#else + return 0; +#endif +} + +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType2(char* uri, int versionMajor, int versionMinor, char* qmlName) +{ +#ifdef QT_QML_LIB + return qmlRegisterType(const_cast(uri), versionMajor, versionMinor, const_cast(qmlName)); +#else + return 0; +#endif +} + +void* PlainTextEditb1a9c9___scrollBarWidgets_atList(void* ptr, int i) +{ + return ({QWidget * tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; }); +} + +void PlainTextEditb1a9c9___scrollBarWidgets_setList(void* ptr, void* i) +{ + static_cast*>(ptr)->append(static_cast(i)); +} + +void* PlainTextEditb1a9c9___scrollBarWidgets_newList(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9___actions_atList(void* ptr, int i) +{ + return ({QAction * tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; }); +} + +void PlainTextEditb1a9c9___actions_setList(void* ptr, void* i) +{ + static_cast*>(ptr)->append(static_cast(i)); +} + +void* PlainTextEditb1a9c9___actions_newList(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9___addActions_actions_atList(void* ptr, int i) +{ + return ({QAction * tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; }); +} + +void PlainTextEditb1a9c9___addActions_actions_setList(void* ptr, void* i) +{ + static_cast*>(ptr)->append(static_cast(i)); +} + +void* PlainTextEditb1a9c9___addActions_actions_newList(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9___insertActions_actions_atList(void* ptr, int i) +{ + return ({QAction * tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; }); +} + +void PlainTextEditb1a9c9___insertActions_actions_setList(void* ptr, void* i) +{ + static_cast*>(ptr)->append(static_cast(i)); +} + +void* PlainTextEditb1a9c9___insertActions_actions_newList(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9___children_atList(void* ptr, int i) +{ + return ({QObject * tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; }); +} + +void PlainTextEditb1a9c9___children_setList(void* ptr, void* i) +{ + static_cast*>(ptr)->append(static_cast(i)); +} + +void* PlainTextEditb1a9c9___children_newList(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9___dynamicPropertyNames_atList(void* ptr, int i) +{ + return new QByteArray(({QByteArray tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; })); +} + +void PlainTextEditb1a9c9___dynamicPropertyNames_setList(void* ptr, void* i) +{ + static_cast*>(ptr)->append(*static_cast(i)); +} + +void* PlainTextEditb1a9c9___dynamicPropertyNames_newList(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9___findChildren_atList(void* ptr, int i) +{ + return ({QObject* tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; }); +} + +void PlainTextEditb1a9c9___findChildren_setList(void* ptr, void* i) +{ + static_cast*>(ptr)->append(static_cast(i)); +} + +void* PlainTextEditb1a9c9___findChildren_newList(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9___findChildren_atList3(void* ptr, int i) +{ + return ({QObject* tmp = static_cast*>(ptr)->at(i); if (i == static_cast*>(ptr)->size()-1) { static_cast*>(ptr)->~QList(); free(ptr); }; tmp; }); +} + +void PlainTextEditb1a9c9___findChildren_setList3(void* ptr, void* i) +{ + static_cast*>(ptr)->append(static_cast(i)); +} + +void* PlainTextEditb1a9c9___findChildren_newList3(void* ptr) +{ + Q_UNUSED(ptr); + return new QList(); +} + +void* PlainTextEditb1a9c9_NewPlainTextEdit(void* parent) +{ + return new PlainTextEditb1a9c9(static_cast(parent)); +} + +void* PlainTextEditb1a9c9_NewPlainTextEdit2(struct Moc_PackedString text, void* parent) +{ + return new PlainTextEditb1a9c9(QString::fromUtf8(text.data, text.len), static_cast(parent)); +} + +void PlainTextEditb1a9c9_DestroyPlainTextEdit(void* ptr) +{ + static_cast(ptr)->~PlainTextEditb1a9c9(); +} + +void PlainTextEditb1a9c9_DestroyPlainTextEditDefault(void* ptr) +{ + Q_UNUSED(ptr); + +} + +void PlainTextEditb1a9c9_AppendHtmlDefault(void* ptr, struct Moc_PackedString html) +{ + static_cast(ptr)->QPlainTextEdit::appendHtml(QString::fromUtf8(html.data, html.len)); +} + +void PlainTextEditb1a9c9_AppendPlainTextDefault(void* ptr, struct Moc_PackedString text) +{ + static_cast(ptr)->QPlainTextEdit::appendPlainText(QString::fromUtf8(text.data, text.len)); +} + +char PlainTextEditb1a9c9_CanInsertFromMimeDataDefault(void* ptr, void* source) +{ + return static_cast(ptr)->QPlainTextEdit::canInsertFromMimeData(static_cast(source)); +} + +void PlainTextEditb1a9c9_CenterCursorDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::centerCursor(); +} + +void PlainTextEditb1a9c9_ChangeEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::changeEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_ClearDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::clear(); +} + +void PlainTextEditb1a9c9_ContextMenuEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::contextMenuEvent(static_cast(event)); +} + +void PlainTextEditb1a9c9_CopyDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::copy(); +} + +void* PlainTextEditb1a9c9_CreateMimeDataFromSelectionDefault(void* ptr) +{ + return static_cast(ptr)->QPlainTextEdit::createMimeDataFromSelection(); +} + +void PlainTextEditb1a9c9_CutDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::cut(); +} + +void PlainTextEditb1a9c9_DragEnterEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::dragEnterEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_DragLeaveEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::dragLeaveEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_DragMoveEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::dragMoveEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_DropEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::dropEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_FocusInEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::focusInEvent(static_cast(e)); +} + +char PlainTextEditb1a9c9_FocusNextPrevChildDefault(void* ptr, char next) +{ + return static_cast(ptr)->QPlainTextEdit::focusNextPrevChild(next != 0); +} + +void PlainTextEditb1a9c9_FocusOutEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::focusOutEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_InputMethodEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::inputMethodEvent(static_cast(e)); +} + +void* PlainTextEditb1a9c9_InputMethodQueryDefault(void* ptr, long long property) +{ + return new QVariant(static_cast(ptr)->QPlainTextEdit::inputMethodQuery(static_cast(property))); +} + +void PlainTextEditb1a9c9_InsertFromMimeDataDefault(void* ptr, void* source) +{ + static_cast(ptr)->QPlainTextEdit::insertFromMimeData(static_cast(source)); +} + +void PlainTextEditb1a9c9_InsertPlainTextDefault(void* ptr, struct Moc_PackedString text) +{ + static_cast(ptr)->QPlainTextEdit::insertPlainText(QString::fromUtf8(text.data, text.len)); +} + +void PlainTextEditb1a9c9_KeyPressEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::keyPressEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_KeyReleaseEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::keyReleaseEvent(static_cast(e)); +} + +void* PlainTextEditb1a9c9_LoadResourceDefault(void* ptr, int ty, void* name) +{ + return new QVariant(static_cast(ptr)->QPlainTextEdit::loadResource(ty, *static_cast(name))); +} + +void PlainTextEditb1a9c9_MouseDoubleClickEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::mouseDoubleClickEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_MouseMoveEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::mouseMoveEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_MousePressEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::mousePressEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_MouseReleaseEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::mouseReleaseEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_PaintEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::paintEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_PasteDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::paste(); +} + +void PlainTextEditb1a9c9_RedoDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::redo(); +} + +void PlainTextEditb1a9c9_ResizeEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::resizeEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_ScrollContentsByDefault(void* ptr, int dx, int dy) +{ + static_cast(ptr)->QPlainTextEdit::scrollContentsBy(dx, dy); +} + +void PlainTextEditb1a9c9_SelectAllDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::selectAll(); +} + +void PlainTextEditb1a9c9_SetPlainTextDefault(void* ptr, struct Moc_PackedString text) +{ + static_cast(ptr)->QPlainTextEdit::setPlainText(QString::fromUtf8(text.data, text.len)); +} + +void PlainTextEditb1a9c9_ShowEventDefault(void* ptr, void* vqs) +{ + static_cast(ptr)->QPlainTextEdit::showEvent(static_cast(vqs)); +} + +void PlainTextEditb1a9c9_UndoDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::undo(); +} + +void PlainTextEditb1a9c9_WheelEventDefault(void* ptr, void* e) +{ + static_cast(ptr)->QPlainTextEdit::wheelEvent(static_cast(e)); +} + +void PlainTextEditb1a9c9_ZoomInDefault(void* ptr, int ran) +{ + static_cast(ptr)->QPlainTextEdit::zoomIn(ran); +} + +void PlainTextEditb1a9c9_ZoomOutDefault(void* ptr, int ran) +{ + static_cast(ptr)->QPlainTextEdit::zoomOut(ran); +} + +char PlainTextEditb1a9c9_EventDefault(void* ptr, void* event) +{ + return static_cast(ptr)->QPlainTextEdit::event(static_cast(event)); +} + +void* PlainTextEditb1a9c9_MinimumSizeHintDefault(void* ptr) +{ + return ({ QSize tmpValue = static_cast(ptr)->QPlainTextEdit::minimumSizeHint(); new QSize(tmpValue.width(), tmpValue.height()); }); +} + +void PlainTextEditb1a9c9_SetupViewportDefault(void* ptr, void* viewport) +{ + static_cast(ptr)->QPlainTextEdit::setupViewport(static_cast(viewport)); +} + +void* PlainTextEditb1a9c9_SizeHintDefault(void* ptr) +{ + return ({ QSize tmpValue = static_cast(ptr)->QPlainTextEdit::sizeHint(); new QSize(tmpValue.width(), tmpValue.height()); }); +} + +char PlainTextEditb1a9c9_ViewportEventDefault(void* ptr, void* event) +{ + return static_cast(ptr)->QPlainTextEdit::viewportEvent(static_cast(event)); +} + +void* PlainTextEditb1a9c9_ViewportSizeHintDefault(void* ptr) +{ + return ({ QSize tmpValue = static_cast(ptr)->QPlainTextEdit::viewportSizeHint(); new QSize(tmpValue.width(), tmpValue.height()); }); +} + +void PlainTextEditb1a9c9_ActionEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::actionEvent(static_cast(event)); +} + +char PlainTextEditb1a9c9_CloseDefault(void* ptr) +{ + return static_cast(ptr)->QPlainTextEdit::close(); +} + +void PlainTextEditb1a9c9_CloseEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::closeEvent(static_cast(event)); +} + +void PlainTextEditb1a9c9_EnterEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::enterEvent(static_cast(event)); +} + +char PlainTextEditb1a9c9_HasHeightForWidthDefault(void* ptr) +{ + return static_cast(ptr)->QPlainTextEdit::hasHeightForWidth(); +} + +int PlainTextEditb1a9c9_HeightForWidthDefault(void* ptr, int w) +{ + return static_cast(ptr)->QPlainTextEdit::heightForWidth(w); +} + +void PlainTextEditb1a9c9_HideDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::hide(); +} + +void PlainTextEditb1a9c9_HideEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::hideEvent(static_cast(event)); +} + +void PlainTextEditb1a9c9_InitPainterDefault(void* ptr, void* painter) +{ + static_cast(ptr)->QPlainTextEdit::initPainter(static_cast(painter)); +} + +void PlainTextEditb1a9c9_LeaveEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::leaveEvent(static_cast(event)); +} + +void PlainTextEditb1a9c9_LowerDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::lower(); +} + +int PlainTextEditb1a9c9_MetricDefault(void* ptr, long long m) +{ + return static_cast(ptr)->QPlainTextEdit::metric(static_cast(m)); +} + +void PlainTextEditb1a9c9_MoveEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::moveEvent(static_cast(event)); +} + +char PlainTextEditb1a9c9_NativeEventDefault(void* ptr, void* eventType, void* message, long* result) +{ + return static_cast(ptr)->QPlainTextEdit::nativeEvent(*static_cast(eventType), message, result); +} + +void* PlainTextEditb1a9c9_PaintEngineDefault(void* ptr) +{ + return static_cast(ptr)->QPlainTextEdit::paintEngine(); +} + +void PlainTextEditb1a9c9_RaiseDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::raise(); +} + +void PlainTextEditb1a9c9_RepaintDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::repaint(); +} + +void PlainTextEditb1a9c9_SetDisabledDefault(void* ptr, char disable) +{ + static_cast(ptr)->QPlainTextEdit::setDisabled(disable != 0); +} + +void PlainTextEditb1a9c9_SetEnabledDefault(void* ptr, char vbo) +{ + static_cast(ptr)->QPlainTextEdit::setEnabled(vbo != 0); +} + +void PlainTextEditb1a9c9_SetFocus2Default(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::setFocus(); +} + +void PlainTextEditb1a9c9_SetHiddenDefault(void* ptr, char hidden) +{ + static_cast(ptr)->QPlainTextEdit::setHidden(hidden != 0); +} + +void PlainTextEditb1a9c9_SetStyleSheetDefault(void* ptr, struct Moc_PackedString styleSheet) +{ + static_cast(ptr)->QPlainTextEdit::setStyleSheet(QString::fromUtf8(styleSheet.data, styleSheet.len)); +} + +void PlainTextEditb1a9c9_SetVisibleDefault(void* ptr, char visible) +{ + static_cast(ptr)->QPlainTextEdit::setVisible(visible != 0); +} + +void PlainTextEditb1a9c9_SetWindowModifiedDefault(void* ptr, char vbo) +{ + static_cast(ptr)->QPlainTextEdit::setWindowModified(vbo != 0); +} + +void PlainTextEditb1a9c9_SetWindowTitleDefault(void* ptr, struct Moc_PackedString vqs) +{ + static_cast(ptr)->QPlainTextEdit::setWindowTitle(QString::fromUtf8(vqs.data, vqs.len)); +} + +void PlainTextEditb1a9c9_ShowDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::show(); +} + +void PlainTextEditb1a9c9_ShowFullScreenDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::showFullScreen(); +} + +void PlainTextEditb1a9c9_ShowMaximizedDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::showMaximized(); +} + +void PlainTextEditb1a9c9_ShowMinimizedDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::showMinimized(); +} + +void PlainTextEditb1a9c9_ShowNormalDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::showNormal(); +} + +void PlainTextEditb1a9c9_TabletEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::tabletEvent(static_cast(event)); +} + +void PlainTextEditb1a9c9_UpdateDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::update(); +} + +void PlainTextEditb1a9c9_UpdateMicroFocusDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::updateMicroFocus(); +} + +void PlainTextEditb1a9c9_ChildEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::childEvent(static_cast(event)); +} + +void PlainTextEditb1a9c9_ConnectNotifyDefault(void* ptr, void* sign) +{ + static_cast(ptr)->QPlainTextEdit::connectNotify(*static_cast(sign)); +} + +void PlainTextEditb1a9c9_CustomEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::customEvent(static_cast(event)); +} + +void PlainTextEditb1a9c9_DeleteLaterDefault(void* ptr) +{ + static_cast(ptr)->QPlainTextEdit::deleteLater(); +} + +void PlainTextEditb1a9c9_DisconnectNotifyDefault(void* ptr, void* sign) +{ + static_cast(ptr)->QPlainTextEdit::disconnectNotify(*static_cast(sign)); +} + +char PlainTextEditb1a9c9_EventFilterDefault(void* ptr, void* watched, void* event) +{ + return static_cast(ptr)->QPlainTextEdit::eventFilter(static_cast(watched), static_cast(event)); +} + + + +void PlainTextEditb1a9c9_TimerEventDefault(void* ptr, void* event) +{ + static_cast(ptr)->QPlainTextEdit::timerEvent(static_cast(event)); +} + +#include "moc_moc.h" diff --git a/moc.go b/moc.go new file mode 100644 index 0000000..65752f1 --- /dev/null +++ b/moc.go @@ -0,0 +1,1916 @@ +package main + +//#include +//#include +//#include +//#include "moc.h" +import "C" +import ( + "strings" + "unsafe" + + "github.com/therecipe/qt" + std_core "github.com/therecipe/qt/core" + std_gui "github.com/therecipe/qt/gui" + std_widgets "github.com/therecipe/qt/widgets" +) + +func cGoFreePacked(ptr unsafe.Pointer) { std_core.NewQByteArrayFromPointer(ptr).DestroyQByteArray() } +func cGoUnpackString(s C.struct_Moc_PackedString) string { + defer cGoFreePacked(s.ptr) + if int(s.len) == -1 { + return C.GoString(s.data) + } + return C.GoStringN(s.data, C.int(s.len)) +} +func cGoUnpackBytes(s C.struct_Moc_PackedString) []byte { + defer cGoFreePacked(s.ptr) + if int(s.len) == -1 { + gs := C.GoString(s.data) + return *(*[]byte)(unsafe.Pointer(&gs)) + } + return C.GoBytes(unsafe.Pointer(s.data), C.int(s.len)) +} +func unpackStringList(s string) []string { + if len(s) == 0 { + return make([]string, 0) + } + return strings.Split(s, "¡¦!") +} + +type PlainTextEdit_ITF interface { + std_widgets.QPlainTextEdit_ITF + PlainTextEdit_PTR() *PlainTextEdit +} + +func (ptr *PlainTextEdit) PlainTextEdit_PTR() *PlainTextEdit { + return ptr +} + +func (ptr *PlainTextEdit) Pointer() unsafe.Pointer { + if ptr != nil { + return ptr.QPlainTextEdit_PTR().Pointer() + } + return nil +} + +func (ptr *PlainTextEdit) SetPointer(p unsafe.Pointer) { + if ptr != nil { + ptr.QPlainTextEdit_PTR().SetPointer(p) + } +} + +func PointerFromPlainTextEdit(ptr PlainTextEdit_ITF) unsafe.Pointer { + if ptr != nil { + return ptr.PlainTextEdit_PTR().Pointer() + } + return nil +} + +func NewPlainTextEditFromPointer(ptr unsafe.Pointer) (n *PlainTextEdit) { + if gPtr, ok := qt.Receive(ptr); !ok { + n = new(PlainTextEdit) + n.SetPointer(ptr) + } else { + switch deduced := gPtr.(type) { + case *PlainTextEdit: + n = deduced + + case *std_widgets.QPlainTextEdit: + n = &PlainTextEdit{QPlainTextEdit: *deduced} + + default: + n = new(PlainTextEdit) + n.SetPointer(ptr) + } + } + return +} +func (this *PlainTextEdit) Init() { this.init() } + +//export callbackPlainTextEditb1a9c9_Constructor +func callbackPlainTextEditb1a9c9_Constructor(ptr unsafe.Pointer) { + this := NewPlainTextEditFromPointer(ptr) + qt.Register(ptr, this) + this.init() +} + +//export callbackPlainTextEditb1a9c9_AddLine +func callbackPlainTextEditb1a9c9_AddLine(ptr unsafe.Pointer, v0 C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "addLine"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(v0)) + } + +} + +func (ptr *PlainTextEdit) ConnectAddLine(f func(v0 string)) { + if ptr.Pointer() != nil { + + if signal := qt.LendSignal(ptr.Pointer(), "addLine"); signal != nil { + f := func(v0 string) { + (*(*func(string))(signal))(v0) + f(v0) + } + qt.ConnectSignal(ptr.Pointer(), "addLine", unsafe.Pointer(&f)) + } else { + qt.ConnectSignal(ptr.Pointer(), "addLine", unsafe.Pointer(&f)) + } + } +} + +func (ptr *PlainTextEdit) DisconnectAddLine() { + if ptr.Pointer() != nil { + + qt.DisconnectSignal(ptr.Pointer(), "addLine") + } +} + +func (ptr *PlainTextEdit) AddLine(v0 string) { + if ptr.Pointer() != nil { + var v0C *C.char + if v0 != "" { + v0C = C.CString(v0) + defer C.free(unsafe.Pointer(v0C)) + } + C.PlainTextEditb1a9c9_AddLine(ptr.Pointer(), C.struct_Moc_PackedString{data: v0C, len: C.longlong(len(v0))}) + } +} + +func PlainTextEdit_QRegisterMetaType() int { + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType())) +} + +func (ptr *PlainTextEdit) QRegisterMetaType() int { + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType())) +} + +func PlainTextEdit_QRegisterMetaType2(typeName string) int { + var typeNameC *C.char + if typeName != "" { + typeNameC = C.CString(typeName) + defer C.free(unsafe.Pointer(typeNameC)) + } + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType2(typeNameC))) +} + +func (ptr *PlainTextEdit) QRegisterMetaType2(typeName string) int { + var typeNameC *C.char + if typeName != "" { + typeNameC = C.CString(typeName) + defer C.free(unsafe.Pointer(typeNameC)) + } + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType2(typeNameC))) +} + +func PlainTextEdit_QmlRegisterType() int { + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType())) +} + +func (ptr *PlainTextEdit) QmlRegisterType() int { + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType())) +} + +func PlainTextEdit_QmlRegisterType2(uri string, versionMajor int, versionMinor int, qmlName string) int { + var uriC *C.char + if uri != "" { + uriC = C.CString(uri) + defer C.free(unsafe.Pointer(uriC)) + } + var qmlNameC *C.char + if qmlName != "" { + qmlNameC = C.CString(qmlName) + defer C.free(unsafe.Pointer(qmlNameC)) + } + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType2(uriC, C.int(int32(versionMajor)), C.int(int32(versionMinor)), qmlNameC))) +} + +func (ptr *PlainTextEdit) QmlRegisterType2(uri string, versionMajor int, versionMinor int, qmlName string) int { + var uriC *C.char + if uri != "" { + uriC = C.CString(uri) + defer C.free(unsafe.Pointer(uriC)) + } + var qmlNameC *C.char + if qmlName != "" { + qmlNameC = C.CString(qmlName) + defer C.free(unsafe.Pointer(qmlNameC)) + } + return int(int32(C.PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType2(uriC, C.int(int32(versionMajor)), C.int(int32(versionMinor)), qmlNameC))) +} + +func (ptr *PlainTextEdit) __scrollBarWidgets_atList(i int) *std_widgets.QWidget { + if ptr.Pointer() != nil { + tmpValue := std_widgets.NewQWidgetFromPointer(C.PlainTextEditb1a9c9___scrollBarWidgets_atList(ptr.Pointer(), C.int(int32(i)))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __scrollBarWidgets_setList(i std_widgets.QWidget_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___scrollBarWidgets_setList(ptr.Pointer(), std_widgets.PointerFromQWidget(i)) + } +} + +func (ptr *PlainTextEdit) __scrollBarWidgets_newList() unsafe.Pointer { + return C.PlainTextEditb1a9c9___scrollBarWidgets_newList(ptr.Pointer()) +} + +func (ptr *PlainTextEdit) __actions_atList(i int) *std_widgets.QAction { + if ptr.Pointer() != nil { + tmpValue := std_widgets.NewQActionFromPointer(C.PlainTextEditb1a9c9___actions_atList(ptr.Pointer(), C.int(int32(i)))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __actions_setList(i std_widgets.QAction_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___actions_setList(ptr.Pointer(), std_widgets.PointerFromQAction(i)) + } +} + +func (ptr *PlainTextEdit) __actions_newList() unsafe.Pointer { + return C.PlainTextEditb1a9c9___actions_newList(ptr.Pointer()) +} + +func (ptr *PlainTextEdit) __addActions_actions_atList(i int) *std_widgets.QAction { + if ptr.Pointer() != nil { + tmpValue := std_widgets.NewQActionFromPointer(C.PlainTextEditb1a9c9___addActions_actions_atList(ptr.Pointer(), C.int(int32(i)))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __addActions_actions_setList(i std_widgets.QAction_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___addActions_actions_setList(ptr.Pointer(), std_widgets.PointerFromQAction(i)) + } +} + +func (ptr *PlainTextEdit) __addActions_actions_newList() unsafe.Pointer { + return C.PlainTextEditb1a9c9___addActions_actions_newList(ptr.Pointer()) +} + +func (ptr *PlainTextEdit) __insertActions_actions_atList(i int) *std_widgets.QAction { + if ptr.Pointer() != nil { + tmpValue := std_widgets.NewQActionFromPointer(C.PlainTextEditb1a9c9___insertActions_actions_atList(ptr.Pointer(), C.int(int32(i)))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __insertActions_actions_setList(i std_widgets.QAction_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___insertActions_actions_setList(ptr.Pointer(), std_widgets.PointerFromQAction(i)) + } +} + +func (ptr *PlainTextEdit) __insertActions_actions_newList() unsafe.Pointer { + return C.PlainTextEditb1a9c9___insertActions_actions_newList(ptr.Pointer()) +} + +func (ptr *PlainTextEdit) __children_atList(i int) *std_core.QObject { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQObjectFromPointer(C.PlainTextEditb1a9c9___children_atList(ptr.Pointer(), C.int(int32(i)))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __children_setList(i std_core.QObject_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___children_setList(ptr.Pointer(), std_core.PointerFromQObject(i)) + } +} + +func (ptr *PlainTextEdit) __children_newList() unsafe.Pointer { + return C.PlainTextEditb1a9c9___children_newList(ptr.Pointer()) +} + +func (ptr *PlainTextEdit) __dynamicPropertyNames_atList(i int) *std_core.QByteArray { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQByteArrayFromPointer(C.PlainTextEditb1a9c9___dynamicPropertyNames_atList(ptr.Pointer(), C.int(int32(i)))) + qt.SetFinalizer(tmpValue, (*std_core.QByteArray).DestroyQByteArray) + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __dynamicPropertyNames_setList(i std_core.QByteArray_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___dynamicPropertyNames_setList(ptr.Pointer(), std_core.PointerFromQByteArray(i)) + } +} + +func (ptr *PlainTextEdit) __dynamicPropertyNames_newList() unsafe.Pointer { + return C.PlainTextEditb1a9c9___dynamicPropertyNames_newList(ptr.Pointer()) +} + +func (ptr *PlainTextEdit) __findChildren_atList(i int) *std_core.QObject { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQObjectFromPointer(C.PlainTextEditb1a9c9___findChildren_atList(ptr.Pointer(), C.int(int32(i)))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __findChildren_setList(i std_core.QObject_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___findChildren_setList(ptr.Pointer(), std_core.PointerFromQObject(i)) + } +} + +func (ptr *PlainTextEdit) __findChildren_newList() unsafe.Pointer { + return C.PlainTextEditb1a9c9___findChildren_newList(ptr.Pointer()) +} + +func (ptr *PlainTextEdit) __findChildren_atList3(i int) *std_core.QObject { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQObjectFromPointer(C.PlainTextEditb1a9c9___findChildren_atList3(ptr.Pointer(), C.int(int32(i)))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +func (ptr *PlainTextEdit) __findChildren_setList3(i std_core.QObject_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9___findChildren_setList3(ptr.Pointer(), std_core.PointerFromQObject(i)) + } +} + +func (ptr *PlainTextEdit) __findChildren_newList3() unsafe.Pointer { + return C.PlainTextEditb1a9c9___findChildren_newList3(ptr.Pointer()) +} + +func NewPlainTextEdit(parent std_widgets.QWidget_ITF) *PlainTextEdit { + PlainTextEdit_QRegisterMetaType() + tmpValue := NewPlainTextEditFromPointer(C.PlainTextEditb1a9c9_NewPlainTextEdit(std_widgets.PointerFromQWidget(parent))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue +} + +func NewPlainTextEdit2(text string, parent std_widgets.QWidget_ITF) *PlainTextEdit { + var textC *C.char + if text != "" { + textC = C.CString(text) + defer C.free(unsafe.Pointer(textC)) + } + PlainTextEdit_QRegisterMetaType() + tmpValue := NewPlainTextEditFromPointer(C.PlainTextEditb1a9c9_NewPlainTextEdit2(C.struct_Moc_PackedString{data: textC, len: C.longlong(len(text))}, std_widgets.PointerFromQWidget(parent))) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue +} + +//export callbackPlainTextEditb1a9c9_DestroyPlainTextEdit +func callbackPlainTextEditb1a9c9_DestroyPlainTextEdit(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "~PlainTextEdit"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).DestroyPlainTextEditDefault() + } +} + +func (ptr *PlainTextEdit) ConnectDestroyPlainTextEdit(f func()) { + if ptr.Pointer() != nil { + + if signal := qt.LendSignal(ptr.Pointer(), "~PlainTextEdit"); signal != nil { + f := func() { + (*(*func())(signal))() + f() + } + qt.ConnectSignal(ptr.Pointer(), "~PlainTextEdit", unsafe.Pointer(&f)) + } else { + qt.ConnectSignal(ptr.Pointer(), "~PlainTextEdit", unsafe.Pointer(&f)) + } + } +} + +func (ptr *PlainTextEdit) DisconnectDestroyPlainTextEdit() { + if ptr.Pointer() != nil { + + qt.DisconnectSignal(ptr.Pointer(), "~PlainTextEdit") + } +} + +func (ptr *PlainTextEdit) DestroyPlainTextEdit() { + if ptr.Pointer() != nil { + + qt.SetFinalizer(ptr, nil) + C.PlainTextEditb1a9c9_DestroyPlainTextEdit(ptr.Pointer()) + ptr.SetPointer(nil) + } +} + +func (ptr *PlainTextEdit) DestroyPlainTextEditDefault() { + if ptr.Pointer() != nil { + + qt.SetFinalizer(ptr, nil) + C.PlainTextEditb1a9c9_DestroyPlainTextEditDefault(ptr.Pointer()) + ptr.SetPointer(nil) + } +} + +//export callbackPlainTextEditb1a9c9_AppendHtml +func callbackPlainTextEditb1a9c9_AppendHtml(ptr unsafe.Pointer, html C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "appendHtml"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(html)) + } else { + NewPlainTextEditFromPointer(ptr).AppendHtmlDefault(cGoUnpackString(html)) + } +} + +func (ptr *PlainTextEdit) AppendHtmlDefault(html string) { + if ptr.Pointer() != nil { + var htmlC *C.char + if html != "" { + htmlC = C.CString(html) + defer C.free(unsafe.Pointer(htmlC)) + } + C.PlainTextEditb1a9c9_AppendHtmlDefault(ptr.Pointer(), C.struct_Moc_PackedString{data: htmlC, len: C.longlong(len(html))}) + } +} + +//export callbackPlainTextEditb1a9c9_AppendPlainText +func callbackPlainTextEditb1a9c9_AppendPlainText(ptr unsafe.Pointer, text C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "appendPlainText"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(text)) + } else { + NewPlainTextEditFromPointer(ptr).AppendPlainTextDefault(cGoUnpackString(text)) + } +} + +func (ptr *PlainTextEdit) AppendPlainTextDefault(text string) { + if ptr.Pointer() != nil { + var textC *C.char + if text != "" { + textC = C.CString(text) + defer C.free(unsafe.Pointer(textC)) + } + C.PlainTextEditb1a9c9_AppendPlainTextDefault(ptr.Pointer(), C.struct_Moc_PackedString{data: textC, len: C.longlong(len(text))}) + } +} + +//export callbackPlainTextEditb1a9c9_BlockCountChanged +func callbackPlainTextEditb1a9c9_BlockCountChanged(ptr unsafe.Pointer, newBlockCount C.int) { + if signal := qt.GetSignal(ptr, "blockCountChanged"); signal != nil { + (*(*func(int))(signal))(int(int32(newBlockCount))) + } + +} + +//export callbackPlainTextEditb1a9c9_CanInsertFromMimeData +func callbackPlainTextEditb1a9c9_CanInsertFromMimeData(ptr unsafe.Pointer, source unsafe.Pointer) C.char { + if signal := qt.GetSignal(ptr, "canInsertFromMimeData"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func(*std_core.QMimeData) bool)(signal))(std_core.NewQMimeDataFromPointer(source))))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).CanInsertFromMimeDataDefault(std_core.NewQMimeDataFromPointer(source))))) +} + +func (ptr *PlainTextEdit) CanInsertFromMimeDataDefault(source std_core.QMimeData_ITF) bool { + if ptr.Pointer() != nil { + return int8(C.PlainTextEditb1a9c9_CanInsertFromMimeDataDefault(ptr.Pointer(), std_core.PointerFromQMimeData(source))) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_CenterCursor +func callbackPlainTextEditb1a9c9_CenterCursor(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "centerCursor"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).CenterCursorDefault() + } +} + +func (ptr *PlainTextEdit) CenterCursorDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_CenterCursorDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_ChangeEvent +func callbackPlainTextEditb1a9c9_ChangeEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "changeEvent"); signal != nil { + (*(*func(*std_core.QEvent))(signal))(std_core.NewQEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).ChangeEventDefault(std_core.NewQEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) ChangeEventDefault(e std_core.QEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ChangeEventDefault(ptr.Pointer(), std_core.PointerFromQEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_Clear +func callbackPlainTextEditb1a9c9_Clear(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "clear"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).ClearDefault() + } +} + +func (ptr *PlainTextEdit) ClearDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ClearDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_ContextMenuEvent +func callbackPlainTextEditb1a9c9_ContextMenuEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "contextMenuEvent"); signal != nil { + (*(*func(*std_gui.QContextMenuEvent))(signal))(std_gui.NewQContextMenuEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).ContextMenuEventDefault(std_gui.NewQContextMenuEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) ContextMenuEventDefault(event std_gui.QContextMenuEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ContextMenuEventDefault(ptr.Pointer(), std_gui.PointerFromQContextMenuEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_Copy +func callbackPlainTextEditb1a9c9_Copy(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "copy"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).CopyDefault() + } +} + +func (ptr *PlainTextEdit) CopyDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_CopyDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_CopyAvailable +func callbackPlainTextEditb1a9c9_CopyAvailable(ptr unsafe.Pointer, yes C.char) { + if signal := qt.GetSignal(ptr, "copyAvailable"); signal != nil { + (*(*func(bool))(signal))(int8(yes) != 0) + } + +} + +//export callbackPlainTextEditb1a9c9_CreateMimeDataFromSelection +func callbackPlainTextEditb1a9c9_CreateMimeDataFromSelection(ptr unsafe.Pointer) unsafe.Pointer { + if signal := qt.GetSignal(ptr, "createMimeDataFromSelection"); signal != nil { + return std_core.PointerFromQMimeData((*(*func() *std_core.QMimeData)(signal))()) + } + + return std_core.PointerFromQMimeData(NewPlainTextEditFromPointer(ptr).CreateMimeDataFromSelectionDefault()) +} + +func (ptr *PlainTextEdit) CreateMimeDataFromSelectionDefault() *std_core.QMimeData { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQMimeDataFromPointer(C.PlainTextEditb1a9c9_CreateMimeDataFromSelectionDefault(ptr.Pointer())) + if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { + tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) + } + return tmpValue + } + return nil +} + +//export callbackPlainTextEditb1a9c9_CursorPositionChanged +func callbackPlainTextEditb1a9c9_CursorPositionChanged(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "cursorPositionChanged"); signal != nil { + (*(*func())(signal))() + } + +} + +//export callbackPlainTextEditb1a9c9_Cut +func callbackPlainTextEditb1a9c9_Cut(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "cut"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).CutDefault() + } +} + +func (ptr *PlainTextEdit) CutDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_CutDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_DragEnterEvent +func callbackPlainTextEditb1a9c9_DragEnterEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "dragEnterEvent"); signal != nil { + (*(*func(*std_gui.QDragEnterEvent))(signal))(std_gui.NewQDragEnterEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).DragEnterEventDefault(std_gui.NewQDragEnterEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) DragEnterEventDefault(e std_gui.QDragEnterEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_DragEnterEventDefault(ptr.Pointer(), std_gui.PointerFromQDragEnterEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_DragLeaveEvent +func callbackPlainTextEditb1a9c9_DragLeaveEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "dragLeaveEvent"); signal != nil { + (*(*func(*std_gui.QDragLeaveEvent))(signal))(std_gui.NewQDragLeaveEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).DragLeaveEventDefault(std_gui.NewQDragLeaveEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) DragLeaveEventDefault(e std_gui.QDragLeaveEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_DragLeaveEventDefault(ptr.Pointer(), std_gui.PointerFromQDragLeaveEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_DragMoveEvent +func callbackPlainTextEditb1a9c9_DragMoveEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "dragMoveEvent"); signal != nil { + (*(*func(*std_gui.QDragMoveEvent))(signal))(std_gui.NewQDragMoveEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).DragMoveEventDefault(std_gui.NewQDragMoveEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) DragMoveEventDefault(e std_gui.QDragMoveEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_DragMoveEventDefault(ptr.Pointer(), std_gui.PointerFromQDragMoveEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_DropEvent +func callbackPlainTextEditb1a9c9_DropEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "dropEvent"); signal != nil { + (*(*func(*std_gui.QDropEvent))(signal))(std_gui.NewQDropEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).DropEventDefault(std_gui.NewQDropEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) DropEventDefault(e std_gui.QDropEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_DropEventDefault(ptr.Pointer(), std_gui.PointerFromQDropEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_FocusInEvent +func callbackPlainTextEditb1a9c9_FocusInEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "focusInEvent"); signal != nil { + (*(*func(*std_gui.QFocusEvent))(signal))(std_gui.NewQFocusEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).FocusInEventDefault(std_gui.NewQFocusEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) FocusInEventDefault(e std_gui.QFocusEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_FocusInEventDefault(ptr.Pointer(), std_gui.PointerFromQFocusEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_FocusNextPrevChild +func callbackPlainTextEditb1a9c9_FocusNextPrevChild(ptr unsafe.Pointer, next C.char) C.char { + if signal := qt.GetSignal(ptr, "focusNextPrevChild"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func(bool) bool)(signal))(int8(next) != 0)))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).FocusNextPrevChildDefault(int8(next) != 0)))) +} + +func (ptr *PlainTextEdit) FocusNextPrevChildDefault(next bool) bool { + if ptr.Pointer() != nil { + return int8(C.PlainTextEditb1a9c9_FocusNextPrevChildDefault(ptr.Pointer(), C.char(int8(qt.GoBoolToInt(next))))) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_FocusOutEvent +func callbackPlainTextEditb1a9c9_FocusOutEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "focusOutEvent"); signal != nil { + (*(*func(*std_gui.QFocusEvent))(signal))(std_gui.NewQFocusEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).FocusOutEventDefault(std_gui.NewQFocusEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) FocusOutEventDefault(e std_gui.QFocusEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_FocusOutEventDefault(ptr.Pointer(), std_gui.PointerFromQFocusEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_InputMethodEvent +func callbackPlainTextEditb1a9c9_InputMethodEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "inputMethodEvent"); signal != nil { + (*(*func(*std_gui.QInputMethodEvent))(signal))(std_gui.NewQInputMethodEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).InputMethodEventDefault(std_gui.NewQInputMethodEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) InputMethodEventDefault(e std_gui.QInputMethodEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_InputMethodEventDefault(ptr.Pointer(), std_gui.PointerFromQInputMethodEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_InputMethodQuery +func callbackPlainTextEditb1a9c9_InputMethodQuery(ptr unsafe.Pointer, property C.longlong) unsafe.Pointer { + if signal := qt.GetSignal(ptr, "inputMethodQuery"); signal != nil { + return std_core.PointerFromQVariant((*(*func(std_core.Qt__InputMethodQuery) *std_core.QVariant)(signal))(std_core.Qt__InputMethodQuery(property))) + } + + return std_core.PointerFromQVariant(NewPlainTextEditFromPointer(ptr).InputMethodQueryDefault(std_core.Qt__InputMethodQuery(property))) +} + +func (ptr *PlainTextEdit) InputMethodQueryDefault(property std_core.Qt__InputMethodQuery) *std_core.QVariant { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQVariantFromPointer(C.PlainTextEditb1a9c9_InputMethodQueryDefault(ptr.Pointer(), C.longlong(property))) + qt.SetFinalizer(tmpValue, (*std_core.QVariant).DestroyQVariant) + return tmpValue + } + return nil +} + +//export callbackPlainTextEditb1a9c9_InsertFromMimeData +func callbackPlainTextEditb1a9c9_InsertFromMimeData(ptr unsafe.Pointer, source unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "insertFromMimeData"); signal != nil { + (*(*func(*std_core.QMimeData))(signal))(std_core.NewQMimeDataFromPointer(source)) + } else { + NewPlainTextEditFromPointer(ptr).InsertFromMimeDataDefault(std_core.NewQMimeDataFromPointer(source)) + } +} + +func (ptr *PlainTextEdit) InsertFromMimeDataDefault(source std_core.QMimeData_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_InsertFromMimeDataDefault(ptr.Pointer(), std_core.PointerFromQMimeData(source)) + } +} + +//export callbackPlainTextEditb1a9c9_InsertPlainText +func callbackPlainTextEditb1a9c9_InsertPlainText(ptr unsafe.Pointer, text C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "insertPlainText"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(text)) + } else { + NewPlainTextEditFromPointer(ptr).InsertPlainTextDefault(cGoUnpackString(text)) + } +} + +func (ptr *PlainTextEdit) InsertPlainTextDefault(text string) { + if ptr.Pointer() != nil { + var textC *C.char + if text != "" { + textC = C.CString(text) + defer C.free(unsafe.Pointer(textC)) + } + C.PlainTextEditb1a9c9_InsertPlainTextDefault(ptr.Pointer(), C.struct_Moc_PackedString{data: textC, len: C.longlong(len(text))}) + } +} + +//export callbackPlainTextEditb1a9c9_KeyPressEvent +func callbackPlainTextEditb1a9c9_KeyPressEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "keyPressEvent"); signal != nil { + (*(*func(*std_gui.QKeyEvent))(signal))(std_gui.NewQKeyEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).KeyPressEventDefault(std_gui.NewQKeyEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) KeyPressEventDefault(e std_gui.QKeyEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_KeyPressEventDefault(ptr.Pointer(), std_gui.PointerFromQKeyEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_KeyReleaseEvent +func callbackPlainTextEditb1a9c9_KeyReleaseEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "keyReleaseEvent"); signal != nil { + (*(*func(*std_gui.QKeyEvent))(signal))(std_gui.NewQKeyEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).KeyReleaseEventDefault(std_gui.NewQKeyEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) KeyReleaseEventDefault(e std_gui.QKeyEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_KeyReleaseEventDefault(ptr.Pointer(), std_gui.PointerFromQKeyEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_LoadResource +func callbackPlainTextEditb1a9c9_LoadResource(ptr unsafe.Pointer, ty C.int, name unsafe.Pointer) unsafe.Pointer { + if signal := qt.GetSignal(ptr, "loadResource"); signal != nil { + return std_core.PointerFromQVariant((*(*func(int, *std_core.QUrl) *std_core.QVariant)(signal))(int(int32(ty)), std_core.NewQUrlFromPointer(name))) + } + + return std_core.PointerFromQVariant(NewPlainTextEditFromPointer(ptr).LoadResourceDefault(int(int32(ty)), std_core.NewQUrlFromPointer(name))) +} + +func (ptr *PlainTextEdit) LoadResourceDefault(ty int, name std_core.QUrl_ITF) *std_core.QVariant { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQVariantFromPointer(C.PlainTextEditb1a9c9_LoadResourceDefault(ptr.Pointer(), C.int(int32(ty)), std_core.PointerFromQUrl(name))) + qt.SetFinalizer(tmpValue, (*std_core.QVariant).DestroyQVariant) + return tmpValue + } + return nil +} + +//export callbackPlainTextEditb1a9c9_ModificationChanged +func callbackPlainTextEditb1a9c9_ModificationChanged(ptr unsafe.Pointer, changed C.char) { + if signal := qt.GetSignal(ptr, "modificationChanged"); signal != nil { + (*(*func(bool))(signal))(int8(changed) != 0) + } + +} + +//export callbackPlainTextEditb1a9c9_MouseDoubleClickEvent +func callbackPlainTextEditb1a9c9_MouseDoubleClickEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "mouseDoubleClickEvent"); signal != nil { + (*(*func(*std_gui.QMouseEvent))(signal))(std_gui.NewQMouseEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).MouseDoubleClickEventDefault(std_gui.NewQMouseEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) MouseDoubleClickEventDefault(e std_gui.QMouseEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_MouseDoubleClickEventDefault(ptr.Pointer(), std_gui.PointerFromQMouseEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_MouseMoveEvent +func callbackPlainTextEditb1a9c9_MouseMoveEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "mouseMoveEvent"); signal != nil { + (*(*func(*std_gui.QMouseEvent))(signal))(std_gui.NewQMouseEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).MouseMoveEventDefault(std_gui.NewQMouseEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) MouseMoveEventDefault(e std_gui.QMouseEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_MouseMoveEventDefault(ptr.Pointer(), std_gui.PointerFromQMouseEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_MousePressEvent +func callbackPlainTextEditb1a9c9_MousePressEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "mousePressEvent"); signal != nil { + (*(*func(*std_gui.QMouseEvent))(signal))(std_gui.NewQMouseEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).MousePressEventDefault(std_gui.NewQMouseEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) MousePressEventDefault(e std_gui.QMouseEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_MousePressEventDefault(ptr.Pointer(), std_gui.PointerFromQMouseEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_MouseReleaseEvent +func callbackPlainTextEditb1a9c9_MouseReleaseEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "mouseReleaseEvent"); signal != nil { + (*(*func(*std_gui.QMouseEvent))(signal))(std_gui.NewQMouseEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).MouseReleaseEventDefault(std_gui.NewQMouseEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) MouseReleaseEventDefault(e std_gui.QMouseEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_MouseReleaseEventDefault(ptr.Pointer(), std_gui.PointerFromQMouseEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_PaintEvent +func callbackPlainTextEditb1a9c9_PaintEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "paintEvent"); signal != nil { + (*(*func(*std_gui.QPaintEvent))(signal))(std_gui.NewQPaintEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).PaintEventDefault(std_gui.NewQPaintEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) PaintEventDefault(e std_gui.QPaintEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_PaintEventDefault(ptr.Pointer(), std_gui.PointerFromQPaintEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_Paste +func callbackPlainTextEditb1a9c9_Paste(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "paste"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).PasteDefault() + } +} + +func (ptr *PlainTextEdit) PasteDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_PasteDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_Redo +func callbackPlainTextEditb1a9c9_Redo(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "redo"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).RedoDefault() + } +} + +func (ptr *PlainTextEdit) RedoDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_RedoDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_RedoAvailable +func callbackPlainTextEditb1a9c9_RedoAvailable(ptr unsafe.Pointer, available C.char) { + if signal := qt.GetSignal(ptr, "redoAvailable"); signal != nil { + (*(*func(bool))(signal))(int8(available) != 0) + } + +} + +//export callbackPlainTextEditb1a9c9_ResizeEvent +func callbackPlainTextEditb1a9c9_ResizeEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "resizeEvent"); signal != nil { + (*(*func(*std_gui.QResizeEvent))(signal))(std_gui.NewQResizeEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).ResizeEventDefault(std_gui.NewQResizeEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) ResizeEventDefault(e std_gui.QResizeEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ResizeEventDefault(ptr.Pointer(), std_gui.PointerFromQResizeEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_ScrollContentsBy +func callbackPlainTextEditb1a9c9_ScrollContentsBy(ptr unsafe.Pointer, dx C.int, dy C.int) { + if signal := qt.GetSignal(ptr, "scrollContentsBy"); signal != nil { + (*(*func(int, int))(signal))(int(int32(dx)), int(int32(dy))) + } else { + NewPlainTextEditFromPointer(ptr).ScrollContentsByDefault(int(int32(dx)), int(int32(dy))) + } +} + +func (ptr *PlainTextEdit) ScrollContentsByDefault(dx int, dy int) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ScrollContentsByDefault(ptr.Pointer(), C.int(int32(dx)), C.int(int32(dy))) + } +} + +//export callbackPlainTextEditb1a9c9_SelectAll +func callbackPlainTextEditb1a9c9_SelectAll(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "selectAll"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).SelectAllDefault() + } +} + +func (ptr *PlainTextEdit) SelectAllDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SelectAllDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_SelectionChanged +func callbackPlainTextEditb1a9c9_SelectionChanged(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "selectionChanged"); signal != nil { + (*(*func())(signal))() + } + +} + +//export callbackPlainTextEditb1a9c9_SetPlainText +func callbackPlainTextEditb1a9c9_SetPlainText(ptr unsafe.Pointer, text C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "setPlainText"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(text)) + } else { + NewPlainTextEditFromPointer(ptr).SetPlainTextDefault(cGoUnpackString(text)) + } +} + +func (ptr *PlainTextEdit) SetPlainTextDefault(text string) { + if ptr.Pointer() != nil { + var textC *C.char + if text != "" { + textC = C.CString(text) + defer C.free(unsafe.Pointer(textC)) + } + C.PlainTextEditb1a9c9_SetPlainTextDefault(ptr.Pointer(), C.struct_Moc_PackedString{data: textC, len: C.longlong(len(text))}) + } +} + +//export callbackPlainTextEditb1a9c9_ShowEvent +func callbackPlainTextEditb1a9c9_ShowEvent(ptr unsafe.Pointer, vqs unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "showEvent"); signal != nil { + (*(*func(*std_gui.QShowEvent))(signal))(std_gui.NewQShowEventFromPointer(vqs)) + } else { + NewPlainTextEditFromPointer(ptr).ShowEventDefault(std_gui.NewQShowEventFromPointer(vqs)) + } +} + +func (ptr *PlainTextEdit) ShowEventDefault(vqs std_gui.QShowEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ShowEventDefault(ptr.Pointer(), std_gui.PointerFromQShowEvent(vqs)) + } +} + +//export callbackPlainTextEditb1a9c9_TextChanged +func callbackPlainTextEditb1a9c9_TextChanged(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "textChanged"); signal != nil { + (*(*func())(signal))() + } + +} + +//export callbackPlainTextEditb1a9c9_Undo +func callbackPlainTextEditb1a9c9_Undo(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "undo"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).UndoDefault() + } +} + +func (ptr *PlainTextEdit) UndoDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_UndoDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_UndoAvailable +func callbackPlainTextEditb1a9c9_UndoAvailable(ptr unsafe.Pointer, available C.char) { + if signal := qt.GetSignal(ptr, "undoAvailable"); signal != nil { + (*(*func(bool))(signal))(int8(available) != 0) + } + +} + +//export callbackPlainTextEditb1a9c9_UpdateRequest +func callbackPlainTextEditb1a9c9_UpdateRequest(ptr unsafe.Pointer, rect unsafe.Pointer, dy C.int) { + if signal := qt.GetSignal(ptr, "updateRequest"); signal != nil { + (*(*func(*std_core.QRect, int))(signal))(std_core.NewQRectFromPointer(rect), int(int32(dy))) + } + +} + +//export callbackPlainTextEditb1a9c9_WheelEvent +func callbackPlainTextEditb1a9c9_WheelEvent(ptr unsafe.Pointer, e unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "wheelEvent"); signal != nil { + (*(*func(*std_gui.QWheelEvent))(signal))(std_gui.NewQWheelEventFromPointer(e)) + } else { + NewPlainTextEditFromPointer(ptr).WheelEventDefault(std_gui.NewQWheelEventFromPointer(e)) + } +} + +func (ptr *PlainTextEdit) WheelEventDefault(e std_gui.QWheelEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_WheelEventDefault(ptr.Pointer(), std_gui.PointerFromQWheelEvent(e)) + } +} + +//export callbackPlainTextEditb1a9c9_ZoomIn +func callbackPlainTextEditb1a9c9_ZoomIn(ptr unsafe.Pointer, ran C.int) { + if signal := qt.GetSignal(ptr, "zoomIn"); signal != nil { + (*(*func(int))(signal))(int(int32(ran))) + } else { + NewPlainTextEditFromPointer(ptr).ZoomInDefault(int(int32(ran))) + } +} + +func (ptr *PlainTextEdit) ZoomInDefault(ran int) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ZoomInDefault(ptr.Pointer(), C.int(int32(ran))) + } +} + +//export callbackPlainTextEditb1a9c9_ZoomOut +func callbackPlainTextEditb1a9c9_ZoomOut(ptr unsafe.Pointer, ran C.int) { + if signal := qt.GetSignal(ptr, "zoomOut"); signal != nil { + (*(*func(int))(signal))(int(int32(ran))) + } else { + NewPlainTextEditFromPointer(ptr).ZoomOutDefault(int(int32(ran))) + } +} + +func (ptr *PlainTextEdit) ZoomOutDefault(ran int) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ZoomOutDefault(ptr.Pointer(), C.int(int32(ran))) + } +} + +//export callbackPlainTextEditb1a9c9_Event +func callbackPlainTextEditb1a9c9_Event(ptr unsafe.Pointer, event unsafe.Pointer) C.char { + if signal := qt.GetSignal(ptr, "event"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func(*std_core.QEvent) bool)(signal))(std_core.NewQEventFromPointer(event))))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).EventDefault(std_core.NewQEventFromPointer(event))))) +} + +func (ptr *PlainTextEdit) EventDefault(event std_core.QEvent_ITF) bool { + if ptr.Pointer() != nil { + return int8(C.PlainTextEditb1a9c9_EventDefault(ptr.Pointer(), std_core.PointerFromQEvent(event))) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_MinimumSizeHint +func callbackPlainTextEditb1a9c9_MinimumSizeHint(ptr unsafe.Pointer) unsafe.Pointer { + if signal := qt.GetSignal(ptr, "minimumSizeHint"); signal != nil { + return std_core.PointerFromQSize((*(*func() *std_core.QSize)(signal))()) + } + + return std_core.PointerFromQSize(NewPlainTextEditFromPointer(ptr).MinimumSizeHintDefault()) +} + +func (ptr *PlainTextEdit) MinimumSizeHintDefault() *std_core.QSize { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQSizeFromPointer(C.PlainTextEditb1a9c9_MinimumSizeHintDefault(ptr.Pointer())) + qt.SetFinalizer(tmpValue, (*std_core.QSize).DestroyQSize) + return tmpValue + } + return nil +} + +//export callbackPlainTextEditb1a9c9_SetupViewport +func callbackPlainTextEditb1a9c9_SetupViewport(ptr unsafe.Pointer, viewport unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "setupViewport"); signal != nil { + (*(*func(*std_widgets.QWidget))(signal))(std_widgets.NewQWidgetFromPointer(viewport)) + } else { + NewPlainTextEditFromPointer(ptr).SetupViewportDefault(std_widgets.NewQWidgetFromPointer(viewport)) + } +} + +func (ptr *PlainTextEdit) SetupViewportDefault(viewport std_widgets.QWidget_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SetupViewportDefault(ptr.Pointer(), std_widgets.PointerFromQWidget(viewport)) + } +} + +//export callbackPlainTextEditb1a9c9_SizeHint +func callbackPlainTextEditb1a9c9_SizeHint(ptr unsafe.Pointer) unsafe.Pointer { + if signal := qt.GetSignal(ptr, "sizeHint"); signal != nil { + return std_core.PointerFromQSize((*(*func() *std_core.QSize)(signal))()) + } + + return std_core.PointerFromQSize(NewPlainTextEditFromPointer(ptr).SizeHintDefault()) +} + +func (ptr *PlainTextEdit) SizeHintDefault() *std_core.QSize { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQSizeFromPointer(C.PlainTextEditb1a9c9_SizeHintDefault(ptr.Pointer())) + qt.SetFinalizer(tmpValue, (*std_core.QSize).DestroyQSize) + return tmpValue + } + return nil +} + +//export callbackPlainTextEditb1a9c9_ViewportEvent +func callbackPlainTextEditb1a9c9_ViewportEvent(ptr unsafe.Pointer, event unsafe.Pointer) C.char { + if signal := qt.GetSignal(ptr, "viewportEvent"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func(*std_core.QEvent) bool)(signal))(std_core.NewQEventFromPointer(event))))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).ViewportEventDefault(std_core.NewQEventFromPointer(event))))) +} + +func (ptr *PlainTextEdit) ViewportEventDefault(event std_core.QEvent_ITF) bool { + if ptr.Pointer() != nil { + return int8(C.PlainTextEditb1a9c9_ViewportEventDefault(ptr.Pointer(), std_core.PointerFromQEvent(event))) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_ViewportSizeHint +func callbackPlainTextEditb1a9c9_ViewportSizeHint(ptr unsafe.Pointer) unsafe.Pointer { + if signal := qt.GetSignal(ptr, "viewportSizeHint"); signal != nil { + return std_core.PointerFromQSize((*(*func() *std_core.QSize)(signal))()) + } + + return std_core.PointerFromQSize(NewPlainTextEditFromPointer(ptr).ViewportSizeHintDefault()) +} + +func (ptr *PlainTextEdit) ViewportSizeHintDefault() *std_core.QSize { + if ptr.Pointer() != nil { + tmpValue := std_core.NewQSizeFromPointer(C.PlainTextEditb1a9c9_ViewportSizeHintDefault(ptr.Pointer())) + qt.SetFinalizer(tmpValue, (*std_core.QSize).DestroyQSize) + return tmpValue + } + return nil +} + +//export callbackPlainTextEditb1a9c9_ActionEvent +func callbackPlainTextEditb1a9c9_ActionEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "actionEvent"); signal != nil { + (*(*func(*std_gui.QActionEvent))(signal))(std_gui.NewQActionEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).ActionEventDefault(std_gui.NewQActionEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) ActionEventDefault(event std_gui.QActionEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ActionEventDefault(ptr.Pointer(), std_gui.PointerFromQActionEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_Close +func callbackPlainTextEditb1a9c9_Close(ptr unsafe.Pointer) C.char { + if signal := qt.GetSignal(ptr, "close"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func() bool)(signal))()))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).CloseDefault()))) +} + +func (ptr *PlainTextEdit) CloseDefault() bool { + if ptr.Pointer() != nil { + return int8(C.PlainTextEditb1a9c9_CloseDefault(ptr.Pointer())) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_CloseEvent +func callbackPlainTextEditb1a9c9_CloseEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "closeEvent"); signal != nil { + (*(*func(*std_gui.QCloseEvent))(signal))(std_gui.NewQCloseEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).CloseEventDefault(std_gui.NewQCloseEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) CloseEventDefault(event std_gui.QCloseEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_CloseEventDefault(ptr.Pointer(), std_gui.PointerFromQCloseEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_CustomContextMenuRequested +func callbackPlainTextEditb1a9c9_CustomContextMenuRequested(ptr unsafe.Pointer, pos unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "customContextMenuRequested"); signal != nil { + (*(*func(*std_core.QPoint))(signal))(std_core.NewQPointFromPointer(pos)) + } + +} + +//export callbackPlainTextEditb1a9c9_EnterEvent +func callbackPlainTextEditb1a9c9_EnterEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "enterEvent"); signal != nil { + (*(*func(*std_core.QEvent))(signal))(std_core.NewQEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).EnterEventDefault(std_core.NewQEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) EnterEventDefault(event std_core.QEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_EnterEventDefault(ptr.Pointer(), std_core.PointerFromQEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_HasHeightForWidth +func callbackPlainTextEditb1a9c9_HasHeightForWidth(ptr unsafe.Pointer) C.char { + if signal := qt.GetSignal(ptr, "hasHeightForWidth"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func() bool)(signal))()))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).HasHeightForWidthDefault()))) +} + +func (ptr *PlainTextEdit) HasHeightForWidthDefault() bool { + if ptr.Pointer() != nil { + return int8(C.PlainTextEditb1a9c9_HasHeightForWidthDefault(ptr.Pointer())) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_HeightForWidth +func callbackPlainTextEditb1a9c9_HeightForWidth(ptr unsafe.Pointer, w C.int) C.int { + if signal := qt.GetSignal(ptr, "heightForWidth"); signal != nil { + return C.int(int32((*(*func(int) int)(signal))(int(int32(w))))) + } + + return C.int(int32(NewPlainTextEditFromPointer(ptr).HeightForWidthDefault(int(int32(w))))) +} + +func (ptr *PlainTextEdit) HeightForWidthDefault(w int) int { + if ptr.Pointer() != nil { + return int(int32(C.PlainTextEditb1a9c9_HeightForWidthDefault(ptr.Pointer(), C.int(int32(w))))) + } + return 0 +} + +//export callbackPlainTextEditb1a9c9_Hide +func callbackPlainTextEditb1a9c9_Hide(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "hide"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).HideDefault() + } +} + +func (ptr *PlainTextEdit) HideDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_HideDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_HideEvent +func callbackPlainTextEditb1a9c9_HideEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "hideEvent"); signal != nil { + (*(*func(*std_gui.QHideEvent))(signal))(std_gui.NewQHideEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).HideEventDefault(std_gui.NewQHideEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) HideEventDefault(event std_gui.QHideEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_HideEventDefault(ptr.Pointer(), std_gui.PointerFromQHideEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_InitPainter +func callbackPlainTextEditb1a9c9_InitPainter(ptr unsafe.Pointer, painter unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "initPainter"); signal != nil { + (*(*func(*std_gui.QPainter))(signal))(std_gui.NewQPainterFromPointer(painter)) + } else { + NewPlainTextEditFromPointer(ptr).InitPainterDefault(std_gui.NewQPainterFromPointer(painter)) + } +} + +func (ptr *PlainTextEdit) InitPainterDefault(painter std_gui.QPainter_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_InitPainterDefault(ptr.Pointer(), std_gui.PointerFromQPainter(painter)) + } +} + +//export callbackPlainTextEditb1a9c9_LeaveEvent +func callbackPlainTextEditb1a9c9_LeaveEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "leaveEvent"); signal != nil { + (*(*func(*std_core.QEvent))(signal))(std_core.NewQEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).LeaveEventDefault(std_core.NewQEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) LeaveEventDefault(event std_core.QEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_LeaveEventDefault(ptr.Pointer(), std_core.PointerFromQEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_Lower +func callbackPlainTextEditb1a9c9_Lower(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "lower"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).LowerDefault() + } +} + +func (ptr *PlainTextEdit) LowerDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_LowerDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_Metric +func callbackPlainTextEditb1a9c9_Metric(ptr unsafe.Pointer, m C.longlong) C.int { + if signal := qt.GetSignal(ptr, "metric"); signal != nil { + return C.int(int32((*(*func(std_gui.QPaintDevice__PaintDeviceMetric) int)(signal))(std_gui.QPaintDevice__PaintDeviceMetric(m)))) + } + + return C.int(int32(NewPlainTextEditFromPointer(ptr).MetricDefault(std_gui.QPaintDevice__PaintDeviceMetric(m)))) +} + +func (ptr *PlainTextEdit) MetricDefault(m std_gui.QPaintDevice__PaintDeviceMetric) int { + if ptr.Pointer() != nil { + return int(int32(C.PlainTextEditb1a9c9_MetricDefault(ptr.Pointer(), C.longlong(m)))) + } + return 0 +} + +//export callbackPlainTextEditb1a9c9_MoveEvent +func callbackPlainTextEditb1a9c9_MoveEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "moveEvent"); signal != nil { + (*(*func(*std_gui.QMoveEvent))(signal))(std_gui.NewQMoveEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).MoveEventDefault(std_gui.NewQMoveEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) MoveEventDefault(event std_gui.QMoveEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_MoveEventDefault(ptr.Pointer(), std_gui.PointerFromQMoveEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_NativeEvent +func callbackPlainTextEditb1a9c9_NativeEvent(ptr unsafe.Pointer, eventType unsafe.Pointer, message unsafe.Pointer, result *C.long) C.char { + var resultR int + if result != nil { + resultR = int(int32(*result)) + defer func() { *result = C.long(int32(resultR)) }() + } + if signal := qt.GetSignal(ptr, "nativeEvent"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func(*std_core.QByteArray, unsafe.Pointer, *int) bool)(signal))(std_core.NewQByteArrayFromPointer(eventType), message, &resultR)))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).NativeEventDefault(std_core.NewQByteArrayFromPointer(eventType), message, &resultR)))) +} + +func (ptr *PlainTextEdit) NativeEventDefault(eventType std_core.QByteArray_ITF, message unsafe.Pointer, result *int) bool { + if ptr.Pointer() != nil { + var resultC C.long + if result != nil { + resultC = C.long(int32(*result)) + defer func() { *result = int(int32(resultC)) }() + } + return int8(C.PlainTextEditb1a9c9_NativeEventDefault(ptr.Pointer(), std_core.PointerFromQByteArray(eventType), message, &resultC)) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_PaintEngine +func callbackPlainTextEditb1a9c9_PaintEngine(ptr unsafe.Pointer) unsafe.Pointer { + if signal := qt.GetSignal(ptr, "paintEngine"); signal != nil { + return std_gui.PointerFromQPaintEngine((*(*func() *std_gui.QPaintEngine)(signal))()) + } + + return std_gui.PointerFromQPaintEngine(NewPlainTextEditFromPointer(ptr).PaintEngineDefault()) +} + +func (ptr *PlainTextEdit) PaintEngineDefault() *std_gui.QPaintEngine { + if ptr.Pointer() != nil { + return std_gui.NewQPaintEngineFromPointer(C.PlainTextEditb1a9c9_PaintEngineDefault(ptr.Pointer())) + } + return nil +} + +//export callbackPlainTextEditb1a9c9_Raise +func callbackPlainTextEditb1a9c9_Raise(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "raise"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).RaiseDefault() + } +} + +func (ptr *PlainTextEdit) RaiseDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_RaiseDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_Repaint +func callbackPlainTextEditb1a9c9_Repaint(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "repaint"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).RepaintDefault() + } +} + +func (ptr *PlainTextEdit) RepaintDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_RepaintDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_SetDisabled +func callbackPlainTextEditb1a9c9_SetDisabled(ptr unsafe.Pointer, disable C.char) { + if signal := qt.GetSignal(ptr, "setDisabled"); signal != nil { + (*(*func(bool))(signal))(int8(disable) != 0) + } else { + NewPlainTextEditFromPointer(ptr).SetDisabledDefault(int8(disable) != 0) + } +} + +func (ptr *PlainTextEdit) SetDisabledDefault(disable bool) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SetDisabledDefault(ptr.Pointer(), C.char(int8(qt.GoBoolToInt(disable)))) + } +} + +//export callbackPlainTextEditb1a9c9_SetEnabled +func callbackPlainTextEditb1a9c9_SetEnabled(ptr unsafe.Pointer, vbo C.char) { + if signal := qt.GetSignal(ptr, "setEnabled"); signal != nil { + (*(*func(bool))(signal))(int8(vbo) != 0) + } else { + NewPlainTextEditFromPointer(ptr).SetEnabledDefault(int8(vbo) != 0) + } +} + +func (ptr *PlainTextEdit) SetEnabledDefault(vbo bool) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SetEnabledDefault(ptr.Pointer(), C.char(int8(qt.GoBoolToInt(vbo)))) + } +} + +//export callbackPlainTextEditb1a9c9_SetFocus2 +func callbackPlainTextEditb1a9c9_SetFocus2(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "setFocus2"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).SetFocus2Default() + } +} + +func (ptr *PlainTextEdit) SetFocus2Default() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SetFocus2Default(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_SetHidden +func callbackPlainTextEditb1a9c9_SetHidden(ptr unsafe.Pointer, hidden C.char) { + if signal := qt.GetSignal(ptr, "setHidden"); signal != nil { + (*(*func(bool))(signal))(int8(hidden) != 0) + } else { + NewPlainTextEditFromPointer(ptr).SetHiddenDefault(int8(hidden) != 0) + } +} + +func (ptr *PlainTextEdit) SetHiddenDefault(hidden bool) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SetHiddenDefault(ptr.Pointer(), C.char(int8(qt.GoBoolToInt(hidden)))) + } +} + +//export callbackPlainTextEditb1a9c9_SetStyleSheet +func callbackPlainTextEditb1a9c9_SetStyleSheet(ptr unsafe.Pointer, styleSheet C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "setStyleSheet"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(styleSheet)) + } else { + NewPlainTextEditFromPointer(ptr).SetStyleSheetDefault(cGoUnpackString(styleSheet)) + } +} + +func (ptr *PlainTextEdit) SetStyleSheetDefault(styleSheet string) { + if ptr.Pointer() != nil { + var styleSheetC *C.char + if styleSheet != "" { + styleSheetC = C.CString(styleSheet) + defer C.free(unsafe.Pointer(styleSheetC)) + } + C.PlainTextEditb1a9c9_SetStyleSheetDefault(ptr.Pointer(), C.struct_Moc_PackedString{data: styleSheetC, len: C.longlong(len(styleSheet))}) + } +} + +//export callbackPlainTextEditb1a9c9_SetVisible +func callbackPlainTextEditb1a9c9_SetVisible(ptr unsafe.Pointer, visible C.char) { + if signal := qt.GetSignal(ptr, "setVisible"); signal != nil { + (*(*func(bool))(signal))(int8(visible) != 0) + } else { + NewPlainTextEditFromPointer(ptr).SetVisibleDefault(int8(visible) != 0) + } +} + +func (ptr *PlainTextEdit) SetVisibleDefault(visible bool) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SetVisibleDefault(ptr.Pointer(), C.char(int8(qt.GoBoolToInt(visible)))) + } +} + +//export callbackPlainTextEditb1a9c9_SetWindowModified +func callbackPlainTextEditb1a9c9_SetWindowModified(ptr unsafe.Pointer, vbo C.char) { + if signal := qt.GetSignal(ptr, "setWindowModified"); signal != nil { + (*(*func(bool))(signal))(int8(vbo) != 0) + } else { + NewPlainTextEditFromPointer(ptr).SetWindowModifiedDefault(int8(vbo) != 0) + } +} + +func (ptr *PlainTextEdit) SetWindowModifiedDefault(vbo bool) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_SetWindowModifiedDefault(ptr.Pointer(), C.char(int8(qt.GoBoolToInt(vbo)))) + } +} + +//export callbackPlainTextEditb1a9c9_SetWindowTitle +func callbackPlainTextEditb1a9c9_SetWindowTitle(ptr unsafe.Pointer, vqs C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "setWindowTitle"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(vqs)) + } else { + NewPlainTextEditFromPointer(ptr).SetWindowTitleDefault(cGoUnpackString(vqs)) + } +} + +func (ptr *PlainTextEdit) SetWindowTitleDefault(vqs string) { + if ptr.Pointer() != nil { + var vqsC *C.char + if vqs != "" { + vqsC = C.CString(vqs) + defer C.free(unsafe.Pointer(vqsC)) + } + C.PlainTextEditb1a9c9_SetWindowTitleDefault(ptr.Pointer(), C.struct_Moc_PackedString{data: vqsC, len: C.longlong(len(vqs))}) + } +} + +//export callbackPlainTextEditb1a9c9_Show +func callbackPlainTextEditb1a9c9_Show(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "show"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).ShowDefault() + } +} + +func (ptr *PlainTextEdit) ShowDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ShowDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_ShowFullScreen +func callbackPlainTextEditb1a9c9_ShowFullScreen(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "showFullScreen"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).ShowFullScreenDefault() + } +} + +func (ptr *PlainTextEdit) ShowFullScreenDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ShowFullScreenDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_ShowMaximized +func callbackPlainTextEditb1a9c9_ShowMaximized(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "showMaximized"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).ShowMaximizedDefault() + } +} + +func (ptr *PlainTextEdit) ShowMaximizedDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ShowMaximizedDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_ShowMinimized +func callbackPlainTextEditb1a9c9_ShowMinimized(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "showMinimized"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).ShowMinimizedDefault() + } +} + +func (ptr *PlainTextEdit) ShowMinimizedDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ShowMinimizedDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_ShowNormal +func callbackPlainTextEditb1a9c9_ShowNormal(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "showNormal"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).ShowNormalDefault() + } +} + +func (ptr *PlainTextEdit) ShowNormalDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ShowNormalDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_TabletEvent +func callbackPlainTextEditb1a9c9_TabletEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "tabletEvent"); signal != nil { + (*(*func(*std_gui.QTabletEvent))(signal))(std_gui.NewQTabletEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).TabletEventDefault(std_gui.NewQTabletEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) TabletEventDefault(event std_gui.QTabletEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_TabletEventDefault(ptr.Pointer(), std_gui.PointerFromQTabletEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_Update +func callbackPlainTextEditb1a9c9_Update(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "update"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).UpdateDefault() + } +} + +func (ptr *PlainTextEdit) UpdateDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_UpdateDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_UpdateMicroFocus +func callbackPlainTextEditb1a9c9_UpdateMicroFocus(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "updateMicroFocus"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).UpdateMicroFocusDefault() + } +} + +func (ptr *PlainTextEdit) UpdateMicroFocusDefault() { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_UpdateMicroFocusDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_WindowIconChanged +func callbackPlainTextEditb1a9c9_WindowIconChanged(ptr unsafe.Pointer, icon unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "windowIconChanged"); signal != nil { + (*(*func(*std_gui.QIcon))(signal))(std_gui.NewQIconFromPointer(icon)) + } + +} + +//export callbackPlainTextEditb1a9c9_WindowTitleChanged +func callbackPlainTextEditb1a9c9_WindowTitleChanged(ptr unsafe.Pointer, title C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "windowTitleChanged"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(title)) + } + +} + +//export callbackPlainTextEditb1a9c9_ChildEvent +func callbackPlainTextEditb1a9c9_ChildEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "childEvent"); signal != nil { + (*(*func(*std_core.QChildEvent))(signal))(std_core.NewQChildEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).ChildEventDefault(std_core.NewQChildEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) ChildEventDefault(event std_core.QChildEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ChildEventDefault(ptr.Pointer(), std_core.PointerFromQChildEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_ConnectNotify +func callbackPlainTextEditb1a9c9_ConnectNotify(ptr unsafe.Pointer, sign unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "connectNotify"); signal != nil { + (*(*func(*std_core.QMetaMethod))(signal))(std_core.NewQMetaMethodFromPointer(sign)) + } else { + NewPlainTextEditFromPointer(ptr).ConnectNotifyDefault(std_core.NewQMetaMethodFromPointer(sign)) + } +} + +func (ptr *PlainTextEdit) ConnectNotifyDefault(sign std_core.QMetaMethod_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_ConnectNotifyDefault(ptr.Pointer(), std_core.PointerFromQMetaMethod(sign)) + } +} + +//export callbackPlainTextEditb1a9c9_CustomEvent +func callbackPlainTextEditb1a9c9_CustomEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "customEvent"); signal != nil { + (*(*func(*std_core.QEvent))(signal))(std_core.NewQEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).CustomEventDefault(std_core.NewQEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) CustomEventDefault(event std_core.QEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_CustomEventDefault(ptr.Pointer(), std_core.PointerFromQEvent(event)) + } +} + +//export callbackPlainTextEditb1a9c9_DeleteLater +func callbackPlainTextEditb1a9c9_DeleteLater(ptr unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "deleteLater"); signal != nil { + (*(*func())(signal))() + } else { + NewPlainTextEditFromPointer(ptr).DeleteLaterDefault() + } +} + +func (ptr *PlainTextEdit) DeleteLaterDefault() { + if ptr.Pointer() != nil { + + qt.SetFinalizer(ptr, nil) + C.PlainTextEditb1a9c9_DeleteLaterDefault(ptr.Pointer()) + } +} + +//export callbackPlainTextEditb1a9c9_Destroyed +func callbackPlainTextEditb1a9c9_Destroyed(ptr unsafe.Pointer, obj unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "destroyed"); signal != nil { + (*(*func(*std_core.QObject))(signal))(std_core.NewQObjectFromPointer(obj)) + } + qt.Unregister(ptr) + +} + +//export callbackPlainTextEditb1a9c9_DisconnectNotify +func callbackPlainTextEditb1a9c9_DisconnectNotify(ptr unsafe.Pointer, sign unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "disconnectNotify"); signal != nil { + (*(*func(*std_core.QMetaMethod))(signal))(std_core.NewQMetaMethodFromPointer(sign)) + } else { + NewPlainTextEditFromPointer(ptr).DisconnectNotifyDefault(std_core.NewQMetaMethodFromPointer(sign)) + } +} + +func (ptr *PlainTextEdit) DisconnectNotifyDefault(sign std_core.QMetaMethod_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_DisconnectNotifyDefault(ptr.Pointer(), std_core.PointerFromQMetaMethod(sign)) + } +} + +//export callbackPlainTextEditb1a9c9_EventFilter +func callbackPlainTextEditb1a9c9_EventFilter(ptr unsafe.Pointer, watched unsafe.Pointer, event unsafe.Pointer) C.char { + if signal := qt.GetSignal(ptr, "eventFilter"); signal != nil { + return C.char(int8(qt.GoBoolToInt((*(*func(*std_core.QObject, *std_core.QEvent) bool)(signal))(std_core.NewQObjectFromPointer(watched), std_core.NewQEventFromPointer(event))))) + } + + return C.char(int8(qt.GoBoolToInt(NewPlainTextEditFromPointer(ptr).EventFilterDefault(std_core.NewQObjectFromPointer(watched), std_core.NewQEventFromPointer(event))))) +} + +func (ptr *PlainTextEdit) EventFilterDefault(watched std_core.QObject_ITF, event std_core.QEvent_ITF) bool { + if ptr.Pointer() != nil { + return int8(C.PlainTextEditb1a9c9_EventFilterDefault(ptr.Pointer(), std_core.PointerFromQObject(watched), std_core.PointerFromQEvent(event))) != 0 + } + return false +} + +//export callbackPlainTextEditb1a9c9_ObjectNameChanged +func callbackPlainTextEditb1a9c9_ObjectNameChanged(ptr unsafe.Pointer, objectName C.struct_Moc_PackedString) { + if signal := qt.GetSignal(ptr, "objectNameChanged"); signal != nil { + (*(*func(string))(signal))(cGoUnpackString(objectName)) + } + +} + +//export callbackPlainTextEditb1a9c9_TimerEvent +func callbackPlainTextEditb1a9c9_TimerEvent(ptr unsafe.Pointer, event unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "timerEvent"); signal != nil { + (*(*func(*std_core.QTimerEvent))(signal))(std_core.NewQTimerEventFromPointer(event)) + } else { + NewPlainTextEditFromPointer(ptr).TimerEventDefault(std_core.NewQTimerEventFromPointer(event)) + } +} + +func (ptr *PlainTextEdit) TimerEventDefault(event std_core.QTimerEvent_ITF) { + if ptr.Pointer() != nil { + C.PlainTextEditb1a9c9_TimerEventDefault(ptr.Pointer(), std_core.PointerFromQTimerEvent(event)) + } +} + +func init() { +} diff --git a/moc.h b/moc.h new file mode 100644 index 0000000..f386a69 --- /dev/null +++ b/moc.h @@ -0,0 +1,143 @@ + + +#pragma once + +#ifndef GO_MOC_b1a9c9_H +#define GO_MOC_b1a9c9_H + +#include + +#ifdef __cplusplus +class PlainTextEditb1a9c9; +void PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaTypes(); +extern "C" { +#endif + +struct Moc_PackedString { char* data; long long len; void* ptr; }; +struct Moc_PackedList { void* data; long long len; }; +void PlainTextEditb1a9c9_AddLine(void* ptr, struct Moc_PackedString v0); +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType(); +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType2(char* typeName); +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType(); +int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType2(char* uri, int versionMajor, int versionMinor, char* qmlName); +void* PlainTextEditb1a9c9___scrollBarWidgets_atList(void* ptr, int i); +void PlainTextEditb1a9c9___scrollBarWidgets_setList(void* ptr, void* i); +void* PlainTextEditb1a9c9___scrollBarWidgets_newList(void* ptr); +void* PlainTextEditb1a9c9___actions_atList(void* ptr, int i); +void PlainTextEditb1a9c9___actions_setList(void* ptr, void* i); +void* PlainTextEditb1a9c9___actions_newList(void* ptr); +void* PlainTextEditb1a9c9___addActions_actions_atList(void* ptr, int i); +void PlainTextEditb1a9c9___addActions_actions_setList(void* ptr, void* i); +void* PlainTextEditb1a9c9___addActions_actions_newList(void* ptr); +void* PlainTextEditb1a9c9___insertActions_actions_atList(void* ptr, int i); +void PlainTextEditb1a9c9___insertActions_actions_setList(void* ptr, void* i); +void* PlainTextEditb1a9c9___insertActions_actions_newList(void* ptr); +void* PlainTextEditb1a9c9___children_atList(void* ptr, int i); +void PlainTextEditb1a9c9___children_setList(void* ptr, void* i); +void* PlainTextEditb1a9c9___children_newList(void* ptr); +void* PlainTextEditb1a9c9___dynamicPropertyNames_atList(void* ptr, int i); +void PlainTextEditb1a9c9___dynamicPropertyNames_setList(void* ptr, void* i); +void* PlainTextEditb1a9c9___dynamicPropertyNames_newList(void* ptr); +void* PlainTextEditb1a9c9___findChildren_atList(void* ptr, int i); +void PlainTextEditb1a9c9___findChildren_setList(void* ptr, void* i); +void* PlainTextEditb1a9c9___findChildren_newList(void* ptr); +void* PlainTextEditb1a9c9___findChildren_atList3(void* ptr, int i); +void PlainTextEditb1a9c9___findChildren_setList3(void* ptr, void* i); +void* PlainTextEditb1a9c9___findChildren_newList3(void* ptr); +void* PlainTextEditb1a9c9_NewPlainTextEdit(void* parent); +void* PlainTextEditb1a9c9_NewPlainTextEdit2(struct Moc_PackedString text, void* parent); +void PlainTextEditb1a9c9_DestroyPlainTextEdit(void* ptr); +void PlainTextEditb1a9c9_DestroyPlainTextEditDefault(void* ptr); +void PlainTextEditb1a9c9_AppendHtmlDefault(void* ptr, struct Moc_PackedString html); +void PlainTextEditb1a9c9_AppendPlainTextDefault(void* ptr, struct Moc_PackedString text); +char PlainTextEditb1a9c9_CanInsertFromMimeDataDefault(void* ptr, void* source); +void PlainTextEditb1a9c9_CenterCursorDefault(void* ptr); +void PlainTextEditb1a9c9_ChangeEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_ClearDefault(void* ptr); +void PlainTextEditb1a9c9_ContextMenuEventDefault(void* ptr, void* event); +void PlainTextEditb1a9c9_CopyDefault(void* ptr); +void* PlainTextEditb1a9c9_CreateMimeDataFromSelectionDefault(void* ptr); +void PlainTextEditb1a9c9_CutDefault(void* ptr); +void PlainTextEditb1a9c9_DragEnterEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_DragLeaveEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_DragMoveEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_DropEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_FocusInEventDefault(void* ptr, void* e); +char PlainTextEditb1a9c9_FocusNextPrevChildDefault(void* ptr, char next); +void PlainTextEditb1a9c9_FocusOutEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_InputMethodEventDefault(void* ptr, void* e); +void* PlainTextEditb1a9c9_InputMethodQueryDefault(void* ptr, long long property); +void PlainTextEditb1a9c9_InsertFromMimeDataDefault(void* ptr, void* source); +void PlainTextEditb1a9c9_InsertPlainTextDefault(void* ptr, struct Moc_PackedString text); +void PlainTextEditb1a9c9_KeyPressEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_KeyReleaseEventDefault(void* ptr, void* e); +void* PlainTextEditb1a9c9_LoadResourceDefault(void* ptr, int ty, void* name); +void PlainTextEditb1a9c9_MouseDoubleClickEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_MouseMoveEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_MousePressEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_MouseReleaseEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_PaintEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_PasteDefault(void* ptr); +void PlainTextEditb1a9c9_RedoDefault(void* ptr); +void PlainTextEditb1a9c9_ResizeEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_ScrollContentsByDefault(void* ptr, int dx, int dy); +void PlainTextEditb1a9c9_SelectAllDefault(void* ptr); +void PlainTextEditb1a9c9_SetPlainTextDefault(void* ptr, struct Moc_PackedString text); +void PlainTextEditb1a9c9_ShowEventDefault(void* ptr, void* vqs); +void PlainTextEditb1a9c9_UndoDefault(void* ptr); +void PlainTextEditb1a9c9_WheelEventDefault(void* ptr, void* e); +void PlainTextEditb1a9c9_ZoomInDefault(void* ptr, int ran); +void PlainTextEditb1a9c9_ZoomOutDefault(void* ptr, int ran); +char PlainTextEditb1a9c9_EventDefault(void* ptr, void* event); +void* PlainTextEditb1a9c9_MinimumSizeHintDefault(void* ptr); +void PlainTextEditb1a9c9_SetupViewportDefault(void* ptr, void* viewport); +void* PlainTextEditb1a9c9_SizeHintDefault(void* ptr); +char PlainTextEditb1a9c9_ViewportEventDefault(void* ptr, void* event); +void* PlainTextEditb1a9c9_ViewportSizeHintDefault(void* ptr); +void PlainTextEditb1a9c9_ActionEventDefault(void* ptr, void* event); +char PlainTextEditb1a9c9_CloseDefault(void* ptr); +void PlainTextEditb1a9c9_CloseEventDefault(void* ptr, void* event); +void PlainTextEditb1a9c9_EnterEventDefault(void* ptr, void* event); +char PlainTextEditb1a9c9_HasHeightForWidthDefault(void* ptr); +int PlainTextEditb1a9c9_HeightForWidthDefault(void* ptr, int w); +void PlainTextEditb1a9c9_HideDefault(void* ptr); +void PlainTextEditb1a9c9_HideEventDefault(void* ptr, void* event); +void PlainTextEditb1a9c9_InitPainterDefault(void* ptr, void* painter); +void PlainTextEditb1a9c9_LeaveEventDefault(void* ptr, void* event); +void PlainTextEditb1a9c9_LowerDefault(void* ptr); +int PlainTextEditb1a9c9_MetricDefault(void* ptr, long long m); +void PlainTextEditb1a9c9_MoveEventDefault(void* ptr, void* event); +char PlainTextEditb1a9c9_NativeEventDefault(void* ptr, void* eventType, void* message, long* result); +void* PlainTextEditb1a9c9_PaintEngineDefault(void* ptr); +void PlainTextEditb1a9c9_RaiseDefault(void* ptr); +void PlainTextEditb1a9c9_RepaintDefault(void* ptr); +void PlainTextEditb1a9c9_SetDisabledDefault(void* ptr, char disable); +void PlainTextEditb1a9c9_SetEnabledDefault(void* ptr, char vbo); +void PlainTextEditb1a9c9_SetFocus2Default(void* ptr); +void PlainTextEditb1a9c9_SetHiddenDefault(void* ptr, char hidden); +void PlainTextEditb1a9c9_SetStyleSheetDefault(void* ptr, struct Moc_PackedString styleSheet); +void PlainTextEditb1a9c9_SetVisibleDefault(void* ptr, char visible); +void PlainTextEditb1a9c9_SetWindowModifiedDefault(void* ptr, char vbo); +void PlainTextEditb1a9c9_SetWindowTitleDefault(void* ptr, struct Moc_PackedString vqs); +void PlainTextEditb1a9c9_ShowDefault(void* ptr); +void PlainTextEditb1a9c9_ShowFullScreenDefault(void* ptr); +void PlainTextEditb1a9c9_ShowMaximizedDefault(void* ptr); +void PlainTextEditb1a9c9_ShowMinimizedDefault(void* ptr); +void PlainTextEditb1a9c9_ShowNormalDefault(void* ptr); +void PlainTextEditb1a9c9_TabletEventDefault(void* ptr, void* event); +void PlainTextEditb1a9c9_UpdateDefault(void* ptr); +void PlainTextEditb1a9c9_UpdateMicroFocusDefault(void* ptr); +void PlainTextEditb1a9c9_ChildEventDefault(void* ptr, void* event); +void PlainTextEditb1a9c9_ConnectNotifyDefault(void* ptr, void* sign); +void PlainTextEditb1a9c9_CustomEventDefault(void* ptr, void* event); +void PlainTextEditb1a9c9_DeleteLaterDefault(void* ptr); +void PlainTextEditb1a9c9_DisconnectNotifyDefault(void* ptr, void* sign); +char PlainTextEditb1a9c9_EventFilterDefault(void* ptr, void* watched, void* event); +; +void PlainTextEditb1a9c9_TimerEventDefault(void* ptr, void* event); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/moc_cgo_darwin_darwin_amd64.go b/moc_cgo_darwin_darwin_amd64.go new file mode 100644 index 0000000..8482250 --- /dev/null +++ b/moc_cgo_darwin_darwin_amd64.go @@ -0,0 +1,14 @@ +// +build !ios + +package main + +/* +#cgo CFLAGS: -pipe -O2 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB +#cgo CXXFLAGS: -pipe -stdlib=libc++ -O2 -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.12 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB +#cgo CXXFLAGS: -I../../fanaticscripter -I. -I../../therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib/QtWidgets.framework/Headers -I../../therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib/QtGui.framework/Headers -I../../therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib/QtQml.framework/Headers -I../../therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib/QtNetwork.framework/Headers -I../../therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../therecipe/env_darwin_amd64_513/5.13.0/clang_64/mkspecs/macx-clang -F/Users/zmwang/go/src/github.com/therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib +#cgo LDFLAGS: -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.12 -Wl,-rpath,/Users/zmwang/go/src/github.com/therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib +#cgo LDFLAGS: -F/Users/zmwang/go/src/github.com/therecipe/env_darwin_amd64_513/5.13.0/clang_64/lib -framework QtWidgets -framework QtGui -framework QtQml -framework QtNetwork -framework QtCore -framework OpenGL -framework AGL +#cgo CFLAGS: -Wno-unused-parameter -Wno-unused-variable -Wno-return-type +#cgo CXXFLAGS: -Wno-unused-parameter -Wno-unused-variable -Wno-return-type +*/ +import "C" diff --git a/moc_cgo_windows_windows_amd64.go b/moc_cgo_windows_windows_amd64.go new file mode 100644 index 0000000..5db049a --- /dev/null +++ b/moc_cgo_windows_windows_amd64.go @@ -0,0 +1,13 @@ +package main + +/* +#cgo CFLAGS: -fno-keep-inline-dllexport -O2 -Wall -W -Wextra -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_NEEDS_QMAIN -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB +#cgo CXXFLAGS: -fno-keep-inline-dllexport -O2 -Wall -W -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_NEEDS_QMAIN -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB +#cgo CXXFLAGS: -I../../Projects -I. -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/include -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/include/QtWidgets -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/include/QtGui -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/include/QtANGLE -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/include/QtQml -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/include/QtNetwork -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/include/QtCore -Irelease -I/include -I../../../../Qt/Qt5.13.0/5.13.0/mingw73_64/mkspecs/win32-g++ +#cgo LDFLAGS: -Wl,-subsystem,windows -mthreads -L C:/Qt/Qt5.13.0/5.13.0/mingw73_64/lib +#cgo LDFLAGS: C:/Qt/Qt5.13.0/5.13.0/mingw73_64/lib/libQt5Widgets.a C:/Qt/Qt5.13.0/5.13.0/mingw73_64/lib/libQt5Gui.a C:/Qt/Qt5.13.0/5.13.0/mingw73_64/lib/libQt5Qml.a C:/Qt/Qt5.13.0/5.13.0/mingw73_64/lib/libQt5Network.a C:/Qt/Qt5.13.0/5.13.0/mingw73_64/lib/libQt5Core.a -lmingw32 C:/Qt/Qt5.13.0/5.13.0/mingw73_64/lib/libqtmain.a -LC:/openssl/lib -LC:/Utils/postgresql/pgsql/lib -lshell32 +#cgo LDFLAGS: -Wl,--allow-multiple-definition +#cgo CFLAGS: -Wno-unused-parameter -Wno-unused-variable -Wno-return-type +#cgo CXXFLAGS: -Wno-unused-parameter -Wno-unused-variable -Wno-return-type +*/ +import "C" diff --git a/moc_moc.h b/moc_moc.h new file mode 100644 index 0000000..44be1be --- /dev/null +++ b/moc_moc.h @@ -0,0 +1,118 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'moc.cpp' +** +** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.0) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include +#include +#include +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'moc.cpp' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 67 +#error "This file was generated using the moc from 5.13.0. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED +struct qt_meta_stringdata_PlainTextEditb1a9c9_t { + QByteArrayData data[4]; + char stringdata0[32]; +}; +#define QT_MOC_LITERAL(idx, ofs, len) \ + Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ + qptrdiff(offsetof(qt_meta_stringdata_PlainTextEditb1a9c9_t, stringdata0) + ofs \ + - idx * sizeof(QByteArrayData)) \ + ) +static const qt_meta_stringdata_PlainTextEditb1a9c9_t qt_meta_stringdata_PlainTextEditb1a9c9 = { + { +QT_MOC_LITERAL(0, 0, 19), // "PlainTextEditb1a9c9" +QT_MOC_LITERAL(1, 20, 7), // "addLine" +QT_MOC_LITERAL(2, 28, 0), // "" +QT_MOC_LITERAL(3, 29, 2) // "v0" + + }, + "PlainTextEditb1a9c9\0addLine\0\0v0" +}; +#undef QT_MOC_LITERAL + +static const uint qt_meta_data_PlainTextEditb1a9c9[] = { + + // content: + 8, // revision + 0, // classname + 0, 0, // classinfo + 1, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: name, argc, parameters, tag, flags + 1, 1, 19, 2, 0x0a /* Public */, + + // slots: parameters + QMetaType::Void, QMetaType::QString, 3, + + 0 // eod +}; + +void PlainTextEditb1a9c9::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +{ + if (_c == QMetaObject::InvokeMetaMethod) { + auto *_t = static_cast(_o); + Q_UNUSED(_t) + switch (_id) { + case 0: _t->addLine((*reinterpret_cast< QString(*)>(_a[1]))); break; + default: ; + } + } +} + +QT_INIT_METAOBJECT const QMetaObject PlainTextEditb1a9c9::staticMetaObject = { { + &QPlainTextEdit::staticMetaObject, + qt_meta_stringdata_PlainTextEditb1a9c9.data, + qt_meta_data_PlainTextEditb1a9c9, + qt_static_metacall, + nullptr, + nullptr +} }; + + +const QMetaObject *PlainTextEditb1a9c9::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; +} + +void *PlainTextEditb1a9c9::qt_metacast(const char *_clname) +{ + if (!_clname) return nullptr; + if (!strcmp(_clname, qt_meta_stringdata_PlainTextEditb1a9c9.stringdata0)) + return static_cast(this); + return QPlainTextEdit::qt_metacast(_clname); +} + +int PlainTextEditb1a9c9::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QPlainTextEdit::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + if (_id < 1) + qt_static_metacall(this, _c, _id, _a); + _id -= 1; + } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { + if (_id < 1) + *reinterpret_cast(_a[0]) = -1; + _id -= 1; + } + return _id; +} +QT_WARNING_POP +QT_END_MOC_NAMESPACE diff --git a/util/util_unix.go b/util/util_unix.go new file mode 100644 index 0000000..abcc790 --- /dev/null +++ b/util/util_unix.go @@ -0,0 +1,17 @@ +// +build darwin linux + +package util + +import ( + "os/user" + "path/filepath" +) + +// DefaultDownloadsFolder returns the system-specific user downloads folder. +func DefaultDownloadsFolder() string { + whoami, err := user.Current() + if err != nil { + return "." + } + return filepath.Join(whoami.HomeDir, "Downloads") +} diff --git a/util/util_windows.go b/util/util_windows.go new file mode 100644 index 0000000..288905a --- /dev/null +++ b/util/util_windows.go @@ -0,0 +1,21 @@ +package util + +import ( + "os/user" + "path/filepath" + + "golang.org/x/sys/windows" +) + +// DefaultDownloadsFolder returns the system-specific user downloads folder. +func DefaultDownloadsFolder() string { + path, err := windows.KnownFolderPath(windows.FOLDERID_Downloads, 0) + if err == nil { + return path + } + whoami, err := user.Current() + if err != nil { + return "." + } + return filepath.Join(whoami.HomeDir, "Downloads") +}