mirror of https://github.com/procxx/kepka.git
Don't switch chats on ctrl+shift+send (support).
This commit is contained in:
parent
83919492d3
commit
be6e329e94
|
@ -4298,6 +4298,7 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
||||||
options.replyTo = message.replyTo;
|
options.replyTo = message.replyTo;
|
||||||
options.generateLocal = true;
|
options.generateLocal = true;
|
||||||
options.webPageId = message.webPageId;
|
options.webPageId = message.webPageId;
|
||||||
|
options.handleSupportSwitch = message.handleSupportSwitch;
|
||||||
sendAction(options);
|
sendAction(options);
|
||||||
|
|
||||||
if (!peer->canWrite()) {
|
if (!peer->canWrite()) {
|
||||||
|
|
|
@ -262,6 +262,7 @@ public:
|
||||||
WebPageId webPageId = 0;
|
WebPageId webPageId = 0;
|
||||||
bool clearDraft = false;
|
bool clearDraft = false;
|
||||||
bool generateLocal = true;
|
bool generateLocal = true;
|
||||||
|
bool handleSupportSwitch = false;
|
||||||
};
|
};
|
||||||
rpl::producer<SendOptions> sendActions() const {
|
rpl::producer<SendOptions> sendActions() const {
|
||||||
return _sendActions.events();
|
return _sendActions.events();
|
||||||
|
@ -318,6 +319,7 @@ public:
|
||||||
MsgId replyTo = 0;
|
MsgId replyTo = 0;
|
||||||
WebPageId webPageId = 0;
|
WebPageId webPageId = 0;
|
||||||
bool clearDraft = true;
|
bool clearDraft = true;
|
||||||
|
bool handleSupportSwitch = false;
|
||||||
};
|
};
|
||||||
void sendMessage(MessageToSend &&message);
|
void sendMessage(MessageToSend &&message);
|
||||||
void sendInlineResult(
|
void sendInlineResult(
|
||||||
|
|
|
@ -462,7 +462,10 @@ HistoryWidget::HistoryWidget(
|
||||||
connect(_botStart, SIGNAL(clicked()), this, SLOT(onBotStart()));
|
connect(_botStart, SIGNAL(clicked()), this, SLOT(onBotStart()));
|
||||||
connect(_joinChannel, SIGNAL(clicked()), this, SLOT(onJoinChannel()));
|
connect(_joinChannel, SIGNAL(clicked()), this, SLOT(onJoinChannel()));
|
||||||
connect(_muteUnmute, SIGNAL(clicked()), this, SLOT(onMuteUnmute()));
|
connect(_muteUnmute, SIGNAL(clicked()), this, SLOT(onMuteUnmute()));
|
||||||
connect(_field, &Ui::InputField::submitted, [=] { send(); });
|
connect(
|
||||||
|
_field,
|
||||||
|
&Ui::InputField::submitted,
|
||||||
|
[=](Qt::KeyboardModifiers modifiers) { send(modifiers); });
|
||||||
connect(_field, SIGNAL(cancelled()), this, SLOT(onCancel()));
|
connect(_field, SIGNAL(cancelled()), this, SLOT(onCancel()));
|
||||||
connect(_field, SIGNAL(tabbed()), this, SLOT(onFieldTabbed()));
|
connect(_field, SIGNAL(tabbed()), this, SLOT(onFieldTabbed()));
|
||||||
connect(_field, SIGNAL(resized()), this, SLOT(onFieldResize()));
|
connect(_field, SIGNAL(resized()), this, SLOT(onFieldResize()));
|
||||||
|
@ -761,7 +764,9 @@ HistoryWidget::HistoryWidget(
|
||||||
if (cancelReply(lastKeyboardUsed) && !options.clearDraft) {
|
if (cancelReply(lastKeyboardUsed) && !options.clearDraft) {
|
||||||
onCloudDraftSave();
|
onCloudDraftSave();
|
||||||
}
|
}
|
||||||
handleSupportSwitch(options.history);
|
if (options.handleSupportSwitch) {
|
||||||
|
handleSupportSwitch(options.history);
|
||||||
|
}
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
orderWidgets();
|
orderWidgets();
|
||||||
|
@ -796,16 +801,19 @@ void HistoryWidget::supportShareContact(Support::Contact contact) {
|
||||||
}
|
}
|
||||||
contact.comment = _field->getLastText();
|
contact.comment = _field->getLastText();
|
||||||
|
|
||||||
const auto submit = [=] {
|
const auto submit = [=](Qt::KeyboardModifiers modifiers) {
|
||||||
if (!_history) {
|
const auto history = _history;
|
||||||
|
if (!history) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
send();
|
send(Support::SkipSwitchModifiers());
|
||||||
|
auto options = ApiWrap::SendOptions(history);
|
||||||
|
options.handleSupportSwitch = Support::HandleSwitch(modifiers);
|
||||||
Auth().api().shareContact(
|
Auth().api().shareContact(
|
||||||
contact.phone,
|
contact.phone,
|
||||||
contact.firstName,
|
contact.firstName,
|
||||||
contact.lastName,
|
contact.lastName,
|
||||||
ApiWrap::SendOptions(_history));
|
options);
|
||||||
};
|
};
|
||||||
const auto box = Ui::show(Box<Support::ConfirmContactBox>(
|
const auto box = Ui::show(Box<Support::ConfirmContactBox>(
|
||||||
_history,
|
_history,
|
||||||
|
@ -3097,7 +3105,7 @@ void HistoryWidget::hideSelectorControlsAnimated() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::send() {
|
void HistoryWidget::send(Qt::KeyboardModifiers modifiers) {
|
||||||
if (!_history) return;
|
if (!_history) return;
|
||||||
|
|
||||||
if (_editMsgId) {
|
if (_editMsgId) {
|
||||||
|
@ -3105,16 +3113,17 @@ void HistoryWidget::send() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WebPageId webPageId = _previewCancelled
|
const auto webPageId = _previewCancelled
|
||||||
? CancelledWebPageId
|
? CancelledWebPageId
|
||||||
: ((_previewData && _previewData->pendingTill >= 0)
|
: ((_previewData && _previewData->pendingTill >= 0)
|
||||||
? _previewData->id
|
? _previewData->id
|
||||||
: 0);
|
: WebPageId(0));
|
||||||
|
|
||||||
auto message = ApiWrap::MessageToSend(_history);
|
auto message = ApiWrap::MessageToSend(_history);
|
||||||
message.textWithTags = _field->getTextWithAppliedMarkdown();
|
message.textWithTags = _field->getTextWithAppliedMarkdown();
|
||||||
message.replyTo = replyToId();
|
message.replyTo = replyToId();
|
||||||
message.webPageId = webPageId;
|
message.webPageId = webPageId;
|
||||||
|
message.handleSupportSwitch = Support::HandleSwitch(modifiers);
|
||||||
Auth().api().sendMessage(std::move(message));
|
Auth().api().sendMessage(std::move(message));
|
||||||
|
|
||||||
clearFieldText();
|
clearFieldText();
|
||||||
|
@ -5456,7 +5465,15 @@ void HistoryWidget::keyPressEvent(QKeyEvent *e) {
|
||||||
replyToPreviousMessage();
|
replyToPreviousMessage();
|
||||||
}
|
}
|
||||||
} else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
|
} else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
|
||||||
onListEnterPressed();
|
if (!_botStart->isHidden()) {
|
||||||
|
onBotStart();
|
||||||
|
}
|
||||||
|
if (!_canSendMessages) {
|
||||||
|
const auto submitting = Ui::InputField::ShouldSubmit(
|
||||||
|
Auth().settings().sendSubmitWay(),
|
||||||
|
e->modifiers());
|
||||||
|
send(e->modifiers());
|
||||||
|
}
|
||||||
} else if (e->key() == Qt::Key_O && e->modifiers() == Qt::ControlModifier) {
|
} else if (e->key() == Qt::Key_O && e->modifiers() == Qt::ControlModifier) {
|
||||||
chooseAttach();
|
chooseAttach();
|
||||||
} else {
|
} else {
|
||||||
|
@ -6438,12 +6455,6 @@ void HistoryWidget::onListEscapePressed() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::onListEnterPressed() {
|
|
||||||
if (!_botStart->isHidden()) {
|
|
||||||
onBotStart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void HistoryWidget::clearSelected() {
|
void HistoryWidget::clearSelected() {
|
||||||
if (_list) {
|
if (_list) {
|
||||||
_list->clearSelected();
|
_list->clearSelected();
|
||||||
|
|
|
@ -294,7 +294,6 @@ public:
|
||||||
void stopRecording(bool send);
|
void stopRecording(bool send);
|
||||||
|
|
||||||
void onListEscapePressed();
|
void onListEscapePressed();
|
||||||
void onListEnterPressed();
|
|
||||||
|
|
||||||
void sendBotCommand(PeerData *peer, UserData *bot, const QString &cmd, MsgId replyTo);
|
void sendBotCommand(PeerData *peer, UserData *bot, const QString &cmd, MsgId replyTo);
|
||||||
void hideSingleUseKeyboard(PeerData *peer, MsgId replyTo);
|
void hideSingleUseKeyboard(PeerData *peer, MsgId replyTo);
|
||||||
|
@ -439,7 +438,7 @@ private:
|
||||||
using TabbedSelector = ChatHelpers::TabbedSelector;
|
using TabbedSelector = ChatHelpers::TabbedSelector;
|
||||||
using DragState = Storage::MimeDataState;
|
using DragState = Storage::MimeDataState;
|
||||||
|
|
||||||
void send();
|
void send(Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers());
|
||||||
void handlePendingHistoryUpdate();
|
void handlePendingHistoryUpdate();
|
||||||
void fullPeerUpdated(PeerData *peer);
|
void fullPeerUpdated(PeerData *peer);
|
||||||
void toggleTabbedSelectorMode();
|
void toggleTabbedSelectorMode();
|
||||||
|
@ -450,7 +449,6 @@ private:
|
||||||
void showNextUnreadMention();
|
void showNextUnreadMention();
|
||||||
void handlePeerUpdate();
|
void handlePeerUpdate();
|
||||||
void setMembersShowAreaActive(bool active);
|
void setMembersShowAreaActive(bool active);
|
||||||
void forwardItems(MessageIdsList &&items);
|
|
||||||
void handleHistoryChange(not_null<const History*> history);
|
void handleHistoryChange(not_null<const History*> history);
|
||||||
void refreshAboutProxyPromotion();
|
void refreshAboutProxyPromotion();
|
||||||
void unreadCountUpdated();
|
void unreadCountUpdated();
|
||||||
|
|
|
@ -9,8 +9,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "ui/widgets/scroll_area.h"
|
#include "ui/widgets/scroll_area.h"
|
||||||
#include "ui/widgets/input_fields.h"
|
#include "ui/widgets/input_fields.h"
|
||||||
|
#include "ui/widgets/buttons.h"
|
||||||
#include "ui/wrap/padding_wrap.h"
|
#include "ui/wrap/padding_wrap.h"
|
||||||
#include "support/support_templates.h"
|
#include "support/support_templates.h"
|
||||||
|
#include "support/support_common.h"
|
||||||
#include "history/view/history_view_message.h"
|
#include "history/view/history_view_message.h"
|
||||||
#include "history/view/history_view_service_message.h"
|
#include "history/view/history_view_service_message.h"
|
||||||
#include "history/history_message.h"
|
#include "history/history_message.h"
|
||||||
|
@ -66,7 +68,7 @@ private:
|
||||||
int _selected = -1;
|
int _selected = -1;
|
||||||
int _pressed = -1;
|
int _pressed = -1;
|
||||||
bool _selectByKeys = false;
|
bool _selectByKeys = false;
|
||||||
rpl::event_stream<> _activated;
|
rpl::event_stream<Qt::KeyboardModifiers> _activated;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -252,7 +254,7 @@ void Inner::mousePressEvent(QMouseEvent *e) {
|
||||||
void Inner::mouseReleaseEvent(QMouseEvent *e) {
|
void Inner::mouseReleaseEvent(QMouseEvent *e) {
|
||||||
const auto pressed = base::take(_pressed);
|
const auto pressed = base::take(_pressed);
|
||||||
if (pressed == _selected && pressed >= 0) {
|
if (pressed == _selected && pressed >= 0) {
|
||||||
_activated.fire({});
|
_activated.fire(e->modifiers());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,9 +375,9 @@ void Autocomplete::setupContent() {
|
||||||
|
|
||||||
const auto inner = scroll->setOwnedWidget(object_ptr<Inner>(scroll));
|
const auto inner = scroll->setOwnedWidget(object_ptr<Inner>(scroll));
|
||||||
|
|
||||||
const auto submit = [=] {
|
const auto submit = [=](Qt::KeyboardModifiers modifiers) {
|
||||||
if (const auto question = inner->selected()) {
|
if (const auto question = inner->selected()) {
|
||||||
submitValue(question->value);
|
submitValue(question->value, modifiers);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -437,7 +439,9 @@ void Autocomplete::setupContent() {
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Autocomplete::submitValue(const QString &value) {
|
void Autocomplete::submitValue(
|
||||||
|
const QString &value,
|
||||||
|
Qt::KeyboardModifiers modifiers) {
|
||||||
const auto prefix = qstr("contact:");
|
const auto prefix = qstr("contact:");
|
||||||
if (value.startsWith(prefix)) {
|
if (value.startsWith(prefix)) {
|
||||||
const auto line = value.indexOf('\n');
|
const auto line = value.indexOf('\n');
|
||||||
|
@ -457,7 +461,8 @@ void Autocomplete::submitValue(const QString &value) {
|
||||||
text,
|
text,
|
||||||
phone,
|
phone,
|
||||||
firstName,
|
firstName,
|
||||||
lastName });
|
lastName,
|
||||||
|
HandleSwitch(modifiers) });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_insertRequests.fire_copy(value);
|
_insertRequests.fire_copy(value);
|
||||||
|
@ -468,7 +473,7 @@ ConfirmContactBox::ConfirmContactBox(
|
||||||
QWidget*,
|
QWidget*,
|
||||||
not_null<History*> history,
|
not_null<History*> history,
|
||||||
const Contact &data,
|
const Contact &data,
|
||||||
Fn<void()> submit)
|
Fn<void(Qt::KeyboardModifiers)> submit)
|
||||||
: _comment(GenerateCommentItem(this, history, data))
|
: _comment(GenerateCommentItem(this, history, data))
|
||||||
, _contact(GenerateContactItem(this, history, data))
|
, _contact(GenerateContactItem(this, history, data))
|
||||||
, _submit(submit) {
|
, _submit(submit) {
|
||||||
|
@ -499,16 +504,34 @@ void ConfirmContactBox::prepare() {
|
||||||
setDimensions(width, height);
|
setDimensions(width, height);
|
||||||
_contact->initDimensions();
|
_contact->initDimensions();
|
||||||
|
|
||||||
addButton(langFactory(lng_send_button), [=] {
|
_submit = [=, original = std::move(_submit)](Qt::KeyboardModifiers m) {
|
||||||
const auto weak = make_weak(this);
|
const auto weak = make_weak(this);
|
||||||
_submit();
|
original(m);
|
||||||
if (weak) {
|
if (weak) {
|
||||||
closeBox();
|
closeBox();
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
const auto button = addButton(langFactory(lng_send_button), [] {});
|
||||||
|
button->clicks(
|
||||||
|
) | rpl::start_with_next([=](Qt::MouseButton which) {
|
||||||
|
_submit((which == Qt::RightButton)
|
||||||
|
? SkipSwitchModifiers()
|
||||||
|
: button->clickModifiers());
|
||||||
|
}, button->lifetime());
|
||||||
|
button->setAcceptBoth(true);
|
||||||
|
|
||||||
addButton(langFactory(lng_cancel), [=] { closeBox(); });
|
addButton(langFactory(lng_cancel), [=] { closeBox(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConfirmContactBox::keyPressEvent(QKeyEvent *e) {
|
||||||
|
if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) {
|
||||||
|
_submit(e->modifiers());
|
||||||
|
} else {
|
||||||
|
BoxContent::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ConfirmContactBox::paintEvent(QPaintEvent *e) {
|
void ConfirmContactBox::paintEvent(QPaintEvent *e) {
|
||||||
Painter p(this);
|
Painter p(this);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct Contact {
|
||||||
QString phone;
|
QString phone;
|
||||||
QString firstName;
|
QString firstName;
|
||||||
QString lastName;
|
QString lastName;
|
||||||
|
bool handleSwitch = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Autocomplete : public Ui::RpWidget {
|
class Autocomplete : public Ui::RpWidget {
|
||||||
|
@ -44,7 +45,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupContent();
|
void setupContent();
|
||||||
void submitValue(const QString &value);
|
void submitValue(const QString &value, Qt::KeyboardModifiers modifiers);
|
||||||
|
|
||||||
not_null<AuthSession*> _session;
|
not_null<AuthSession*> _session;
|
||||||
Fn<void()> _activate;
|
Fn<void()> _activate;
|
||||||
|
@ -64,7 +65,7 @@ public:
|
||||||
QWidget*,
|
QWidget*,
|
||||||
not_null<History*> history,
|
not_null<History*> history,
|
||||||
const Contact &data,
|
const Contact &data,
|
||||||
Fn<void()> submit);
|
Fn<void(Qt::KeyboardModifiers)> submit);
|
||||||
|
|
||||||
using Element = HistoryView::Element;
|
using Element = HistoryView::Element;
|
||||||
HistoryView::Context elementContext() override;
|
HistoryView::Context elementContext() override;
|
||||||
|
@ -82,11 +83,12 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void prepare() override;
|
void prepare() override;
|
||||||
void paintEvent(QPaintEvent *e) override;
|
void paintEvent(QPaintEvent *e) override;
|
||||||
|
void keyPressEvent(QKeyEvent *e) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AdminLog::OwnedItem _comment;
|
AdminLog::OwnedItem _comment;
|
||||||
AdminLog::OwnedItem _contact;
|
AdminLog::OwnedItem _contact;
|
||||||
Fn<void()> _submit;
|
Fn<void(Qt::KeyboardModifiers)> _submit;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,16 @@ bool ValidateAccount(const MTPUser &self) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HandleSwitch(Qt::KeyboardModifiers modifiers) {
|
||||||
|
return !(modifiers & Qt::ShiftModifier)
|
||||||
|
|| (!(modifiers & Qt::ControlModifier)
|
||||||
|
&& !(modifiers & Qt::MetaModifier));
|
||||||
|
}
|
||||||
|
|
||||||
|
Qt::KeyboardModifiers SkipSwitchModifiers() {
|
||||||
|
return Qt::ControlModifier | Qt::ShiftModifier;
|
||||||
|
}
|
||||||
|
|
||||||
void PerformSwitch(SwitchSettings value) {
|
void PerformSwitch(SwitchSettings value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case SwitchSettings::Next:
|
case SwitchSettings::Next:
|
||||||
|
|
|
@ -17,6 +17,8 @@ enum class SwitchSettings {
|
||||||
Previous,
|
Previous,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Qt::KeyboardModifiers SkipSwitchModifiers();
|
||||||
|
bool HandleSwitch(Qt::KeyboardModifiers modifiers);
|
||||||
void PerformSwitch(SwitchSettings value);
|
void PerformSwitch(SwitchSettings value);
|
||||||
|
|
||||||
} // namespace Support
|
} // namespace Support
|
||||||
|
|
|
@ -2473,19 +2473,28 @@ not_null<const QTextEdit*> InputField::rawTextEdit() const {
|
||||||
return _inner.get();
|
return _inner.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool InputField::ShouldSubmit(
|
||||||
|
SubmitSettings settings,
|
||||||
|
Qt::KeyboardModifiers modifiers) {
|
||||||
|
const auto shift = modifiers.testFlag(Qt::ShiftModifier);
|
||||||
|
const auto ctrl = modifiers.testFlag(Qt::ControlModifier)
|
||||||
|
|| modifiers.testFlag(Qt::MetaModifier);
|
||||||
|
return (ctrl && shift)
|
||||||
|
|| (ctrl
|
||||||
|
&& settings != SubmitSettings::None
|
||||||
|
&& settings != SubmitSettings::Enter)
|
||||||
|
|| (!ctrl
|
||||||
|
&& !shift
|
||||||
|
&& settings != SubmitSettings::None
|
||||||
|
&& settings != SubmitSettings::CtrlEnter);
|
||||||
|
}
|
||||||
|
|
||||||
void InputField::keyPressEventInner(QKeyEvent *e) {
|
void InputField::keyPressEventInner(QKeyEvent *e) {
|
||||||
bool shift = e->modifiers().testFlag(Qt::ShiftModifier), alt = e->modifiers().testFlag(Qt::AltModifier);
|
bool shift = e->modifiers().testFlag(Qt::ShiftModifier), alt = e->modifiers().testFlag(Qt::AltModifier);
|
||||||
bool macmeta = (cPlatform() == dbipMac || cPlatform() == dbipMacOld) && e->modifiers().testFlag(Qt::ControlModifier) && !e->modifiers().testFlag(Qt::MetaModifier) && !e->modifiers().testFlag(Qt::AltModifier);
|
bool macmeta = (cPlatform() == dbipMac || cPlatform() == dbipMacOld) && e->modifiers().testFlag(Qt::ControlModifier) && !e->modifiers().testFlag(Qt::MetaModifier) && !e->modifiers().testFlag(Qt::AltModifier);
|
||||||
bool ctrl = e->modifiers().testFlag(Qt::ControlModifier) || e->modifiers().testFlag(Qt::MetaModifier);
|
bool ctrl = e->modifiers().testFlag(Qt::ControlModifier) || e->modifiers().testFlag(Qt::MetaModifier);
|
||||||
bool enterSubmit = (_mode == Mode::SingleLine)
|
bool enterSubmit = (_mode == Mode::SingleLine)
|
||||||
|| (ctrl && shift)
|
|| ShouldSubmit(_submitSettings, e->modifiers());
|
||||||
|| (ctrl
|
|
||||||
&& _submitSettings != SubmitSettings::None
|
|
||||||
&& _submitSettings != SubmitSettings::Enter)
|
|
||||||
|| (!ctrl
|
|
||||||
&& !shift
|
|
||||||
&& _submitSettings != SubmitSettings::None
|
|
||||||
&& _submitSettings != SubmitSettings::CtrlEnter);
|
|
||||||
bool enter = (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return);
|
bool enter = (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return);
|
||||||
if (e->key() == Qt::Key_Left
|
if (e->key() == Qt::Key_Left
|
||||||
|| e->key() == Qt::Key_Right
|
|| e->key() == Qt::Key_Right
|
||||||
|
|
|
@ -267,6 +267,9 @@ public:
|
||||||
|
|
||||||
using SubmitSettings = InputSubmitSettings;
|
using SubmitSettings = InputSubmitSettings;
|
||||||
void setSubmitSettings(SubmitSettings settings);
|
void setSubmitSettings(SubmitSettings settings);
|
||||||
|
static bool ShouldSubmit(
|
||||||
|
SubmitSettings settings,
|
||||||
|
Qt::KeyboardModifiers modifiers);
|
||||||
void customUpDown(bool isCustom);
|
void customUpDown(bool isCustom);
|
||||||
void customTab(bool isCustom);
|
void customTab(bool isCustom);
|
||||||
int borderAnimationStart() const;
|
int borderAnimationStart() const;
|
||||||
|
|
Loading…
Reference in New Issue