2024-09-28 02:27:19 +00:00
|
|
|
// Generated by miqt-uic. To update this file, edit the .ui file in
|
|
|
|
// Qt Designer, and then run 'go generate'.
|
|
|
|
//
|
|
|
|
//go:generate miqt-uic -InFile design.ui -OutFile design.go
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
)
|
|
|
|
|
|
|
|
type MainWindowUi struct {
|
|
|
|
MainWindow *qt.QMainWindow
|
|
|
|
centralwidget *qt.QWidget
|
|
|
|
gridLayout *qt.QGridLayout
|
|
|
|
tabWidget *qt.QTabWidget
|
|
|
|
tab *qt.QWidget
|
|
|
|
formLayout *qt.QFormLayout
|
|
|
|
label *qt.QLabel
|
|
|
|
comboBox *qt.QComboBox
|
|
|
|
label_2 *qt.QLabel
|
|
|
|
spinBox *qt.QSpinBox
|
|
|
|
tab_2 *qt.QWidget
|
|
|
|
treeWidget *qt.QTreeWidget
|
|
|
|
menubar *qt.QMenuBar
|
|
|
|
menu_File *qt.QMenu
|
|
|
|
statusbar *qt.QStatusBar
|
|
|
|
dockWidget *qt.QDockWidget
|
|
|
|
dockWidgetContents *qt.QWidget
|
|
|
|
verticalLayout *qt.QVBoxLayout
|
|
|
|
calendarWidget *qt.QCalendarWidget
|
|
|
|
action_New *qt.QAction
|
|
|
|
actionE_xit *qt.QAction
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewMainWindowUi creates all Qt widget classes for MainWindow.
|
|
|
|
func NewMainWindowUi() *MainWindowUi {
|
|
|
|
ui := &MainWindowUi{}
|
|
|
|
|
|
|
|
ui.MainWindow = qt.NewQMainWindow2(nil)
|
|
|
|
ui.MainWindow.SetObjectName("MainWindow")
|
|
|
|
ui.MainWindow.Resize(800, 600)
|
|
|
|
ui.MainWindow.SetWindowTitle("MainWindow")
|
|
|
|
|
|
|
|
ui.action_New = qt.NewQAction()
|
|
|
|
ui.action_New.SetObjectName("action_New")
|
|
|
|
|
|
|
|
ui.actionE_xit = qt.NewQAction()
|
|
|
|
ui.actionE_xit.SetObjectName("actionE_xit")
|
|
|
|
|
|
|
|
ui.centralwidget = qt.NewQWidget2(ui.MainWindow.QWidget)
|
|
|
|
ui.centralwidget.SetObjectName("centralwidget")
|
|
|
|
|
|
|
|
ui.gridLayout = qt.NewQGridLayout(ui.centralwidget)
|
|
|
|
ui.gridLayout.SetObjectName("gridLayout")
|
|
|
|
|
|
|
|
ui.tabWidget = qt.NewQTabWidget2(ui.centralwidget)
|
|
|
|
ui.tabWidget.SetObjectName("tabWidget")
|
|
|
|
|
|
|
|
ui.tab = qt.NewQWidget2(ui.tabWidget.QWidget)
|
|
|
|
ui.tab.SetObjectName("tab")
|
|
|
|
|
|
|
|
ui.formLayout = qt.NewQFormLayout2(ui.tab)
|
|
|
|
ui.formLayout.SetObjectName("formLayout")
|
|
|
|
|
|
|
|
ui.label = qt.NewQLabel3(ui.tab)
|
|
|
|
ui.label.SetObjectName("label")
|
|
|
|
|
|
|
|
ui.formLayout.SetWidget(0, qt.QFormLayout__LabelRole, ui.label.QWidget)
|
|
|
|
|
|
|
|
ui.comboBox = qt.NewQComboBox2(ui.tab)
|
|
|
|
ui.comboBox.SetObjectName("comboBox")
|
|
|
|
ui.comboBox.AddItem("")
|
|
|
|
ui.comboBox.AddItem("")
|
|
|
|
|
|
|
|
ui.formLayout.SetWidget(0, qt.QFormLayout__FieldRole, ui.comboBox.QWidget)
|
|
|
|
|
|
|
|
ui.label_2 = qt.NewQLabel3(ui.tab)
|
|
|
|
ui.label_2.SetObjectName("label_2")
|
|
|
|
|
|
|
|
ui.formLayout.SetWidget(1, qt.QFormLayout__LabelRole, ui.label_2.QWidget)
|
|
|
|
|
|
|
|
ui.spinBox = qt.NewQSpinBox2(ui.tab)
|
|
|
|
ui.spinBox.SetObjectName("spinBox")
|
|
|
|
|
|
|
|
ui.formLayout.SetWidget(1, qt.QFormLayout__FieldRole, ui.spinBox.QWidget)
|
|
|
|
ui.tabWidget.AddTab(ui.tab, "")
|
|
|
|
|
|
|
|
ui.tab_2 = qt.NewQWidget2(ui.tabWidget.QWidget)
|
|
|
|
ui.tab_2.SetObjectName("tab_2")
|
|
|
|
ui.tabWidget.AddTab(ui.tab_2, "")
|
|
|
|
|
|
|
|
ui.gridLayout.AddWidget2(ui.tabWidget.QWidget, 0, 0)
|
|
|
|
|
|
|
|
ui.treeWidget = qt.NewQTreeWidget2(ui.centralwidget)
|
|
|
|
ui.treeWidget.SetObjectName("treeWidget")
|
|
|
|
ui.treeWidget.SetFrameShape(qt.QFrame__Panel)
|
|
|
|
|
|
|
|
ui.gridLayout.AddWidget2(ui.treeWidget.QWidget, 0, 1)
|
|
|
|
ui.MainWindow.SetCentralWidget(ui.centralwidget) // Set central widget
|
|
|
|
|
|
|
|
ui.menubar = qt.NewQMenuBar2(ui.MainWindow.QWidget)
|
|
|
|
ui.menubar.SetObjectName("menubar")
|
|
|
|
ui.menubar.Resize(800, 29)
|
|
|
|
|
|
|
|
ui.menu_File = qt.NewQMenu3(ui.menubar.QWidget)
|
|
|
|
ui.menu_File.SetObjectName("menu_File")
|
|
|
|
ui.menu_File.QWidget.AddAction(ui.action_New)
|
|
|
|
ui.menu_File.AddSeparator()
|
|
|
|
ui.menu_File.QWidget.AddAction(ui.actionE_xit)
|
|
|
|
ui.menubar.AddMenu(ui.menu_File)
|
|
|
|
ui.MainWindow.SetMenuBar(ui.menubar)
|
|
|
|
|
|
|
|
ui.statusbar = qt.NewQStatusBar2(ui.MainWindow.QWidget)
|
|
|
|
ui.statusbar.SetObjectName("statusbar")
|
|
|
|
ui.MainWindow.SetStatusBar(ui.statusbar)
|
|
|
|
|
|
|
|
ui.dockWidget = qt.NewQDockWidget5(ui.MainWindow.QWidget)
|
|
|
|
ui.dockWidget.SetObjectName("dockWidget")
|
2024-09-28 02:39:56 +00:00
|
|
|
ui.MainWindow.AddDockWidget(qt.DockWidgetArea(1), ui.dockWidget)
|
2024-09-28 02:27:19 +00:00
|
|
|
|
|
|
|
ui.dockWidgetContents = qt.NewQWidget2(ui.dockWidget.QWidget)
|
|
|
|
ui.dockWidgetContents.SetObjectName("dockWidgetContents")
|
|
|
|
|
|
|
|
ui.verticalLayout = qt.NewQVBoxLayout2(ui.dockWidgetContents)
|
|
|
|
ui.verticalLayout.SetObjectName("verticalLayout")
|
|
|
|
|
|
|
|
ui.calendarWidget = qt.NewQCalendarWidget2(ui.dockWidgetContents)
|
|
|
|
ui.calendarWidget.SetObjectName("calendarWidget")
|
|
|
|
|
|
|
|
ui.verticalLayout.AddWidget(ui.calendarWidget.QWidget)
|
|
|
|
ui.dockWidget.SetWidget(ui.dockWidgetContents) // Set central widget
|
|
|
|
|
|
|
|
ui.Retranslate()
|
|
|
|
|
|
|
|
return ui
|
|
|
|
}
|
|
|
|
|
|
|
|
// Retranslate reapplies all text translations.
|
|
|
|
func (ui *MainWindowUi) Retranslate() {
|
|
|
|
ui.action_New.SetText(qt.QMainWindow_Tr("&New..."))
|
|
|
|
ui.actionE_xit.SetText(qt.QMainWindow_Tr("E&xit"))
|
|
|
|
ui.actionE_xit.SetShortcut(qt.NewQKeySequence2(qt.QMainWindow_Tr("Ctrl+Q")))
|
2024-09-28 02:39:56 +00:00
|
|
|
ui.tabWidget.SetTabText(ui.tabWidget.IndexOf(ui.tab), qt.QTabWidget_Tr("Tab 1"))
|
2024-09-28 02:27:19 +00:00
|
|
|
ui.label.SetText(qt.QWidget_Tr("Dropdown:"))
|
|
|
|
ui.comboBox.SetItemText(0, qt.QComboBox_Tr("First"))
|
|
|
|
ui.comboBox.SetItemText(1, qt.QComboBox_Tr("Second"))
|
|
|
|
ui.label_2.SetText(qt.QWidget_Tr("Number:"))
|
2024-09-28 02:39:56 +00:00
|
|
|
ui.tabWidget.SetTabText(ui.tabWidget.IndexOf(ui.tab_2), qt.QTabWidget_Tr("Tab 2"))
|
2024-09-28 02:27:19 +00:00
|
|
|
ui.menu_File.SetTitle(qt.QMenuBar_Tr("&File"))
|
|
|
|
ui.dockWidget.SetWindowTitle(qt.QMainWindow_Tr("Dock Title"))
|
|
|
|
}
|