mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
Ref T592, frame around entry line in floating text message window
This commit is contained in:
committed by
Mat Sutcliffe
parent
eb5670abef
commit
ba33ebb1f5
@@ -64,12 +64,12 @@ namespace BlackGui
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->tw_TextMessages->setCurrentIndex(0);
|
||||
ui->lep_textMessages->setVisible(false);
|
||||
ui->fr_TextMessage->setVisible(false);
|
||||
ui->tvp_TextMessagesAll->setResizeMode(CTextMessageView::ResizingAuto);
|
||||
ui->comp_AtcStations->setWithIcons(false);
|
||||
|
||||
// lep_textMessages is the own line edit
|
||||
bool c = connect(ui->lep_textMessages, &CLineEditHistory::returnPressedUnemptyLine, this, &CTextMessageComponent::textMessageEntered, Qt::QueuedConnection);
|
||||
bool c = connect(ui->lep_TextMessages, &CLineEditHistory::returnPressedUnemptyLine, this, &CTextMessageComponent::textMessageEntered, Qt::QueuedConnection);
|
||||
Q_ASSERT_X(c, Q_FUNC_INFO, "Missing connect");
|
||||
c = connect(ui->gb_Settings, &QGroupBox::toggled, this, &CTextMessageComponent::onSettingsChecked, Qt::QueuedConnection);
|
||||
Q_ASSERT_X(c, Q_FUNC_INFO, "Missing connect");
|
||||
@@ -542,15 +542,15 @@ namespace BlackGui
|
||||
{
|
||||
// own input field if floating window
|
||||
Q_UNUSED(widget);
|
||||
ui->lep_textMessages->setVisible(topLevel);
|
||||
ui->fr_TextMessage->setVisible(topLevel);
|
||||
}
|
||||
|
||||
void CTextMessageComponent::textMessageEntered()
|
||||
{
|
||||
if (!ui->lep_textMessages->isVisible()) { return; }
|
||||
if (!ui->fr_TextMessage->isVisible() || !ui->lep_TextMessages->isVisible()) { return; }
|
||||
if (!this->isVisible()) { return; }
|
||||
|
||||
const QString cl(ui->lep_textMessages->getLastEnteredLineFormatted());
|
||||
const QString cl(ui->lep_TextMessages->getLastEnteredLineFormatted());
|
||||
if (!cl.isEmpty())
|
||||
{
|
||||
this->handleEnteredTextMessage(cl);
|
||||
@@ -754,13 +754,13 @@ namespace BlackGui
|
||||
|
||||
void CTextMessageComponent::showTextMessageEntry(bool show)
|
||||
{
|
||||
ui->lep_textMessages->setVisible(show);
|
||||
ui->fr_TextMessage->setVisible(show);
|
||||
}
|
||||
|
||||
void CTextMessageComponent::focusTextEntry()
|
||||
{
|
||||
if (!ui->lep_textMessages->isVisible()) { return; }
|
||||
ui->lep_textMessages->setFocus();
|
||||
if (!ui->lep_TextMessages->isVisible()) { return; }
|
||||
ui->lep_TextMessages->setFocus();
|
||||
}
|
||||
|
||||
void CTextMessageComponent::removeAllMessagesTab()
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
<ui version="4.0">
|
||||
<class>CTextMessageComponent</class>
|
||||
<widget class="QFrame" name="CTextMessageComponent">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>260</width>
|
||||
<height>297</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Text messages</string>
|
||||
</property>
|
||||
@@ -297,13 +289,25 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BlackGui::CLineEditHistory" name="lep_textMessages">
|
||||
<property name="toolTip">
|
||||
<string>command line (e.g. ".com1", ".x", ".msg com1")</string>
|
||||
<widget class="QFrame" name="fr_TextMessage">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>text message text goes here</string>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hl_TextMessage">
|
||||
<item>
|
||||
<widget class="BlackGui::CLineEditHistory" name="lep_TextMessages">
|
||||
<property name="toolTip">
|
||||
<string>command line (e.g. ".com1", ".x", ".msg com1")</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>text message text goes here</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -346,11 +350,12 @@
|
||||
<tabstops>
|
||||
<tabstop>tw_TextMessages</tabstop>
|
||||
<tabstop>tvp_TextMessagesAll</tabstop>
|
||||
<tabstop>gb_MessageTo</tabstop>
|
||||
<tabstop>gb_Settings</tabstop>
|
||||
<tabstop>lep_textMessages</tabstop>
|
||||
<tabstop>lep_TextMessages</tabstop>
|
||||
<tabstop>tep_TextMessagesUnicom</tabstop>
|
||||
<tabstop>tep_TextMessagesCOM1</tabstop>
|
||||
<tabstop>tep_TextMessagesCOM2</tabstop>
|
||||
<tabstop>tep_TextMessagesUnicom</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user