QTfrontend/team.h
author unc0rr
Wed, 26 Oct 2005 21:15:35 +0000
changeset 19 09de46a3328c
parent 18 d49c23eba8ba
permissions -rw-r--r--
Binds and various fixes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     1
/*
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     2
 * Hedgewars, a worms-like game
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     3
 * Copyright (c) 2005 Andrey Korotaev <unC0Rr@gmail.com>
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     4
 *
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     5
 * Distributed under the terms of the BSD-modified licence:
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     6
 *
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     7
 * Permission is hereby granted, free of charge, to any person obtaining a copy
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     8
 * of this software and associated documentation files (the "Software"), to deal
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
     9
 * with the Software without restriction, including without limitation the
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    10
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    11
 * sell copies of the Software, and to permit persons to whom the Software is
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    12
 * furnished to do so, subject to the following conditions:
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    13
 *
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    14
 * 1. Redistributions of source code must retain the above copyright notice,
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    15
 *    this list of conditions and the following disclaimer.
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    16
 * 2. Redistributions in binary form must reproduce the above copyright notice,
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    17
 *    this list of conditions and the following disclaimer in the documentation
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    18
 *    and/or other materials provided with the distribution.
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    19
 * 3. The name of the author may not be used to endorse or promote products
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    20
 *    derived from this software without specific prior written permission.
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    21
 *
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    22
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    23
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    24
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    25
 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    26
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    27
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    28
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    29
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    30
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    31
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    32
 */
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    33
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    34
#include <qstring.h>
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    35
#include <qfile.h>
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    36
#include <qtextstream.h>
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    37
#include <qcombobox.h>
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    38
#include "hw.h"
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    39
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    40
class QString;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    41
class QTextStream;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    42
class QFile;
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    43
class QComboBox;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    44
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    45
struct BindAction
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    46
{
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    47
	QComboBox * cbind;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    48
	char action[15];
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    49
	char strbind[15];
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    50
};
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    51
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    52
const BindAction cbinds[8] =
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    53
{
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    54
	{0, "+up", "up"},
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    55
	{0, "+left", "left"},
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    56
	{0, "+right", "right"},
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    57
	{0, "+down", "down"},
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    58
	{0, "ljump", "return"},
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    59
	{0, "hjump", "backspace"},
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    60
	{0, "+attack", "space"},
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    61
	{0, "switch", "tab"}
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    62
};
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    63
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    64
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    65
class HWTeam
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    66
{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    67
	public:
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    68
		HWTeam(HWForm * hwform)
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    69
		{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    70
			TeamName = "unnamed";
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    71
			for (int i = 0; i < 8; i++) HHName[i].sprintf("hedgehog %d", i);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    72
			Grave = "Simple";
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    73
			form = hwform;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    74
			memcpy(binds, cbinds, sizeof(cbinds));
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    75
			binds[0].cbind = form->CBindUp;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    76
			binds[1].cbind = form->CBindLeft;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    77
			binds[2].cbind = form->CBindRight;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    78
			binds[3].cbind = form->CBindDown;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    79
			binds[4].cbind = form->CBindLJump;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    80
			binds[5].cbind = form->CBindHJump;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    81
			binds[6].cbind = form->CBindAttack;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    82
			binds[7].cbind = form->CBindSwitch;
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    83
		}
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    84
		
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    85
		HWForm * form;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    86
		BindAction binds[8];
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    87
		QString TeamName;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    88
		QString HHName[8];
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    89
		QString	Grave;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    90
		QString Fort;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    91
		
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    92
		bool LoadFromFile(const QString & filename)
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    93
		{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    94
			QFile cfgfile(filename);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    95
			if (!cfgfile.open(IO_ReadOnly)) return false;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    96
			QTextStream stream(&cfgfile);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    97
			stream.setEncoding(QTextStream::Unicode);	
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
    98
			QString str;
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
    99
			QString action;
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   100
			
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   101
			while (!stream.atEnd())
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   102
			{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   103
				str = stream.readLine();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   104
				if (str.startsWith(";")) continue;
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   105
				if (str.startsWith("name team "))
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   106
				{
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   107
					str.remove(0, 10);
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   108
					TeamName = str;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   109
				} else
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   110
				if (str.startsWith("name hh"))
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   111
				{
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   112
					str.remove(0, 7);
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   113
					long i = str.left(1).toLong();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   114
					if ((i < 0) || (i > 7)) continue;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   115
					str.remove(0, 2);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   116
					HHName[i] = str;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   117
				} else
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   118
				if (str.startsWith("grave "))
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   119
				{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   120
					str.remove(0, 6);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   121
					Grave = str;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   122
				} else
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   123
				if (str.startsWith("fort "))
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   124
				{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   125
					str.remove(0, 5);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   126
					Fort = str;
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   127
				} else
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   128
				if (str.startsWith("bind "))
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   129
				{
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   130
					str.remove(0, 5);
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   131
					action = str.section(' ', 1);
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   132
					str = str.section(' ', 0, 0);
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   133
					str.truncate(15);
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   134
					for (int i = 0; i < 8; i++)
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   135
						if (action == binds[i].action)
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   136
						{
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   137
							strcpy((char *)&binds[i].strbind, str.latin1());
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   138
							break;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   139
						}
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   140
				}
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   141
			}
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   142
			cfgfile.close();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   143
			return true;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   144
		}
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   145
		
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   146
		bool SaveToFile(const QString & filename)
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   147
		{			
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   148
			QFile cfgfile(filename);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   149
			if (!cfgfile.open(IO_WriteOnly)) return false;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   150
			QTextStream stream(&cfgfile);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   151
			stream.setEncoding(QTextStream::Unicode);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   152
			stream << "; Generated by Hedgewars, do not modify" << endl;
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   153
			stream << "name team " << TeamName << endl;
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   154
			for (int i = 0; i < 8; i++)
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   155
				stream << "name hh" << i << " " << HHName[i] << endl;
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   156
			stream << "grave " << Grave << endl;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   157
			stream << "fort " << Fort << endl;
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   158
			for(int i = 0; i < 8; i++)
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   159
			{
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   160
				stream << "bind " << binds[i].strbind << " " << binds[i].action << endl;
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   161
			}
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   162
			cfgfile.close();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   163
			return true;
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   164
		}
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   165
		
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   166
		void ToPage()
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   167
		{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   168
			form->EditTeamName->setText(TeamName);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   169
			form->HHName0->setText(HHName[0]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   170
			form->HHName1->setText(HHName[1]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   171
			form->HHName2->setText(HHName[2]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   172
			form->HHName3->setText(HHName[3]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   173
			form->HHName4->setText(HHName[4]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   174
			form->HHName5->setText(HHName[5]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   175
			form->HHName6->setText(HHName[6]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   176
			form->HHName7->setText(HHName[7]);
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   177
			
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   178
			const QListBox * lb = form->CBGraves->listBox();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   179
			form->CBGraves->setCurrentItem(lb->index(lb->findItem(Grave)));
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   180
			
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   181
			lb = form->CBForts->listBox();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   182
			form->CBForts->setCurrentItem(lb->index(lb->findItem(Fort)));
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   183
			
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   184
			lb = form->CBindUp->listBox();
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   185
			for(int i = 0; i < 8; i++)
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   186
			{
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   187
				binds[i].cbind->setCurrentItem(lb->index(lb->findItem(binds[i].strbind)));
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   188
			}
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   189
		}
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   190
		
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   191
		void FromPage()
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   192
		{
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   193
			TeamName  = form->EditTeamName->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   194
			HHName[0] = form->HHName0->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   195
			HHName[1] = form->HHName1->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   196
			HHName[2] = form->HHName2->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   197
			HHName[3] = form->HHName3->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   198
			HHName[4] = form->HHName4->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   199
			HHName[5] = form->HHName5->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   200
			HHName[6] = form->HHName6->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   201
			HHName[7] = form->HHName7->text();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   202
			
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   203
			Grave = form->CBGraves->currentText();
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   204
			Fort = form->CBForts->currentText();
19
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   205
			for(int i = 0; i < 8; i++)
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   206
			{
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   207
				strcpy((char *)&binds[i].strbind,  binds[i].cbind->currentText().latin1());
09de46a3328c Binds and various fixes
unc0rr
parents: 18
diff changeset
   208
			}
18
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   209
		}
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   210
	private:
d49c23eba8ba Start to write QT frontend
unc0rr
parents:
diff changeset
   211
};