Commit in compat fixes and distribution-related stuff
This commit is contained in:
parent
f3e029b233
commit
be3980fd30
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/deploy
|
32
darwin/Contents/Info.plist
Normal file
32
darwin/Contents/Info.plist
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>annie-mingui</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>annie-mingui.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.zhimingwang.annie-mingui</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>annie-mingui</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2020.02.09</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.11</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
BIN
darwin/Contents/Resources/annie-mingui.icns
Normal file
BIN
darwin/Contents/Resources/annie-mingui.icns
Normal file
Binary file not shown.
1
icon.svg
Normal file
1
icon.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 100 100" x="0px" y="0px"><title>icons</title><path d="M74.78,27.5h-.26c-12,0-20.22,9.72-28.17,19.07C39.46,54.67,33,62.32,25.2,62.49a12.49,12.49,0,0,1,.08-25,13.86,13.86,0,0,1,7,2.36,27.43,27.43,0,0,1,2.73,2,5,5,0,1,0,6.34-7.74,37.62,37.62,0,0,0-3.73-2.71,23.54,23.54,0,0,0-12-3.89v0h-.73l-.17,0a22.5,22.5,0,0,0,.13,45h.77v0C37.78,72.09,46.37,62,54,53c6.79-8,13.21-15.54,20.64-15.54h.25a12.5,12.5,0,0,1,0,25h0a14.14,14.14,0,0,1-7.23-2.14,25.3,25.3,0,0,1-2.48-1.67,5,5,0,1,0-6,8A35.05,35.05,0,0,0,62.5,69,24.17,24.17,0,0,0,74.78,72.5h0a22.5,22.5,0,1,0,0-45Z"/><path d="M74.78,27.5h-.26c-12,0-20.22,9.72-28.17,19.07C39.46,54.67,33,62.32,25.2,62.49a12.49,12.49,0,0,1,.08-25,13.86,13.86,0,0,1,7,2.36,27.43,27.43,0,0,1,2.73,2,5,5,0,1,0,6.34-7.74,37.62,37.62,0,0,0-3.73-2.71,23.54,23.54,0,0,0-12-3.89v0h-.73l-.17,0a22.5,22.5,0,0,0,.13,45h.77v0C37.78,72.09,46.37,62,54,53c6.79-8,13.21-15.54,20.64-15.54h.25a12.5,12.5,0,0,1,0,25h0a14.14,14.14,0,0,1-7.23-2.14,25.3,25.3,0,0,1-2.48-1.67,5,5,0,1,0-6,8A35.05,35.05,0,0,0,62.5,69,24.17,24.17,0,0,0,74.78,72.5h0a22.5,22.5,0,1,0,0-45Z"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
521
main.go
Normal file
521
main.go
Normal file
@ -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 = `<p><strong>annie-mingui</strong> v2020.02.09</p>
|
||||
<p>Copyright (c) 2020 Zhiming Wang</p>
|
||||
<p>annie-mingui is a Qt wrapper for <a href="https://github.com/iawia002/annie">iawia002/annie</a> the video downloader. Credits:</p>
|
||||
<ul>
|
||||
<li>iawia002/annie, MIT license;</li>
|
||||
<li><a href="https://qt.io">Qt</a>, LGPLv3 license;</li>
|
||||
<li><a href="https://github.com/therecipe/qt">therecipe/qt</a>, Qt bindings for golang, LGPLv3 license.</li>
|
||||
</ul>
|
||||
<p>Project URL: <a href="https://github.com/fanaticscripter/annie-mingui">github.com/fanaticscripter/annie-mingui</a>.</p>
|
||||
`
|
||||
|
||||
// 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()
|
||||
}
|
787
moc.cpp
Normal file
787
moc.cpp
Normal file
@ -0,0 +1,787 @@
|
||||
|
||||
|
||||
#define protected public
|
||||
#define private public
|
||||
|
||||
#include "moc.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QActionEvent>
|
||||
#include <QByteArray>
|
||||
#include <QChildEvent>
|
||||
#include <QCloseEvent>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDragLeaveEvent>
|
||||
#include <QDragMoveEvent>
|
||||
#include <QDropEvent>
|
||||
#include <QEvent>
|
||||
#include <QFocusEvent>
|
||||
#include <QHideEvent>
|
||||
#include <QIcon>
|
||||
#include <QInputMethodEvent>
|
||||
#include <QKeyEvent>
|
||||
#include <QMetaMethod>
|
||||
#include <QMetaObject>
|
||||
#include <QMimeData>
|
||||
#include <QMouseEvent>
|
||||
#include <QMoveEvent>
|
||||
#include <QObject>
|
||||
#include <QPaintDevice>
|
||||
#include <QPaintEngine>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QResizeEvent>
|
||||
#include <QShowEvent>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QTabletEvent>
|
||||
#include <QTimerEvent>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
#include <QWheelEvent>
|
||||
#include <QWidget>
|
||||
|
||||
#ifdef QT_QML_LIB
|
||||
#include <QQmlEngine>
|
||||
#endif
|
||||
|
||||
|
||||
class PlainTextEditb1a9c9: public QPlainTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PlainTextEditb1a9c9(QWidget *parent = Q_NULLPTR) : QPlainTextEdit(parent) {qRegisterMetaType<quintptr>("quintptr");PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType();PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaTypes();callbackPlainTextEditb1a9c9_Constructor(this);};
|
||||
PlainTextEditb1a9c9(const QString &text, QWidget *parent = Q_NULLPTR) : QPlainTextEdit(text, parent) {qRegisterMetaType<quintptr>("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<char*>(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<char*>(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<void*>(static_cast<const void*>(this)), const_cast<QMimeData*>(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<QMimeData*>(callbackPlainTextEditb1a9c9_CreateMimeDataFromSelection(const_cast<void*>(static_cast<const void*>(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<QVariant*>(callbackPlainTextEditb1a9c9_InputMethodQuery(const_cast<void*>(static_cast<const void*>(this)), property)); };
|
||||
void insertFromMimeData(const QMimeData * source) { callbackPlainTextEditb1a9c9_InsertFromMimeData(this, const_cast<QMimeData*>(source)); };
|
||||
void insertPlainText(const QString & text) { QByteArray* t372ea0 = new QByteArray(text.toUtf8()); Moc_PackedString textPacked = { const_cast<char*>(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<QVariant*>(callbackPlainTextEditb1a9c9_LoadResource(this, ty, const_cast<QUrl*>(&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<char*>(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<QRect*>(&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<QSize*>(callbackPlainTextEditb1a9c9_MinimumSizeHint(const_cast<void*>(static_cast<const void*>(this)))); };
|
||||
void setupViewport(QWidget * viewport) { callbackPlainTextEditb1a9c9_SetupViewport(this, viewport); };
|
||||
QSize sizeHint() const { return *static_cast<QSize*>(callbackPlainTextEditb1a9c9_SizeHint(const_cast<void*>(static_cast<const void*>(this)))); };
|
||||
bool viewportEvent(QEvent * event) { return callbackPlainTextEditb1a9c9_ViewportEvent(this, event) != 0; };
|
||||
QSize viewportSizeHint() const { return *static_cast<QSize*>(callbackPlainTextEditb1a9c9_ViewportSizeHint(const_cast<void*>(static_cast<const void*>(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<QPoint*>(&pos)); };
|
||||
void enterEvent(QEvent * event) { callbackPlainTextEditb1a9c9_EnterEvent(this, event); };
|
||||
bool hasHeightForWidth() const { return callbackPlainTextEditb1a9c9_HasHeightForWidth(const_cast<void*>(static_cast<const void*>(this))) != 0; };
|
||||
int heightForWidth(int w) const { return callbackPlainTextEditb1a9c9_HeightForWidth(const_cast<void*>(static_cast<const void*>(this)), w); };
|
||||
void hide() { callbackPlainTextEditb1a9c9_Hide(this); };
|
||||
void hideEvent(QHideEvent * event) { callbackPlainTextEditb1a9c9_HideEvent(this, event); };
|
||||
void initPainter(QPainter * painter) const { callbackPlainTextEditb1a9c9_InitPainter(const_cast<void*>(static_cast<const void*>(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<void*>(static_cast<const void*>(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<QByteArray*>(&eventType), message, result) != 0; };
|
||||
QPaintEngine * paintEngine() const { return static_cast<QPaintEngine*>(callbackPlainTextEditb1a9c9_PaintEngine(const_cast<void*>(static_cast<const void*>(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<char*>(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<char*>(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<QIcon*>(&icon)); };
|
||||
void Signal_WindowTitleChanged(const QString & title) { QByteArray* t3c6de1 = new QByteArray(title.toUtf8()); Moc_PackedString titlePacked = { const_cast<char*>(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<QMetaMethod*>(&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<QMetaMethod*>(&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<char*>(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<char*>(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<PlainTextEditb1a9c9*>(ptr), "addLine", Q_ARG(QString, QString::fromUtf8(v0.data, v0.len)));
|
||||
}
|
||||
|
||||
int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType()
|
||||
{
|
||||
return qRegisterMetaType<PlainTextEditb1a9c9*>();
|
||||
}
|
||||
|
||||
int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QRegisterMetaType2(char* typeName)
|
||||
{
|
||||
return qRegisterMetaType<PlainTextEditb1a9c9*>(const_cast<const char*>(typeName));
|
||||
}
|
||||
|
||||
int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType()
|
||||
{
|
||||
#ifdef QT_QML_LIB
|
||||
return qmlRegisterType<PlainTextEditb1a9c9>();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int PlainTextEditb1a9c9_PlainTextEditb1a9c9_QmlRegisterType2(char* uri, int versionMajor, int versionMinor, char* qmlName)
|
||||
{
|
||||
#ifdef QT_QML_LIB
|
||||
return qmlRegisterType<PlainTextEditb1a9c9>(const_cast<const char*>(uri), versionMajor, versionMinor, const_cast<const char*>(qmlName));
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___scrollBarWidgets_atList(void* ptr, int i)
|
||||
{
|
||||
return ({QWidget * tmp = static_cast<QList<QWidget *>*>(ptr)->at(i); if (i == static_cast<QList<QWidget *>*>(ptr)->size()-1) { static_cast<QList<QWidget *>*>(ptr)->~QList(); free(ptr); }; tmp; });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___scrollBarWidgets_setList(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QWidget *>*>(ptr)->append(static_cast<QWidget*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___scrollBarWidgets_newList(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QWidget *>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___actions_atList(void* ptr, int i)
|
||||
{
|
||||
return ({QAction * tmp = static_cast<QList<QAction *>*>(ptr)->at(i); if (i == static_cast<QList<QAction *>*>(ptr)->size()-1) { static_cast<QList<QAction *>*>(ptr)->~QList(); free(ptr); }; tmp; });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___actions_setList(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QAction *>*>(ptr)->append(static_cast<QAction*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___actions_newList(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QAction *>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___addActions_actions_atList(void* ptr, int i)
|
||||
{
|
||||
return ({QAction * tmp = static_cast<QList<QAction *>*>(ptr)->at(i); if (i == static_cast<QList<QAction *>*>(ptr)->size()-1) { static_cast<QList<QAction *>*>(ptr)->~QList(); free(ptr); }; tmp; });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___addActions_actions_setList(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QAction *>*>(ptr)->append(static_cast<QAction*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___addActions_actions_newList(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QAction *>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___insertActions_actions_atList(void* ptr, int i)
|
||||
{
|
||||
return ({QAction * tmp = static_cast<QList<QAction *>*>(ptr)->at(i); if (i == static_cast<QList<QAction *>*>(ptr)->size()-1) { static_cast<QList<QAction *>*>(ptr)->~QList(); free(ptr); }; tmp; });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___insertActions_actions_setList(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QAction *>*>(ptr)->append(static_cast<QAction*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___insertActions_actions_newList(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QAction *>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___children_atList(void* ptr, int i)
|
||||
{
|
||||
return ({QObject * tmp = static_cast<QList<QObject *>*>(ptr)->at(i); if (i == static_cast<QList<QObject *>*>(ptr)->size()-1) { static_cast<QList<QObject *>*>(ptr)->~QList(); free(ptr); }; tmp; });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___children_setList(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QObject *>*>(ptr)->append(static_cast<QObject*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___children_newList(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QObject *>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___dynamicPropertyNames_atList(void* ptr, int i)
|
||||
{
|
||||
return new QByteArray(({QByteArray tmp = static_cast<QList<QByteArray>*>(ptr)->at(i); if (i == static_cast<QList<QByteArray>*>(ptr)->size()-1) { static_cast<QList<QByteArray>*>(ptr)->~QList(); free(ptr); }; tmp; }));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___dynamicPropertyNames_setList(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QByteArray>*>(ptr)->append(*static_cast<QByteArray*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___dynamicPropertyNames_newList(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QByteArray>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___findChildren_atList(void* ptr, int i)
|
||||
{
|
||||
return ({QObject* tmp = static_cast<QList<QObject*>*>(ptr)->at(i); if (i == static_cast<QList<QObject*>*>(ptr)->size()-1) { static_cast<QList<QObject*>*>(ptr)->~QList(); free(ptr); }; tmp; });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___findChildren_setList(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QObject*>*>(ptr)->append(static_cast<QObject*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___findChildren_newList(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QObject*>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___findChildren_atList3(void* ptr, int i)
|
||||
{
|
||||
return ({QObject* tmp = static_cast<QList<QObject*>*>(ptr)->at(i); if (i == static_cast<QList<QObject*>*>(ptr)->size()-1) { static_cast<QList<QObject*>*>(ptr)->~QList(); free(ptr); }; tmp; });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9___findChildren_setList3(void* ptr, void* i)
|
||||
{
|
||||
static_cast<QList<QObject*>*>(ptr)->append(static_cast<QObject*>(i));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9___findChildren_newList3(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
return new QList<QObject*>();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_NewPlainTextEdit(void* parent)
|
||||
{
|
||||
return new PlainTextEditb1a9c9(static_cast<QWidget*>(parent));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_NewPlainTextEdit2(struct Moc_PackedString text, void* parent)
|
||||
{
|
||||
return new PlainTextEditb1a9c9(QString::fromUtf8(text.data, text.len), static_cast<QWidget*>(parent));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DestroyPlainTextEdit(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->~PlainTextEditb1a9c9();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DestroyPlainTextEditDefault(void* ptr)
|
||||
{
|
||||
Q_UNUSED(ptr);
|
||||
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_AppendHtmlDefault(void* ptr, struct Moc_PackedString html)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::appendHtml(QString::fromUtf8(html.data, html.len));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_AppendPlainTextDefault(void* ptr, struct Moc_PackedString text)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::appendPlainText(QString::fromUtf8(text.data, text.len));
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_CanInsertFromMimeDataDefault(void* ptr, void* source)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::canInsertFromMimeData(static_cast<QMimeData*>(source));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_CenterCursorDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::centerCursor();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ChangeEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::changeEvent(static_cast<QEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ClearDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::clear();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ContextMenuEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::contextMenuEvent(static_cast<QContextMenuEvent*>(event));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_CopyDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::copy();
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_CreateMimeDataFromSelectionDefault(void* ptr)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::createMimeDataFromSelection();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_CutDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::cut();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DragEnterEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::dragEnterEvent(static_cast<QDragEnterEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DragLeaveEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::dragLeaveEvent(static_cast<QDragLeaveEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DragMoveEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::dragMoveEvent(static_cast<QDragMoveEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DropEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::dropEvent(static_cast<QDropEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_FocusInEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::focusInEvent(static_cast<QFocusEvent*>(e));
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_FocusNextPrevChildDefault(void* ptr, char next)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::focusNextPrevChild(next != 0);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_FocusOutEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::focusOutEvent(static_cast<QFocusEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_InputMethodEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::inputMethodEvent(static_cast<QInputMethodEvent*>(e));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_InputMethodQueryDefault(void* ptr, long long property)
|
||||
{
|
||||
return new QVariant(static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::inputMethodQuery(static_cast<Qt::InputMethodQuery>(property)));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_InsertFromMimeDataDefault(void* ptr, void* source)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::insertFromMimeData(static_cast<QMimeData*>(source));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_InsertPlainTextDefault(void* ptr, struct Moc_PackedString text)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::insertPlainText(QString::fromUtf8(text.data, text.len));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_KeyPressEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::keyPressEvent(static_cast<QKeyEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_KeyReleaseEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::keyReleaseEvent(static_cast<QKeyEvent*>(e));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_LoadResourceDefault(void* ptr, int ty, void* name)
|
||||
{
|
||||
return new QVariant(static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::loadResource(ty, *static_cast<QUrl*>(name)));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_MouseDoubleClickEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::mouseDoubleClickEvent(static_cast<QMouseEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_MouseMoveEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::mouseMoveEvent(static_cast<QMouseEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_MousePressEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::mousePressEvent(static_cast<QMouseEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_MouseReleaseEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::mouseReleaseEvent(static_cast<QMouseEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_PaintEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::paintEvent(static_cast<QPaintEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_PasteDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::paste();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_RedoDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::redo();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ResizeEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::resizeEvent(static_cast<QResizeEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ScrollContentsByDefault(void* ptr, int dx, int dy)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::scrollContentsBy(dx, dy);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SelectAllDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::selectAll();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetPlainTextDefault(void* ptr, struct Moc_PackedString text)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setPlainText(QString::fromUtf8(text.data, text.len));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ShowEventDefault(void* ptr, void* vqs)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::showEvent(static_cast<QShowEvent*>(vqs));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_UndoDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::undo();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_WheelEventDefault(void* ptr, void* e)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::wheelEvent(static_cast<QWheelEvent*>(e));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ZoomInDefault(void* ptr, int ran)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::zoomIn(ran);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ZoomOutDefault(void* ptr, int ran)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::zoomOut(ran);
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_EventDefault(void* ptr, void* event)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::event(static_cast<QEvent*>(event));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_MinimumSizeHintDefault(void* ptr)
|
||||
{
|
||||
return ({ QSize tmpValue = static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::minimumSizeHint(); new QSize(tmpValue.width(), tmpValue.height()); });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetupViewportDefault(void* ptr, void* viewport)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setupViewport(static_cast<QWidget*>(viewport));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_SizeHintDefault(void* ptr)
|
||||
{
|
||||
return ({ QSize tmpValue = static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::sizeHint(); new QSize(tmpValue.width(), tmpValue.height()); });
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_ViewportEventDefault(void* ptr, void* event)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::viewportEvent(static_cast<QEvent*>(event));
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_ViewportSizeHintDefault(void* ptr)
|
||||
{
|
||||
return ({ QSize tmpValue = static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::viewportSizeHint(); new QSize(tmpValue.width(), tmpValue.height()); });
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ActionEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::actionEvent(static_cast<QActionEvent*>(event));
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_CloseDefault(void* ptr)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::close();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_CloseEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::closeEvent(static_cast<QCloseEvent*>(event));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_EnterEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::enterEvent(static_cast<QEvent*>(event));
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_HasHeightForWidthDefault(void* ptr)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::hasHeightForWidth();
|
||||
}
|
||||
|
||||
int PlainTextEditb1a9c9_HeightForWidthDefault(void* ptr, int w)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::heightForWidth(w);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_HideDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::hide();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_HideEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::hideEvent(static_cast<QHideEvent*>(event));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_InitPainterDefault(void* ptr, void* painter)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::initPainter(static_cast<QPainter*>(painter));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_LeaveEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::leaveEvent(static_cast<QEvent*>(event));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_LowerDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::lower();
|
||||
}
|
||||
|
||||
int PlainTextEditb1a9c9_MetricDefault(void* ptr, long long m)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::metric(static_cast<QPaintDevice::PaintDeviceMetric>(m));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_MoveEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::moveEvent(static_cast<QMoveEvent*>(event));
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_NativeEventDefault(void* ptr, void* eventType, void* message, long* result)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::nativeEvent(*static_cast<QByteArray*>(eventType), message, result);
|
||||
}
|
||||
|
||||
void* PlainTextEditb1a9c9_PaintEngineDefault(void* ptr)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::paintEngine();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_RaiseDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::raise();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_RepaintDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::repaint();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetDisabledDefault(void* ptr, char disable)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setDisabled(disable != 0);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetEnabledDefault(void* ptr, char vbo)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setEnabled(vbo != 0);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetFocus2Default(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setFocus();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetHiddenDefault(void* ptr, char hidden)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setHidden(hidden != 0);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetStyleSheetDefault(void* ptr, struct Moc_PackedString styleSheet)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setStyleSheet(QString::fromUtf8(styleSheet.data, styleSheet.len));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetVisibleDefault(void* ptr, char visible)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setVisible(visible != 0);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetWindowModifiedDefault(void* ptr, char vbo)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setWindowModified(vbo != 0);
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_SetWindowTitleDefault(void* ptr, struct Moc_PackedString vqs)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::setWindowTitle(QString::fromUtf8(vqs.data, vqs.len));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ShowDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::show();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ShowFullScreenDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::showFullScreen();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ShowMaximizedDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::showMaximized();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ShowMinimizedDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::showMinimized();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ShowNormalDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::showNormal();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_TabletEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::tabletEvent(static_cast<QTabletEvent*>(event));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_UpdateDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::update();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_UpdateMicroFocusDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::updateMicroFocus();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ChildEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::childEvent(static_cast<QChildEvent*>(event));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_ConnectNotifyDefault(void* ptr, void* sign)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::connectNotify(*static_cast<QMetaMethod*>(sign));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_CustomEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::customEvent(static_cast<QEvent*>(event));
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DeleteLaterDefault(void* ptr)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::deleteLater();
|
||||
}
|
||||
|
||||
void PlainTextEditb1a9c9_DisconnectNotifyDefault(void* ptr, void* sign)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::disconnectNotify(*static_cast<QMetaMethod*>(sign));
|
||||
}
|
||||
|
||||
char PlainTextEditb1a9c9_EventFilterDefault(void* ptr, void* watched, void* event)
|
||||
{
|
||||
return static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::eventFilter(static_cast<QObject*>(watched), static_cast<QEvent*>(event));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PlainTextEditb1a9c9_TimerEventDefault(void* ptr, void* event)
|
||||
{
|
||||
static_cast<PlainTextEditb1a9c9*>(ptr)->QPlainTextEdit::timerEvent(static_cast<QTimerEvent*>(event));
|
||||
}
|
||||
|
||||
#include "moc_moc.h"
|
143
moc.h
Normal file
143
moc.h
Normal file
@ -0,0 +1,143 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef GO_MOC_b1a9c9_H
|
||||
#define GO_MOC_b1a9c9_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#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
|
14
moc_cgo_darwin_darwin_amd64.go
Normal file
14
moc_cgo_darwin_darwin_amd64.go
Normal file
@ -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"
|
13
moc_cgo_windows_windows_amd64.go
Normal file
13
moc_cgo_windows_windows_amd64.go
Normal file
@ -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"
|
118
moc_moc.h
Normal file
118
moc_moc.h
Normal file
@ -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 <memory>
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'moc.cpp' doesn't include <QObject>."
|
||||
#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<PlainTextEditb1a9c9 *>(_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<void*>(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<int*>(_a[0]) = -1;
|
||||
_id -= 1;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
QT_WARNING_POP
|
||||
QT_END_MOC_NAMESPACE
|
17
util/util_unix.go
Normal file
17
util/util_unix.go
Normal file
@ -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")
|
||||
}
|
21
util/util_windows.go
Normal file
21
util/util_windows.go
Normal file
@ -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")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user