Mercurial > repos > IBBoard.WarFoundry.GUI.QtSharp
changeset 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 | 4ff09911ef64 |
children | ac1bf60edf63 |
files | IBBoard.WarFoundry.GUI.QtSharp.csproj MainWindow.cs icons/ui/edit-delete.png icons/ui/edit-redo.png icons/ui/edit-undo.png icons/ui/exit.png icons/ui/export.png icons/ui/filenew.png icons/ui/fileopen.png icons/ui/filesave.png icons/ui/filesaveas.png icons/ui/help-about.png icons/ui/window-close.png |
diffstat | 13 files changed, 52 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/IBBoard.WarFoundry.GUI.QtSharp.csproj Sat Jan 23 19:55:54 2010 +0000 +++ b/IBBoard.WarFoundry.GUI.QtSharp.csproj Sat Jan 23 20:26:04 2010 +0000 @@ -40,10 +40,44 @@ <ItemGroup> <None Include="compile-ui.sh" /> <None Include="qt-gui\MainWindowLayout.ui" /> + <None Include="icons\ui\filenew.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\fileopen.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\filesave.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\filesaveas.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\edit-delete.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\edit-redo.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\edit-undo.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\exit.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\export.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\window-close.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="icons\ui\help-about.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> </ItemGroup> <ItemGroup> <Folder Include="qt-gui\" /> <Folder Include="icons\" /> + <Folder Include="icons\ui\" /> </ItemGroup> <ItemGroup> <Content Include="icons\App.png">
--- a/MainWindow.cs Sat Jan 23 19:55:54 2010 +0000 +++ b/MainWindow.cs Sat Jan 23 20:26:04 2010 +0000 @@ -14,13 +14,28 @@ layout = new Ui_MainWindowLayout(); layout.SetupUi(this); WindowIcon = new QIcon("icons/App.png"); - AddMenuActions(); + SetUpActionIcons(); + ConnectMenuActions(); SetUpToolbar(); + layout.unitTabs.Clear(); } - private void AddMenuActions() + private void SetUpActionIcons() { - layout.unitTabs.Clear(); + layout.actionCreateArmy.icon = new QIcon("icons/ui/filenew.png"); + layout.actionOpenArmy.icon = new QIcon("icons/ui/fileopen.png"); + layout.actionSaveArmy.icon = new QIcon("icons/ui/filesave.png"); + layout.actionSaveArmyAs.icon = new QIcon("icons/ui/filesaveas.png"); + layout.menuExportArmyAs.icon = new QIcon("icons/ui/export.png"); + layout.actionCloseArmy.icon = new QIcon("icons/ui/window-close.png"); + layout.actionExit.icon = new QIcon("icons/ui/exit.png"); + layout.actionUndo.icon = new QIcon("icons/ui/edit-undo.png"); + layout.actionRedo.icon = new QIcon("icons/ui/edit-redo.png"); + layout.actionAbout.icon = new QIcon("icons/ui/help-about.png"); + } + + private void ConnectMenuActions() + { } private void SetUpToolbar()