From: Michael Andreen Date: Wed, 19 Jun 2002 20:36:28 +0000 (+0000) Subject: some changes.. X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=commitdiff_plain;h=e0be1e6e8f7a246acf49e1f315c8d5bc5a65bfa3 some changes.. --- diff --git a/bs/bsconf.cpp b/bs/bsconf.cpp index 816fd09..ea32b7e 100644 --- a/bs/bsconf.cpp +++ b/bs/bsconf.cpp @@ -32,9 +32,10 @@ using namespace std; BSConf::BSConf() { QSettings settings; + //settings.insertSearchPath(QSettings::Unix); - m_sRaceFilename = settings.readEntry("/hbs/RaceFilename", "/usr/share/hbs/race.conf"); - m_sStatsFilename = settings.readEntry("/hbs/StatsFilename", "/usr/share/hbs/stats.conf"); + m_sRaceFilename = settings.readEntry("/hbs/ConfFiles/RaceFilename", "/usr/share/hbs/race.conf"); + m_sStatsFilename = settings.readEntry("/hbs/ConfFiles/StatsFilename", "/usr/share/hbs/stats.conf"); loadRace(); loadStats(); diff --git a/bs/bsdoc.h b/bs/bsdoc.h index bcfcfd0..4cd0ee6 100644 --- a/bs/bsdoc.h +++ b/bs/bsdoc.h @@ -76,6 +76,8 @@ class BSDoc : public QObject void removeFleet(QString battle, QString group, QString fleet); void runBattleSimulation(); + + void parseScan(); signals: void documentChanged(); diff --git a/bs/bsview.cpp b/bs/bsview.cpp index df3f558..9212fb1 100644 --- a/bs/bsview.cpp +++ b/bs/bsview.cpp @@ -85,7 +85,7 @@ BSView::BSView(QWidget *parent, BSDoc *doc) : QSplitter(parent) //the right side //m_TickView = new TickView(m_RightSplit); m_FleetViews = new QWidgetStack(m_RightSplit); - //m_ScanView = new ScanView(m_RightSplit); + m_ScanView = new ScanView(m_RightSplit); Fleet fl1; //fl1.setRace(tr("Terran").latin1()); @@ -107,6 +107,7 @@ BSView::BSView(QWidget *parent, BSDoc *doc) : QSplitter(parent) connect(m_NumberView, SIGNAL(selectionChanged(QListViewItem *)), SLOT(slotFleetSelection(QListViewItem *))); connect(m_FleetView, SIGNAL(fleetChanged(const Fleet*)), SLOT(slotFleetChanged(const Fleet*))); connect(m_GenericFleetView, SIGNAL(fleetChanged(const Fleet*)), SLOT(slotFleetChanged(const Fleet*))); + connect(m_ScanView, SIGNAL(scanUsed(int,QString, int)), SLOT(slotUseScan(int, QString, int))); } BSView::~BSView() @@ -439,3 +440,12 @@ void BSView::slotResultModeChanged( int i) m_iResultMode = i; } + +////////////////////////////////////////////////////////////////////////// +// +void BSView::slotUseScan(int action, QString text, int fleets) +{ + cerr << "Action: " << action << endl; + cerr << "Text: " << text.latin1() << endl; + cerr << "Fleets: " << fleets << endl; +} diff --git a/bs/bsview.h b/bs/bsview.h index 391a777..b87c1c6 100644 --- a/bs/bsview.h +++ b/bs/bsview.h @@ -61,6 +61,7 @@ class BSView : public QSplitter void slotInfoRemove(); void slotTickChanged(int min, int max); void slotResultModeChanged( int i); + void slotUseScan(int action, QString text, int fleets); protected: diff --git a/bs/planet.cpp b/bs/planet.cpp index fdeb789..c819323 100644 --- a/bs/planet.cpp +++ b/bs/planet.cpp @@ -134,7 +134,7 @@ void Planet::takeRoids(std::string type, int number, int tick) m_Roids[type][tick] -= number; if (type != "uninit") - addPlanetScore(-3000*number, tick); + addPlanetScore(-1000*number, tick); } diff --git a/bs/ui/bsappbase.ui b/bs/ui/bsappbase.ui index 1c0c88f..ed313f6 100644 --- a/bs/ui/bsappbase.ui +++ b/bs/ui/bsappbase.ui @@ -25,7 +25,7 @@ 0 0 700 - 24 + 23 @@ -95,7 +95,7 @@ - Survived unts + Survived units diff --git a/bs/ui/infoview.ui b/bs/ui/infoview.ui index a8ed7ac..2a22c68 100644 --- a/bs/ui/infoview.ui +++ b/bs/ui/infoview.ui @@ -10,8 +10,8 @@ 0 0 - 267 - 221 + 302 + 217 @@ -36,10 +36,10 @@ unnamed - 0 + 4 - 0 + 5 @@ -101,7 +101,7 @@ 0 - 0 + 5 @@ -330,5 +330,5 @@ stays() setStays( int ticks ) - + diff --git a/bs/ui/resourceview.ui b/bs/ui/resourceview.ui index e1faa98..7e2cb63 100644 --- a/bs/ui/resourceview.ui +++ b/bs/ui/resourceview.ui @@ -10,7 +10,7 @@ 0 0 - 549 + 545 110 @@ -39,10 +39,10 @@ unnamed - 11 + 4 - 6 + 5 @@ -194,5 +194,5 @@ setLines( QString type, float i ) - + diff --git a/bs/ui/roidseditview.ui b/bs/ui/roidseditview.ui index f77d5b5..124a69d 100644 --- a/bs/ui/roidseditview.ui +++ b/bs/ui/roidseditview.ui @@ -33,10 +33,10 @@ unnamed - 2 + 4 - 2 + 5 @@ -258,5 +258,5 @@ slotSetLost( QString type, float i ) - + diff --git a/bs/ui/scanviewbase.ui b/bs/ui/scanviewbase.ui index 66275ef..87f63d8 100644 --- a/bs/ui/scanviewbase.ui +++ b/bs/ui/scanviewbase.ui @@ -1,6 +1,5 @@ ScanViewBase - ScanViewBase @@ -9,24 +8,24 @@ 0 0 - 613 - 236 + 719 + 320 Form1 - + unnamed - 1 + 5 - 1 + 4 - + GroupBox1 @@ -38,14 +37,17 @@ unnamed - 11 + 5 - 6 + 4 - TextEdit1 + ScanEdit + + + PlainText @@ -58,19 +60,19 @@ Paste Type - + unnamed - 11 + 5 - 6 + 4 - + - RadioButton1 + NormalRadio overview/unit-/pdsscan @@ -79,23 +81,74 @@ true - + - RadioButton3 + MilitaryRadio Military scan - + - RadioButton3_2 + GalstatusRadio Galaxy status - + + + ReplaceButton + + + Replace + + + + + ReplaceAllButton + + + Replace all + + + + + Spacer1 + + + Vertical + + + Expanding + + + + + AddButton + + + Add + + + + + NewButton + + + New + + + + + NewInfoButton + + + New (use info) + + + @@ -112,14 +165,14 @@ unnamed - 11 + 5 - 6 + 4 - CheckBox4 + BaseCheck Base fleet @@ -127,7 +180,7 @@ - CheckBox1 + Fleet1Check Fleet 1 @@ -135,7 +188,7 @@ - CheckBox3 + Fleet2Check Fleet 2 @@ -143,7 +196,7 @@ - CheckBox2 + Fleet3Check Fleet 3 @@ -153,23 +206,80 @@ - + - - RadioButton3 + + MilitaryRadio toggled(bool) FleetGroup setEnabled(bool) - destroy() - init() + + AddButton + clicked() + ScanViewBase + slotButtonClicked() + + + NewButton + clicked() + ScanViewBase + slotButtonClicked() + + + NewInfoButton + clicked() + ScanViewBase + slotButtonClicked() + + + ReplaceAllButton + clicked() + ScanViewBase + slotButtonClicked() + + + ReplaceButton + clicked() + ScanViewBase + slotButtonClicked() + + + GalstatusRadio + toggled(bool) + AddButton + setDisabled(bool) + + + GalstatusRadio + toggled(bool) + NewInfoButton + setDisabled(bool) + + + GalstatusRadio + toggled(bool) + ReplaceButton + setDisabled(bool) + + + GalstatusRadio + toggled(bool) + ReplaceAllButton + setDisabled(bool) + - - { -} - { - -} - + + scanviewbase.ui.h + + + scanUsed(int, QString, int) + + + destroy() + init() + slotButtonClicked() + +