diff --git a/docs/RELEASES b/docs/RELEASES index 3d52bec..506a352 100644 --- a/docs/RELEASES +++ b/docs/RELEASES @@ -1,3 +1,15 @@ +0.9.6 - Fixes following for users of the German-language client. + + Fix KOS check bug for some corps where there are partial + matches on the corp name. + + Added the ability to set custom system graphics per theme. + This requires specially formatted SVGs with specific shape + group names. Documentation, plus some examples of how to + create them will be added in a release in the near + future. Opacity, scaling, and position attributes are + also customizable. + 0.9.5 - If the map is autoscrolling its focus to a system and you move it yourself, it will no longer fight you and jump back to focusing on the first system. @@ -375,14 +387,13 @@ Coming soon: - fix display of messages with backslashes. - better pilot cache/cleanup. - if at war, and going hisec, play a "bad idea" sound. -- theme customization for system images - TTS support - Maybe an option to auto-change region? -- Poll/repoll pilots option? -- Bubble icons? +- Bubble icons - Make mini militia faction count (RBL npc corps)? - Add some intelligence to handle dumb names like R3 Clear - Add option to autobuild jumpbridge list from dotlan instead of files. - Break follow transistion mode on screen reposition. - Don't cache every potential sound. - +- Add queue-play option to queue sounds. +- Reload internal list when rules updated. diff --git a/src/asyncinfo.cpp b/src/asyncinfo.cpp index f238371..df2168d 100755 --- a/src/asyncinfo.cpp +++ b/src/asyncinfo.cpp @@ -386,7 +386,10 @@ void AsyncInfo::gotKosCheckCorpReply() kosEntry.alliance.ticker = allianceObj["ticker"].toString(); if(kosEntry.corp.name.toLower() == checkNames.toLower()) + { found = true; + break; + } } if(found) diff --git a/src/imp.pro b/src/imp.pro index e0ed018..fdbd5ce 100644 --- a/src/imp.pro +++ b/src/imp.pro @@ -5,14 +5,14 @@ #------------------------------------------------- QT += core gui multimedia #opengl -QT += xml xmlpatterns svg +QT += xml xmlpatterns svg widgets -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +#greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = imp TEMPLATE = app -VERSION = 0.9.5 +VERSION = 0.9.6 QMAKE_TARGET_COMPANY = EternalDusk QMAKE_TARGET_DESCRIPTION = Eve Online Intelligence Management Program QMAKE_TARGET_COPYRIGHT = (c) Copyright 2016-2017 Jesse Litton diff --git a/src/main.cpp b/src/main.cpp index 66ee68f..f15dd5c 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,7 +46,7 @@ void messageHandler(QtMsgType, const QMessageLogContext &, const QString & msg) ts << txt << endl; } - std::cout << txt.toStdString() <mapView->setFocus(); - ui->mapView->gotSystemShapesFile(":/graphics/systems.svg"); +// ui->mapView->gotSystemShapesFile(":/graphics/systems.svg"); QApplication::setWindowIcon(QIcon(":/graphics/impicon.png")); options.setAudio(&audio); diff --git a/src/map.cpp b/src/map.cpp index b8ba545..a1a851f 100755 --- a/src/map.cpp +++ b/src/map.cpp @@ -359,9 +359,9 @@ QString Map::getSystemByAbbreviation(const QString& word) } // Still no match? Maybe they mispelled it, like people do with 9-F0B2 (9-fob) - if(upperWord.contains('-') && upperWord.contains('0')) + if(upperWord.contains('-') && upperWord.contains('O')) { - upperWord.replace('0', 'O'); + upperWord.replace('O', '0'); return getSystemByAbbreviation(upperWord); } diff --git a/src/meta.h b/src/meta.h index 6075152..58453f7 100644 --- a/src/meta.h +++ b/src/meta.h @@ -27,8 +27,8 @@ static const struct Version { Version(){} - QString release = "0.9.5"; //VERSION; - QString name = "Tom Sawyer Edition"; + QString release = "0.9.6"; //VERSION; + QString name = "Russian Cookie Monster"; QString styleHeader1 = ""; QString styleFooter1 = ""; diff --git a/src/parser.cpp b/src/parser.cpp index 79fb785..2a6f525 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -216,7 +216,7 @@ QList Parser::parseLine(const QString& line) // Is this a system message? - if (sender == "EVE System") + if (sender == "EVE System" or sender == "EVE-System") { MessageInfo messageInfo; messageInfo.originalLine = line; @@ -228,6 +228,7 @@ QList Parser::parseLine(const QString& line) // Test to see if this is a system change message: // EVE System > Channel changed to Local : JEIV-E // EVE-System > Chatkanal geändert zu Lokal: JEIV-E* + // EVE-System > Chatkanal geändert zu Lokal: O-Y5JQ QRegExp sysMsgRegExp("^Ch.*Lo[ck]al ?: (.*)\\*?$"); sysMsgRegExp.setMinimal(true); diff --git a/src/svgmapview.cpp b/src/svgmapview.cpp index fa60ca7..502e246 100755 --- a/src/svgmapview.cpp +++ b/src/svgmapview.cpp @@ -69,6 +69,8 @@ SvgMapView::SvgMapView(QWidget *parent) : QGraphicsView(parent) timeFont = QFont("Arial", 6); setStyleSheet("background-color: transparent;"); + + gotSystemShapesFile(":/graphics/systems.svg"); } SvgMapView::~SvgMapView() @@ -429,13 +431,22 @@ void SvgMapView::gotSystemShapesFile(QString shapesFile) qDebug() << "SvgMapView::gotSystemShapesFile(" << shapesFile << ") - systemRenderer = " << systemRenderer; - if(systemRenderer != NULL) + if(systemRenderer == NULL) + { + systemRenderer = new QSvgRenderer(shapesFile, this); + } + else + { + systemRenderer->load(shapesFile); + } + +/* if(systemRenderer != NULL) { systemRenderer->deleteLater(); systemRenderer = NULL; } - systemRenderer = new QSvgRenderer(shapesFile, this); + systemRenderer = new QSvgRenderer(shapesFile, this);*/ } void SvgMapView::handleShape(MapShape* shape, const QString& member, QVariant& data) @@ -631,6 +642,22 @@ void SvgMapView::receiveThemeUpdate(ThemeStorage& ts) setTimeFont(QFont(fontAttributes[0], fontAttributes[1].toInt())); } } + else if(ts.member == "graphic") + { + gotSystemShapesFile(ts.data.toString()); + } + else + { + foreach(SystemShape* shape, systemShapes) + { + handleShape(shape, ts.member, ts.data);; + } + foreach(MapShape* shape, systemOutlines) + { + handleShape(shape, ts.member, ts.data);; + } + + } break; } } diff --git a/src/theme.cpp b/src/theme.cpp index d2f5770..a96344f 100644 --- a/src/theme.cpp +++ b/src/theme.cpp @@ -58,6 +58,13 @@ const QMap defaults = { {"pilotYOffset", 0}, {"pilotZ", -0.5}, + {"systemGraphic", ":/graphics/systems.svg"}, + {"systemOpacity", 1.0}, + {"systemScale", 1.0}, + {"systemXOffset", 0.0}, + {"systemYOffset", 0.0}, + {"systemZ", 0}, + {"wormholeGraphic", ":/graphics/wormhole.svg"}, {"wormholeOpacity", 0.8}, {"wormholeScale", 0.05}, @@ -127,6 +134,15 @@ void Theme::load(const QString& name, ThemeType themeType) setAttribute("pilotYOffset", PILOT, "pilot", "yOffset", defaults["pilotYOffset"]); setAttribute("pilotZ", PILOT, "pilot", "z", defaults["pilotZ"]); + setAttribute("defaultNameFont", SYSTEM, "font", "name", defaults["defaultNameFont"] ); + setAttribute("defaultTimeFont", SYSTEM, "font", "time", defaults["defaultTimeFont"] ); + setAttribute("systemGraphic", SYSTEM, "system", "graphic", defaults["systemGraphic"]); + setAttribute("systemOpacity", SYSTEM, "system", "opacity", defaults["systemOpacity"]); + setAttribute("systemScale", SYSTEM, "system", "scale", defaults["systemScale"]); + setAttribute("systemXOffset", SYSTEM, "system", "xOffset", defaults["systemXOffset"]); + setAttribute("systemYOffset", SYSTEM, "system", "yOffset", defaults["systemYOffset"]); + setAttribute("systemZ", SYSTEM, "system", "z", defaults["systemZ"]); + setAttribute("wormholeGraphic", WORMHOLES, "wormhole", "graphic", defaults["wormholeGraphic"]); setAttribute("wormholeOpacity", WORMHOLES, "wormhole", "opacity", defaults["wormholeOpacity"]); setAttribute("wormholeScale", WORMHOLES, "wormhole", "scale", defaults["wormholeScale"]); @@ -134,9 +150,6 @@ void Theme::load(const QString& name, ThemeType themeType) setAttribute("wormholeYOffset", WORMHOLES, "wormhole", "yOffset", defaults["wormholeYOffset"]); setAttribute("wormholeZ", WORMHOLES, "wormhole", "z", defaults["wormholeZ"]); - setAttribute("defaultNameFont", SYSTEM, "font", "name", defaults["defaultNameFont"] ); - setAttribute("defaultTimeFont", SYSTEM, "font", "time", defaults["defaultTimeFont"] ); - if(m_name != "-Default-") { // Attempt to load theme... diff --git a/src/themecustomizer.cpp b/src/themecustomizer.cpp index 4a21122..34f0224 100644 --- a/src/themecustomizer.cpp +++ b/src/themecustomizer.cpp @@ -85,6 +85,14 @@ void ThemeCustomizer::loadValues(Theme *theme) ui->spinPilotY->setValue(theme->getAttribute("pilotYOffset").toDouble()); ui->spinPilotZ->setValue(theme->getAttribute("pilotZ").toDouble()); + // System attributes + ui->labelSystemFile->setText(theme->getAttribute("systemGraphic").toString()); + ui->spinSystemScale->setValue(theme->getAttribute("systemScale").toDouble()); + ui->spinSystemOpacity->setValue(theme->getAttribute("systemOpacity").toDouble()); + ui->spinSystemX->setValue(theme->getAttribute("systemXOffset").toDouble()); + ui->spinSystemY->setValue(theme->getAttribute("systemYOffset").toDouble()); + ui->spinSystemZ->setValue(theme->getAttribute("systemZ").toDouble()); + // Wormhole attributes ui->labelWormholeFile->setText(theme->getAttribute("wormholeGraphic").toString()); ui->spinWormholeScale->setValue(theme->getAttribute("wormholeScale").toDouble()); @@ -171,6 +179,21 @@ void ThemeCustomizer::on_buttonWormholeImage_clicked() } } +void ThemeCustomizer::on_buttonSystemImage_clicked() +{ + QString fileName = QFileDialog::getOpenFileName( + this, tr("Systems File"), + QString(), + tr("Systems Files (*.svg)") ); + + if(fileName.length() > 0) + { + ui->labelSystemFile->setText(fileName); + + m_theme->setAttribute("systemGraphic", SYSTEM, "system", "graphic", fileName); + } +} + void ThemeCustomizer::on_buttonLineColor_clicked() { @@ -346,3 +369,28 @@ void ThemeCustomizer::on_spinWormholeZ_valueChanged(double z) { m_theme->setAttribute("wormholeZ", WORMHOLES, "wormhole", "z", z); } + +void ThemeCustomizer::on_spinSystemScale_valueChanged(double scale) +{ + m_theme->setAttribute("systemScale", SYSTEM, "system", "scale", scale); +} + +void ThemeCustomizer::on_spinSystemOpacity_valueChanged(double opacity) +{ + m_theme->setAttribute("systemOpacity", SYSTEM, "system", "opacity", opacity); +} + +void ThemeCustomizer::on_spinSystemX_valueChanged(double x) +{ + m_theme->setAttribute("systemXOffset", SYSTEM, "system", "xOffset", x); +} + +void ThemeCustomizer::on_spinSystemY_valueChanged(double y) +{ + m_theme->setAttribute("systemYOffset", SYSTEM, "system", "yOffset", y); +} + +void ThemeCustomizer::on_spinSystemZ_valueChanged(double z) +{ + m_theme->setAttribute("systemZ", SYSTEM, "system", "z", z); +} diff --git a/src/themecustomizer.h b/src/themecustomizer.h index c08ab92..961359c 100644 --- a/src/themecustomizer.h +++ b/src/themecustomizer.h @@ -48,6 +48,8 @@ private slots: void on_buttonFindImage_clicked(); void on_buttonPilotImage_clicked(); void on_buttonLineColor_clicked(); + void on_buttonSystemImage_clicked(); + void on_buttonWormholeImage_clicked(); void on_spinBackScale_valueChanged(double scale); void on_spinBackOpacity_valueChanged(double opacity); void on_spinBackX_valueChanged(double backX); @@ -70,7 +72,11 @@ private slots: void on_spinPilotX_valueChanged(double x); void on_spinPilotY_valueChanged(double y); void on_spinPilotZ_valueChanged(double z); - void on_buttonWormholeImage_clicked(); + void on_spinSystemScale_valueChanged(double scale); + void on_spinSystemOpacity_valueChanged(double opacity); + void on_spinSystemX_valueChanged(double x); + void on_spinSystemY_valueChanged(double y); + void on_spinSystemZ_valueChanged(double z); void on_spinWormholeScale_valueChanged(double scale); void on_spinWormholeOpacity_valueChanged(double opacity); void on_spinWormholeX_valueChanged(double x); diff --git a/src/themecustomizer.ui b/src/themecustomizer.ui index 091af14..889db2d 100644 --- a/src/themecustomizer.ui +++ b/src/themecustomizer.ui @@ -40,6 +40,9 @@ + + true + 0 @@ -53,15 +56,15 @@ 5 - 4 + 6 0 0 - 375 - 230 + 374 + 244 @@ -380,8 +383,8 @@ 0 0 - 388 - 190 + 374 + 204 @@ -649,7 +652,7 @@ 0 0 388 - 207 + 164 @@ -779,7 +782,7 @@ 0 0 388 - 139 + 148 @@ -971,9 +974,9 @@ 0 - 0 - 388 - 190 + -40 + 374 + 204 @@ -1235,13 +1238,272 @@ + + + + 0 + -40 + 374 + 204 + + + + Systems + + + + + + + 0 + 0 + + + + SVG: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + ... + + + + + + + + 0 + 0 + + + + fileName + + + + + + + + + + 0 + 0 + + + + Scale: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + 0.010000000000000 + + + 100.000000000000000 + + + 1.000000000000000 + + + + + + + + 0 + 0 + + + + Opacity: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + 0.010000000000000 + + + 1.000000000000000 + + + 0.010000000000000 + + + 1.000000000000000 + + + + + + + + 0 + 0 + + + + X offset: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + -10000.000000000000000 + + + 10000.000000000000000 + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 142 + 20 + + + + + + + + + 0 + 0 + + + + Y offset: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + -10000.000000000000000 + + + 10000.000000000000000 + + + + + + + + 0 + 0 + + + + Z position: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + -100.000000000000000 + + + 100.000000000000000 + + + 1.000000000000000 + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 142 + 20 + + + + + + 0 - 0 - 388 - 207 + -40 + 374 + 204