public MyMainWindow(Qt.Widget parent = null) : base(parent, "mainwindow.ui") { //tableView = new TableView (this); var g = tableView.Geometry; var model = new StandardItemModel(this); model.ColumnCount = 5; model.RowCount = 10; model.SetItem(0, 0, new StandardItem("LINE:0_0")); model.SetItem(0, 1, new StandardItem("LINE_0_1")); model.SetItem(1, 0, new StandardItem("LINE_1_0")); model.SetItem(1, 1, new StandardItem("LINE_1_1")); model.SetItem(3, 0, new StandardItem("LINE_3_0")); model.SetItem(3, 1, new StandardItem("LINE_3_1")); tableView.Model = model; var index = model.Index(1, 1); tableView.Font = new Font("Ubuntu Condensed Regular", 30); // tableView.ColumnCount = 5; // tableView.RowCount = 5; // tableView.SetItem (0, 0, new TableWidgetItem ("LINE:0_0")); // tableView.SetItem (0, 1, new TableWidgetItem ("LINE_0_1")); // tableView.SetItem (1, 0, new TableWidgetItem ("LINE_1_0")); // tableView.SetItem (1, 1, new TableWidgetItem ("LINE_1_1")); tableView.ResizeRowsToContents(); tableView.SetColumnWidth(0, 350); tableView.ShowGrid(false); tableView.VerticalHeader.Visible = false; tableView.HorizontalHeader.Visible = false; tableView.SelectionBehavior = AbstractItemView.SelectionBehaviorEnum.SelectRows; tableView.SelectionMode = AbstractItemView.SelectionModeEnum.SingleSelection; tableView.SelectRow(1); // HeaderView verticalHeader = tableView.VerticalHeader; // verticalHeader.SetSectionResizeMode(HeaderView.ResizeMode.Fixed); // verticalHeader.DefaultSectionSize = 50; tableView.ResizeRowsToContents(); tableView.ScrollTo(1, 0); // var pixMap = Pixmap.FromResource ("example.audio-volume-medium.png", "PNG", Assembly.GetExecutingAssembly ()); // var pixMap1 = pixMap.Scale (128, 128); // var icon = Icon.FromPixmap(pixMap1); }
public SplashScreen(Qt.Widget parent = null) : base(parent, "./splashscreen.ui", (WindowType.WindowStaysOnTopHint | WindowType.SplashScreen)) { Geometry = Style.AlignedRect(LayoutDirection.LeftToRight, Alignment.AlignCenter, Size, Qt.Application.Desktop.Geometry); // if (string.IsNullOrEmpty(ObjectName)) // ObjectName = "Dialog"; // Resize(987, 146); // Font = new Font("Ubuntu Condensed", 30); // WindowOpacity = (0.9); // // verticalLayout_2 = new VBoxLayout(this); // verticalLayout_2.ObjectName = "verticalLayout_2"; // verticalLayout_2.SetContentsMargins(9, 9, 9, -1); // // frame = new Frame(this); // frame.ObjectName = "frame"; // frame.FrameShape = Frame.Shape.Box; // // verticalLayout = new VBoxLayout(frame); // verticalLayout.Spacing = (10); // verticalLayout.ObjectName = "verticalLayout"; // // label = new Label(frame); // label.ObjectName = "label"; // label.Text = "TextLabel"; // SizePolicy sizePolicy = new SizePolicy(Policy.Minimum, Policy.Minimum); // sizePolicy.HorizontalStretch = (0); // sizePolicy.VerticalStretch = (0); // label.SizePolicy = sizePolicy; // label.Alignment = Alignment.AlignCenter; // verticalLayout.AddWidget(label); // // progressBar = new ProgressBar(frame); // progressBar.ObjectName = "progressBar"; progressBar.Value = 50; // verticalLayout.AddWidget(progressBar); // // verticalLayout_2.AddWidget(frame); KeyPressEvent += SplashScreen_KeyPressEvent; // CloseEvent += SplashScreen_CloseEvent; }