Skip to content

Commit

Permalink
Merge pull request #29 from ugnelis/api-name-on-cornern
Browse files Browse the repository at this point in the history
Made that API name would appear in UI corner.
  • Loading branch information
ugnelis committed Jul 12, 2018
2 parents 844513a + 454c181 commit 934cd0a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 24 deletions.
Binary file modified screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions src/apis/microsoftapi.cpp
Expand Up @@ -69,8 +69,6 @@ QString MicrosoftAPI::translate(const QString &input,

QJsonArray replyJsonArray = replyJsonDocument.array();

qDebug() << replyJsonArray;

QJsonArray translationsJsonArray = replyJsonArray[0]
.toObject()["translations"]
.toArray();
Expand Down
3 changes: 3 additions & 0 deletions src/mainwindow.cpp
Expand Up @@ -60,6 +60,9 @@ void MainWindow::loadApi() {

currentApi = apis.at(apiIndex);

// Set the name of current API.
ui->currentApiLabel->setText(currentApiSettings->getFullName());

// Load supported languages in the combo boxes.
loadLanguagesInComboBoxes();
}
Expand Down
68 changes: 46 additions & 22 deletions src/mainwindow.ui
Expand Up @@ -15,28 +15,6 @@
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QComboBox" name="sourceLanguagesComboBox"/>
</item>
<item row="1" column="0">
<widget class="QPlainTextEdit" name="inputPlainTextEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="plainText">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QPlainTextEdit" name="outpuPlainTextEdit"/>
</item>
<item row="4" column="0">
<widget class="QComboBox" name="targetLanguagesComboBox"/>
</item>
<item row="2" column="0">
<widget class="QWidget" name="gridWidget" native="true">
<property name="enabled">
Expand Down Expand Up @@ -78,8 +56,54 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="sourceLanguagesComboBox"/>
</item>
<item row="1" column="0">
<widget class="QPlainTextEdit" name="inputPlainTextEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="plainText">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QPlainTextEdit" name="outpuPlainTextEdit"/>
</item>
<item row="4" column="0">
<widget class="QComboBox" name="targetLanguagesComboBox"/>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusBar">
<widget class="QLabel" name="currentApiLabel">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>200</width>
<height>15</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>15</height>
</size>
</property>
<property name="text">
<string>Default API</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
Expand Down

0 comments on commit 934cd0a

Please sign in to comment.