2024-10-03 06:34:28 +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 mainwindow.ui -OutFile mainwindow_ui.go
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
)
|
|
|
|
|
|
|
|
type MainWindowUi struct {
|
|
|
|
MainWindow *qt.QMainWindow
|
|
|
|
centralWidget *qt.QWidget
|
|
|
|
gridLayout *qt.QGridLayout
|
|
|
|
splitter *qt.QSplitter
|
|
|
|
bucketTree *qt.QTreeWidget
|
|
|
|
stackedWidget *qt.QStackedWidget
|
|
|
|
databasePage *qt.QWidget
|
|
|
|
gridLayout_4 *qt.QGridLayout
|
|
|
|
databaseTabWidget *qt.QTabWidget
|
|
|
|
databasePropertiesTab *qt.QWidget
|
|
|
|
gridLayout_2 *qt.QGridLayout
|
|
|
|
databasePropertiesArea *qt.QPlainTextEdit
|
|
|
|
bucketPage *qt.QWidget
|
|
|
|
gridLayout_3 *qt.QGridLayout
|
|
|
|
bucketTabWidget *qt.QTabWidget
|
|
|
|
bucketPropertiesTab *qt.QWidget
|
|
|
|
gridLayout_5 *qt.QGridLayout
|
|
|
|
bucketPropertiesArea *qt.QPlainTextEdit
|
|
|
|
bucketDataTab *qt.QWidget
|
|
|
|
gridLayout_6 *qt.QGridLayout
|
|
|
|
bucketData *qt.QTreeWidget
|
|
|
|
AddDataButton *qt.QPushButton
|
|
|
|
horizontalSpacer *qt.QSpacerItem
|
|
|
|
DeleteDataButton *qt.QPushButton
|
|
|
|
menuBar *qt.QMenuBar
|
|
|
|
menuFile *qt.QMenu
|
|
|
|
menuHelp *qt.QMenu
|
|
|
|
menuView *qt.QMenu
|
|
|
|
mainToolBar *qt.QToolBar
|
|
|
|
statusBar *qt.QStatusBar
|
|
|
|
actionAbout_qbolt *qt.QAction
|
|
|
|
actionAbout_Qt *qt.QAction
|
|
|
|
actionOpen_database *qt.QAction
|
|
|
|
actionExit *qt.QAction
|
|
|
|
actionDisconnect *qt.QAction
|
|
|
|
actionDelete_bucket *qt.QAction
|
|
|
|
actionRefresh_buckets *qt.QAction
|
|
|
|
actionClear_selection *qt.QAction
|
|
|
|
actionNew_database *qt.QAction
|
|
|
|
actionAdd_bucket *qt.QAction
|
|
|
|
actionOpen_database_as_read_only *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(668, 405)
|
|
|
|
ui.MainWindow.SetWindowTitle("QBolt")
|
|
|
|
icon0 := qt.NewQIcon()
|
|
|
|
icon0.AddFile4(":/rsrc/database_lightning.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.MainWindow.SetWindowIcon(icon0)
|
|
|
|
|
|
|
|
ui.actionAbout_qbolt = qt.NewQAction()
|
|
|
|
ui.actionAbout_qbolt.SetObjectName("actionAbout_qbolt")
|
|
|
|
icon1 := qt.NewQIcon()
|
|
|
|
icon1.AddFile4(":/rsrc/information.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionAbout_qbolt.SetIcon(icon1)
|
|
|
|
|
|
|
|
ui.actionAbout_Qt = qt.NewQAction()
|
|
|
|
ui.actionAbout_Qt.SetObjectName("actionAbout_Qt")
|
|
|
|
|
|
|
|
ui.actionOpen_database = qt.NewQAction()
|
|
|
|
ui.actionOpen_database.SetObjectName("actionOpen_database")
|
|
|
|
icon2 := qt.NewQIcon()
|
|
|
|
icon2.AddFile4(":/rsrc/database.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionOpen_database.SetIcon(icon2)
|
|
|
|
|
|
|
|
ui.actionExit = qt.NewQAction()
|
|
|
|
ui.actionExit.SetObjectName("actionExit")
|
|
|
|
icon3 := qt.NewQIcon()
|
|
|
|
icon3.AddFile4(":/rsrc/door_out.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionExit.SetIcon(icon3)
|
|
|
|
|
|
|
|
ui.actionDisconnect = qt.NewQAction()
|
|
|
|
ui.actionDisconnect.SetObjectName("actionDisconnect")
|
|
|
|
icon4 := qt.NewQIcon()
|
|
|
|
icon4.AddFile4(":/rsrc/disconnect.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionDisconnect.SetIcon(icon4)
|
|
|
|
|
|
|
|
ui.actionDelete_bucket = qt.NewQAction()
|
|
|
|
ui.actionDelete_bucket.SetObjectName("actionDelete_bucket")
|
|
|
|
icon5 := qt.NewQIcon()
|
|
|
|
icon5.AddFile4(":/rsrc/table_delete.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionDelete_bucket.SetIcon(icon5)
|
|
|
|
|
|
|
|
ui.actionRefresh_buckets = qt.NewQAction()
|
|
|
|
ui.actionRefresh_buckets.SetObjectName("actionRefresh_buckets")
|
|
|
|
icon6 := qt.NewQIcon()
|
|
|
|
icon6.AddFile4(":/rsrc/arrow_refresh.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionRefresh_buckets.SetIcon(icon6)
|
|
|
|
|
|
|
|
ui.actionClear_selection = qt.NewQAction()
|
|
|
|
ui.actionClear_selection.SetObjectName("actionClear_selection")
|
|
|
|
|
|
|
|
ui.actionNew_database = qt.NewQAction()
|
|
|
|
ui.actionNew_database.SetObjectName("actionNew_database")
|
|
|
|
icon7 := qt.NewQIcon()
|
|
|
|
icon7.AddFile4(":/rsrc/database_add.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionNew_database.SetIcon(icon7)
|
|
|
|
|
|
|
|
ui.actionAdd_bucket = qt.NewQAction()
|
|
|
|
ui.actionAdd_bucket.SetObjectName("actionAdd_bucket")
|
|
|
|
icon8 := qt.NewQIcon()
|
|
|
|
icon8.AddFile4(":/rsrc/table_add.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.actionAdd_bucket.SetIcon(icon8)
|
|
|
|
|
|
|
|
ui.actionOpen_database_as_read_only = qt.NewQAction()
|
|
|
|
ui.actionOpen_database_as_read_only.SetObjectName("actionOpen_database_as_read_only")
|
|
|
|
|
|
|
|
ui.centralWidget = qt.NewQWidget2(ui.MainWindow.QWidget)
|
|
|
|
ui.centralWidget.SetObjectName("centralWidget")
|
|
|
|
|
|
|
|
ui.gridLayout = qt.NewQGridLayout(ui.centralWidget)
|
|
|
|
ui.gridLayout.SetObjectName("gridLayout")
|
|
|
|
ui.gridLayout.SetContentsMargins(0, 0, 0, 0)
|
|
|
|
ui.gridLayout.SetSpacing(6)
|
|
|
|
|
|
|
|
ui.splitter = qt.NewQSplitter3(ui.centralWidget)
|
|
|
|
ui.splitter.SetObjectName("splitter")
|
|
|
|
ui.splitter.SetOrientation(qt.Horizontal)
|
|
|
|
ui.splitter.SetChildrenCollapsible(false)
|
|
|
|
|
|
|
|
ui.bucketTree = qt.NewQTreeWidget2(ui.splitter.QWidget)
|
|
|
|
ui.bucketTree.SetObjectName("bucketTree")
|
|
|
|
ui.bucketTree.SetContextMenuPolicy(qt.CustomContextMenu)
|
|
|
|
ui.bucketTree.SetUniformRowHeights(true)
|
|
|
|
ui.splitter.AddWidget(ui.bucketTree.QWidget)
|
|
|
|
|
|
|
|
ui.stackedWidget = qt.NewQStackedWidget2(ui.splitter.QWidget)
|
|
|
|
ui.stackedWidget.SetObjectName("stackedWidget")
|
|
|
|
|
|
|
|
ui.databasePage = qt.NewQWidget2(ui.stackedWidget.QWidget)
|
|
|
|
ui.databasePage.SetObjectName("databasePage")
|
|
|
|
|
|
|
|
ui.gridLayout_4 = qt.NewQGridLayout(ui.databasePage)
|
|
|
|
ui.gridLayout_4.SetObjectName("gridLayout_4")
|
|
|
|
ui.gridLayout_4.SetContentsMargins(0, 0, 0, 0)
|
|
|
|
ui.gridLayout_4.SetSpacing(6)
|
|
|
|
|
|
|
|
ui.databaseTabWidget = qt.NewQTabWidget2(ui.databasePage)
|
|
|
|
ui.databaseTabWidget.SetObjectName("databaseTabWidget")
|
|
|
|
|
|
|
|
ui.databasePropertiesTab = qt.NewQWidget2(ui.databaseTabWidget.QWidget)
|
|
|
|
ui.databasePropertiesTab.SetObjectName("databasePropertiesTab")
|
|
|
|
|
|
|
|
ui.gridLayout_2 = qt.NewQGridLayout(ui.databasePropertiesTab)
|
|
|
|
ui.gridLayout_2.SetObjectName("gridLayout_2")
|
|
|
|
ui.gridLayout_2.SetContentsMargins(3, 3, 3, 3)
|
|
|
|
ui.gridLayout_2.SetSpacing(6)
|
|
|
|
|
|
|
|
ui.databasePropertiesArea = qt.NewQPlainTextEdit3(ui.databasePropertiesTab)
|
|
|
|
ui.databasePropertiesArea.SetObjectName("databasePropertiesArea")
|
|
|
|
ui.databasePropertiesArea.SetFrameShape(qt.QFrame__NoFrame)
|
|
|
|
ui.databasePropertiesArea.SetReadOnly(true)
|
|
|
|
|
|
|
|
ui.gridLayout_2.AddWidget2(ui.databasePropertiesArea.QWidget, 0, 0)
|
|
|
|
icon9 := qt.NewQIcon()
|
|
|
|
icon9.AddFile4(":/rsrc/chart_bar.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.databaseTabWidget.AddTab2(ui.databasePropertiesTab, icon9, "")
|
|
|
|
|
|
|
|
ui.gridLayout_4.AddWidget2(ui.databaseTabWidget.QWidget, 0, 0)
|
|
|
|
ui.stackedWidget.AddWidget(ui.databasePage)
|
|
|
|
|
|
|
|
ui.bucketPage = qt.NewQWidget2(ui.stackedWidget.QWidget)
|
|
|
|
ui.bucketPage.SetObjectName("bucketPage")
|
|
|
|
|
|
|
|
ui.gridLayout_3 = qt.NewQGridLayout(ui.bucketPage)
|
|
|
|
ui.gridLayout_3.SetObjectName("gridLayout_3")
|
|
|
|
ui.gridLayout_3.SetContentsMargins(0, 0, 0, 0)
|
|
|
|
ui.gridLayout_3.SetSpacing(6)
|
|
|
|
|
|
|
|
ui.bucketTabWidget = qt.NewQTabWidget2(ui.bucketPage)
|
|
|
|
ui.bucketTabWidget.SetObjectName("bucketTabWidget")
|
|
|
|
|
|
|
|
ui.bucketPropertiesTab = qt.NewQWidget2(ui.bucketTabWidget.QWidget)
|
|
|
|
ui.bucketPropertiesTab.SetObjectName("bucketPropertiesTab")
|
|
|
|
|
|
|
|
ui.gridLayout_5 = qt.NewQGridLayout(ui.bucketPropertiesTab)
|
|
|
|
ui.gridLayout_5.SetObjectName("gridLayout_5")
|
|
|
|
ui.gridLayout_5.SetContentsMargins(3, 3, 3, 3)
|
|
|
|
ui.gridLayout_5.SetSpacing(6)
|
|
|
|
|
|
|
|
ui.bucketPropertiesArea = qt.NewQPlainTextEdit3(ui.bucketPropertiesTab)
|
|
|
|
ui.bucketPropertiesArea.SetObjectName("bucketPropertiesArea")
|
|
|
|
ui.bucketPropertiesArea.SetFrameShape(qt.QFrame__NoFrame)
|
|
|
|
ui.bucketPropertiesArea.SetReadOnly(true)
|
|
|
|
|
|
|
|
ui.gridLayout_5.AddWidget2(ui.bucketPropertiesArea.QWidget, 0, 0)
|
|
|
|
icon10 := qt.NewQIcon()
|
|
|
|
icon10.AddFile4(":/rsrc/chart_bar.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.bucketTabWidget.AddTab2(ui.bucketPropertiesTab, icon10, "")
|
|
|
|
|
|
|
|
ui.bucketDataTab = qt.NewQWidget2(ui.bucketTabWidget.QWidget)
|
|
|
|
ui.bucketDataTab.SetObjectName("bucketDataTab")
|
|
|
|
|
|
|
|
ui.gridLayout_6 = qt.NewQGridLayout(ui.bucketDataTab)
|
|
|
|
ui.gridLayout_6.SetObjectName("gridLayout_6")
|
|
|
|
ui.gridLayout_6.SetContentsMargins(3, 3, 3, 3)
|
|
|
|
ui.gridLayout_6.SetSpacing(6)
|
|
|
|
|
|
|
|
ui.bucketData = qt.NewQTreeWidget2(ui.bucketDataTab)
|
|
|
|
ui.bucketData.SetObjectName("bucketData")
|
|
|
|
ui.bucketData.SetSelectionMode(qt.QAbstractItemView__ExtendedSelection)
|
|
|
|
ui.bucketData.SetIndentation(0)
|
|
|
|
ui.bucketData.SetRootIsDecorated(false)
|
|
|
|
ui.bucketData.SetUniformRowHeights(true)
|
|
|
|
ui.bucketData.SetItemsExpandable(false)
|
|
|
|
|
2024-10-05 02:58:56 +00:00
|
|
|
ui.gridLayout_6.AddWidget3(ui.bucketData.QWidget, 0, 0, 1, 3)
|
2024-10-03 06:34:28 +00:00
|
|
|
|
|
|
|
ui.AddDataButton = qt.NewQPushButton4(ui.bucketDataTab)
|
|
|
|
ui.AddDataButton.SetObjectName("AddDataButton")
|
|
|
|
icon11 := qt.NewQIcon()
|
|
|
|
icon11.AddFile4(":/rsrc/add.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.AddDataButton.SetIcon(icon11)
|
|
|
|
|
|
|
|
ui.gridLayout_6.AddWidget2(ui.AddDataButton.QWidget, 1, 0)
|
|
|
|
/* miqt-uic: no handler for spacer */
|
|
|
|
|
|
|
|
ui.DeleteDataButton = qt.NewQPushButton4(ui.bucketDataTab)
|
|
|
|
ui.DeleteDataButton.SetObjectName("DeleteDataButton")
|
|
|
|
icon12 := qt.NewQIcon()
|
|
|
|
icon12.AddFile4(":/rsrc/delete.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.DeleteDataButton.SetIcon(icon12)
|
|
|
|
|
|
|
|
ui.gridLayout_6.AddWidget2(ui.DeleteDataButton.QWidget, 1, 1)
|
|
|
|
icon13 := qt.NewQIcon()
|
|
|
|
icon13.AddFile4(":/rsrc/table.png", qt.NewQSize(), qt.QIcon__Normal, qt.QIcon__Off)
|
|
|
|
ui.bucketTabWidget.AddTab2(ui.bucketDataTab, icon13, "")
|
|
|
|
|
|
|
|
ui.gridLayout_3.AddWidget2(ui.bucketTabWidget.QWidget, 0, 0)
|
|
|
|
ui.stackedWidget.AddWidget(ui.bucketPage)
|
|
|
|
ui.splitter.AddWidget(ui.stackedWidget.QWidget)
|
|
|
|
|
|
|
|
ui.gridLayout.AddWidget2(ui.splitter.QWidget, 0, 0)
|
|
|
|
ui.MainWindow.SetCentralWidget(ui.centralWidget) // Set central widget
|
|
|
|
|
|
|
|
ui.menuBar = qt.NewQMenuBar2(ui.MainWindow.QWidget)
|
|
|
|
ui.menuBar.SetObjectName("menuBar")
|
2024-10-05 02:58:56 +00:00
|
|
|
ui.menuBar.Resize(668, 29)
|
2024-10-03 06:34:28 +00:00
|
|
|
|
|
|
|
ui.menuFile = qt.NewQMenu3(ui.menuBar.QWidget)
|
|
|
|
ui.menuFile.SetObjectName("menuFile")
|
|
|
|
ui.menuFile.QWidget.AddAction(ui.actionNew_database)
|
|
|
|
ui.menuFile.QWidget.AddAction(ui.actionOpen_database)
|
|
|
|
ui.menuFile.QWidget.AddAction(ui.actionOpen_database_as_read_only)
|
|
|
|
ui.menuFile.AddSeparator()
|
|
|
|
ui.menuFile.QWidget.AddAction(ui.actionExit)
|
|
|
|
|
|
|
|
ui.menuHelp = qt.NewQMenu3(ui.menuBar.QWidget)
|
|
|
|
ui.menuHelp.SetObjectName("menuHelp")
|
|
|
|
ui.menuHelp.QWidget.AddAction(ui.actionAbout_qbolt)
|
|
|
|
ui.menuHelp.QWidget.AddAction(ui.actionAbout_Qt)
|
|
|
|
|
|
|
|
ui.menuView = qt.NewQMenu3(ui.menuBar.QWidget)
|
|
|
|
ui.menuView.SetObjectName("menuView")
|
|
|
|
ui.menuView.QWidget.AddAction(ui.actionClear_selection)
|
|
|
|
ui.menuBar.AddMenu(ui.menuFile)
|
|
|
|
ui.menuBar.AddMenu(ui.menuView)
|
|
|
|
ui.menuBar.AddMenu(ui.menuHelp)
|
|
|
|
ui.MainWindow.SetMenuBar(ui.menuBar)
|
|
|
|
|
|
|
|
ui.mainToolBar = qt.NewQToolBar4(ui.MainWindow.QWidget)
|
|
|
|
ui.mainToolBar.SetObjectName("mainToolBar")
|
|
|
|
ui.MainWindow.AddToolBar(qt.TopToolBarArea, ui.mainToolBar)
|
|
|
|
/* miqt-uic: no handler for mainToolBar attribute 'toolBarBreak' */
|
|
|
|
ui.mainToolBar.QWidget.AddAction(ui.actionNew_database)
|
|
|
|
ui.mainToolBar.QWidget.AddAction(ui.actionOpen_database)
|
|
|
|
ui.mainToolBar.AddSeparator()
|
|
|
|
|
|
|
|
ui.statusBar = qt.NewQStatusBar2(ui.MainWindow.QWidget)
|
|
|
|
ui.statusBar.SetObjectName("statusBar")
|
|
|
|
ui.MainWindow.SetStatusBar(ui.statusBar)
|
|
|
|
|
|
|
|
ui.Retranslate()
|
|
|
|
|
|
|
|
ui.stackedWidget.SetCurrentIndex(0)
|
|
|
|
ui.databaseTabWidget.SetCurrentIndex(0)
|
|
|
|
ui.bucketTabWidget.SetCurrentIndex(0)
|
|
|
|
|
|
|
|
return ui
|
|
|
|
}
|
|
|
|
|
|
|
|
// Retranslate reapplies all text translations.
|
|
|
|
func (ui *MainWindowUi) Retranslate() {
|
|
|
|
ui.actionAbout_qbolt.SetText(qt.QMainWindow_Tr("&About QBolt"))
|
|
|
|
ui.actionAbout_Qt.SetText(qt.QMainWindow_Tr("About &Qt"))
|
|
|
|
ui.actionOpen_database.SetText(qt.QMainWindow_Tr("&Open database..."))
|
|
|
|
ui.actionOpen_database.SetShortcut(qt.NewQKeySequence2(qt.QMainWindow_Tr("Ctrl+O")))
|
|
|
|
ui.actionExit.SetText(qt.QMainWindow_Tr("&Exit"))
|
|
|
|
ui.actionDisconnect.SetText(qt.QMainWindow_Tr("Disconnect"))
|
|
|
|
ui.actionDelete_bucket.SetText(qt.QMainWindow_Tr("Delete bucket"))
|
|
|
|
ui.actionRefresh_buckets.SetText(qt.QMainWindow_Tr("Refresh buckets"))
|
|
|
|
ui.actionClear_selection.SetText(qt.QMainWindow_Tr("&Clear selection"))
|
|
|
|
ui.actionNew_database.SetText(qt.QMainWindow_Tr("&New database..."))
|
|
|
|
ui.actionAdd_bucket.SetText(qt.QMainWindow_Tr("Add bucket..."))
|
|
|
|
ui.actionOpen_database_as_read_only.SetText(qt.QMainWindow_Tr("Open database as read-only..."))
|
|
|
|
ui.bucketTree.HeaderItem().SetText(0, qt.QTreeWidget_Tr("Bucket"))
|
|
|
|
ui.databaseTabWidget.SetTabText(ui.databaseTabWidget.IndexOf(ui.databasePropertiesTab), qt.QTabWidget_Tr("Database"))
|
|
|
|
ui.databasePropertiesArea.SetPlainText(qt.QWidget_Tr("No selection"))
|
|
|
|
ui.bucketTabWidget.SetTabText(ui.bucketTabWidget.IndexOf(ui.bucketPropertiesTab), qt.QTabWidget_Tr("Bucket"))
|
|
|
|
ui.bucketTabWidget.SetTabText(ui.bucketTabWidget.IndexOf(ui.bucketDataTab), qt.QTabWidget_Tr("Data"))
|
|
|
|
ui.bucketData.HeaderItem().SetText(0, qt.QTreeWidget_Tr("Key"))
|
|
|
|
ui.bucketData.HeaderItem().SetText(1, qt.QTreeWidget_Tr("Data length"))
|
|
|
|
ui.AddDataButton.SetText(qt.QWidget_Tr("Add..."))
|
|
|
|
ui.DeleteDataButton.SetText(qt.QWidget_Tr("Delete..."))
|
2024-10-05 02:58:56 +00:00
|
|
|
ui.menuFile.SetTitle(qt.QMenuBar_Tr("&File"))
|
2024-10-03 06:34:28 +00:00
|
|
|
ui.menuHelp.SetTitle(qt.QMenuBar_Tr("Help"))
|
|
|
|
ui.menuView.SetTitle(qt.QMenuBar_Tr("&View"))
|
|
|
|
}
|