Mercurial > repos > IBBoard.WarFoundry.GUI.QtSharp
comparison MainWindow.cs @ 2:cf68a996b3f1
Re #242: Create Qt# UI for WarFoundry
* Add initial Tango icons until Qt4.6 becomes standard with QIcon.fromTheme() method to get native icons
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 23 Jan 2010 20:26:04 +0000 |
parents | 620c62ba4d07 |
children | ac1bf60edf63 |
comparison
equal
deleted
inserted
replaced
1:4ff09911ef64 | 2:cf68a996b3f1 |
---|---|
12 public MainWindow () | 12 public MainWindow () |
13 { | 13 { |
14 layout = new Ui_MainWindowLayout(); | 14 layout = new Ui_MainWindowLayout(); |
15 layout.SetupUi(this); | 15 layout.SetupUi(this); |
16 WindowIcon = new QIcon("icons/App.png"); | 16 WindowIcon = new QIcon("icons/App.png"); |
17 AddMenuActions(); | 17 SetUpActionIcons(); |
18 ConnectMenuActions(); | |
18 SetUpToolbar(); | 19 SetUpToolbar(); |
20 layout.unitTabs.Clear(); | |
19 } | 21 } |
20 | 22 |
21 private void AddMenuActions() | 23 private void SetUpActionIcons() |
22 { | 24 { |
23 layout.unitTabs.Clear(); | 25 layout.actionCreateArmy.icon = new QIcon("icons/ui/filenew.png"); |
26 layout.actionOpenArmy.icon = new QIcon("icons/ui/fileopen.png"); | |
27 layout.actionSaveArmy.icon = new QIcon("icons/ui/filesave.png"); | |
28 layout.actionSaveArmyAs.icon = new QIcon("icons/ui/filesaveas.png"); | |
29 layout.menuExportArmyAs.icon = new QIcon("icons/ui/export.png"); | |
30 layout.actionCloseArmy.icon = new QIcon("icons/ui/window-close.png"); | |
31 layout.actionExit.icon = new QIcon("icons/ui/exit.png"); | |
32 layout.actionUndo.icon = new QIcon("icons/ui/edit-undo.png"); | |
33 layout.actionRedo.icon = new QIcon("icons/ui/edit-redo.png"); | |
34 layout.actionAbout.icon = new QIcon("icons/ui/help-about.png"); | |
35 } | |
36 | |
37 private void ConnectMenuActions() | |
38 { | |
24 } | 39 } |
25 | 40 |
26 private void SetUpToolbar() | 41 private void SetUpToolbar() |
27 { | 42 { |
28 List<QAction> actions = new List<QAction>(){ | 43 List<QAction> actions = new List<QAction>(){ |