Mercurial > repos > IBBoard.WarFoundry.GUI.QtSharp
view Widgets/UnitWidget.cs @ 34:c3c64e139e5f default tip
Re #245: Create unit tab implementation
* Create layout for unit tab widget
* Start to populate values
WARNING: Qyoto/Qt# seems unstable now and segfaults when new units are added!
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 07 Aug 2010 16:02:53 +0000 |
parents | be876c03054f |
children |
line wrap: on
line source
// This file (UnitWidget.cs) is a part of the IBBoard.WarFoundry.GUI.QtSharp project and is copyright 2010 IBBoard // // // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; using Qyoto; using IBBoard.WarFoundry.API.Objects; namespace IBBoard.WarFoundry.GUI.QtSharp.Widgets { public class UnitWidget : QWidget { private Ui_UnitWidgetLayout layout; private Unit unit; public UnitWidget(Unit unit) { layout = new Ui_UnitWidgetLayout(); layout.SetupUi(this); this.unit = unit; PopulateValues(); } private void PopulateValues() { layout.unitName.SetText(unit.Name); layout.unitSize.SetValue(unit.Size); } } }