mirror of https://github.com/procxx/kepka.git
merged inputfield, requesting channeldialogs
This commit is contained in:
commit
f1457186c7
|
@ -19,6 +19,7 @@ defaultFontFamily: 'Open Sans';
|
|||
semibold: 'Open Sans Semibold';
|
||||
|
||||
fsize: 13px;
|
||||
normalFont: font(fsize);
|
||||
|
||||
spriteFile: ':/gui/art/sprite.png' / 2:':/gui/art/sprite_125x.png' / 3:':/gui/art/sprite_150x.png' / 4:':/gui/art/sprite_200x.png';
|
||||
emojiImgSize: 18px; // exceptional value for retina
|
||||
|
@ -32,9 +33,9 @@ counterMacInvColor: #ffffff01;
|
|||
|
||||
lineWidth: 1px;
|
||||
|
||||
transparent: rgba(255, 255, 255, 0);
|
||||
white: rgba(255, 255, 255, 255);
|
||||
black: rgba(0, 0, 0, 255);
|
||||
transparent: #fff0;
|
||||
white: #fff;
|
||||
black: #000;
|
||||
|
||||
color1: #c03d33; // red
|
||||
color2: #4fad2d; // green
|
||||
|
@ -50,13 +51,46 @@ wideModeWidth: 640px;
|
|||
wndMinHeight: 480px;
|
||||
wndDefWidth: 800px;
|
||||
wndDefHeight: 600px;
|
||||
wndBG: #FFF;
|
||||
wndBG: white;
|
||||
wndShadow: sprite(209px, 46px, 19px, 19px);
|
||||
wndShadowShift: 1px;
|
||||
|
||||
layerAlpha: 0.5;
|
||||
layerBG: #000;
|
||||
layerBG: black;
|
||||
|
||||
defaultInputField: InputField {
|
||||
textFg: black;
|
||||
textMargins: margins(5px, 5px, 5px, 5px);
|
||||
textAlign: align(left);
|
||||
|
||||
placeholderFg: #999;
|
||||
placeholderFgActive: #aaa;
|
||||
placeholderMargins: margins(2px, 0px, 2px, 0px);
|
||||
placeholderAlign: align(topleft);
|
||||
placeholderShift: 50px;
|
||||
duration: 100;
|
||||
|
||||
borderFg: #e0e0e0;
|
||||
borderFgActive: #62c0f7;
|
||||
borderFgError: #e48383;
|
||||
|
||||
border: 1px;
|
||||
borderActive: 2px;
|
||||
borderError: 2px;
|
||||
|
||||
font: normalFont;
|
||||
|
||||
height: 32px;
|
||||
}
|
||||
dialogsSearchField: InputField(defaultInputField) {
|
||||
textMargins: margins(34px, 7px, 34px, 7px);
|
||||
|
||||
iconSprite: sprite(227px, 21px, 24px, 24px);
|
||||
iconPosition: point(6px, 5px);
|
||||
|
||||
width: 240px;
|
||||
height: 34px;
|
||||
}
|
||||
titleBG: #6389a8;
|
||||
titleColor: #0f8dcc;//rgb(20, 136, 210);
|
||||
titleHeight: 39px;
|
||||
|
@ -200,7 +234,7 @@ btnDefBack: flatButton(btnDefFlat) {
|
|||
}
|
||||
|
||||
linkCropLimit: 360px;
|
||||
linkFont: font(fsize);
|
||||
linkFont: normalFont;
|
||||
linkOverFont: font(fsize underline);
|
||||
btnDefLink: linkButton {
|
||||
color: btnYesColor;
|
||||
|
|
|
@ -267,3 +267,33 @@ botKeyboardButton {
|
|||
textTop: number;
|
||||
downTextTop: number;
|
||||
}
|
||||
|
||||
InputField {
|
||||
textFg: color;
|
||||
textMargins: margins;
|
||||
textAlign: align;
|
||||
|
||||
placeholderFg: color;
|
||||
placeholderFgActive: color;
|
||||
placeholderMargins: margins;
|
||||
placeholderAlign: align;
|
||||
placeholderShift: number;
|
||||
|
||||
duration: number;
|
||||
|
||||
borderFg: color;
|
||||
borderFgActive: color;
|
||||
borderFgError: color;
|
||||
|
||||
border: number;
|
||||
borderActive: number;
|
||||
borderError: number;
|
||||
|
||||
font: font;
|
||||
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
iconSprite: sprite;
|
||||
iconPosition: point;
|
||||
}
|
||||
|
|
|
@ -1525,7 +1525,7 @@ void DialogsWidget::dlgUpdated(History *row) {
|
|||
}
|
||||
|
||||
void DialogsWidget::dialogsToUp() {
|
||||
if (_filter.text().trimmed().isEmpty()) {
|
||||
if (_filter.getLastText().trimmed().isEmpty()) {
|
||||
scroll.scrollToY(0);
|
||||
}
|
||||
}
|
||||
|
@ -1597,8 +1597,9 @@ void DialogsWidget::unreadCountsReceived(const QVector<MTPDialog> &dialogs) {
|
|||
if (App::wnd()) App::wnd()->updateCounter();
|
||||
}
|
||||
|
||||
void DialogsWidget::dialogsReceived(const MTPmessages_Dialogs &dialogs) {
|
||||
void DialogsWidget::dialogsReceived(const MTPmessages_Dialogs &dialogs, mtpRequestId req) {
|
||||
const QVector<MTPDialog> *dlgList = 0;
|
||||
int32 count = 0;
|
||||
switch (dialogs.type()) {
|
||||
case mtpc_messages_dialogs: {
|
||||
const MTPDmessages_dialogs &data(dialogs.c_messages_dialogs());
|
||||
|
@ -1606,7 +1607,7 @@ void DialogsWidget::dialogsReceived(const MTPmessages_Dialogs &dialogs) {
|
|||
App::feedChats(data.vchats);
|
||||
App::feedMsgs(data.vmessages);
|
||||
dlgList = &data.vdialogs.c_vector().v;
|
||||
_dialogsCount = dlgList->size();
|
||||
count = dlgList->size();
|
||||
} break;
|
||||
case mtpc_messages_dialogsSlice: {
|
||||
const MTPDmessages_dialogsSlice &data(dialogs.c_messages_dialogsSlice());
|
||||
|
@ -1614,7 +1615,7 @@ void DialogsWidget::dialogsReceived(const MTPmessages_Dialogs &dialogs) {
|
|||
App::feedChats(data.vchats);
|
||||
App::feedMsgs(data.vmessages);
|
||||
dlgList = &data.vdialogs.c_vector().v;
|
||||
_dialogsCount = data.vcount.v;
|
||||
count = data.vcount.v;
|
||||
} break;
|
||||
}
|
||||
|
||||
|
@ -1624,35 +1625,58 @@ void DialogsWidget::dialogsReceived(const MTPmessages_Dialogs &dialogs) {
|
|||
_contactsRequest = MTP::send(MTPcontacts_GetContacts(MTP_string("")), rpcDone(&DialogsWidget::contactsReceived), rpcFail(&DialogsWidget::contactsFailed));
|
||||
}
|
||||
|
||||
if (dlgList) {
|
||||
list.dialogsReceived(*dlgList);
|
||||
onListScroll();
|
||||
if (_dialogsRequest == req) {
|
||||
_dialogsCount = count;
|
||||
if (dlgList) {
|
||||
list.dialogsReceived(*dlgList);
|
||||
onListScroll();
|
||||
|
||||
if (dlgList->size()) {
|
||||
_dialogsOffset += dlgList->size();
|
||||
if (dlgList->size()) {
|
||||
_dialogsOffset += dlgList->size();
|
||||
} else {
|
||||
_dialogsCount = _dialogsOffset;
|
||||
}
|
||||
} else {
|
||||
_dialogsCount = _dialogsOffset;
|
||||
}
|
||||
} else {
|
||||
_dialogsCount = _dialogsOffset;
|
||||
}
|
||||
|
||||
_dialogsRequest = 0;
|
||||
if (dlgList) {
|
||||
loadDialogs();
|
||||
_dialogsRequest = 0;
|
||||
if (dlgList) {
|
||||
loadDialogs();
|
||||
}
|
||||
} else if (_channelDialogsRequest == req) {
|
||||
//_channelDialogsCount = count;
|
||||
if (dlgList) {
|
||||
list.dialogsReceived(*dlgList);
|
||||
onListScroll();
|
||||
|
||||
// if (dlgList->size()) {
|
||||
// _channelDialogsOffset += dlgList->size();
|
||||
// } else {
|
||||
// _channelDialogsCount = _channelDialogsOffset;
|
||||
// }
|
||||
//} else {
|
||||
// _channelDialogsCount = _channelDialogsOffset;
|
||||
}
|
||||
|
||||
//_channelDialogsRequest = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool DialogsWidget::dialogsFailed(const RPCError &error) {
|
||||
bool DialogsWidget::dialogsFailed(const RPCError &error, mtpRequestId req) {
|
||||
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
|
||||
|
||||
LOG(("RPC Error: %1 %2: %3").arg(error.code()).arg(error.type()).arg(error.description()));
|
||||
_dialogsRequest = 0;
|
||||
if (_dialogsRequest == req) {
|
||||
_dialogsRequest = 0;
|
||||
} else if (_channelDialogsRequest == req) {
|
||||
_channelDialogsRequest = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DialogsWidget::onSearchMessages(bool searchCache) {
|
||||
QString q = _filter.text().trimmed();
|
||||
QString q = _filter.getLastText().trimmed();
|
||||
if (q.isEmpty()) {
|
||||
if (_searchRequest) {
|
||||
_searchRequest = 0;
|
||||
|
@ -1707,7 +1731,7 @@ void DialogsWidget::onChooseByDrag() {
|
|||
}
|
||||
|
||||
void DialogsWidget::searchMessages(const QString &query) {
|
||||
if (_filter.text() != query) {
|
||||
if (_filter.getLastText() != query) {
|
||||
_filter.setText(query);
|
||||
_filter.updatePlaceholder();
|
||||
onFilterUpdate();
|
||||
|
@ -1736,7 +1760,10 @@ void DialogsWidget::loadDialogs() {
|
|||
}
|
||||
|
||||
int32 loadCount = _dialogsOffset ? DialogsPerPage : DialogsFirstLoad;
|
||||
_dialogsRequest = MTP::send(MTPmessages_GetDialogs(MTP_int(_dialogsOffset), MTP_int(loadCount)), rpcDone(&DialogsWidget::dialogsReceived), rpcFail(&DialogsWidget::dialogsFailed));
|
||||
_dialogsRequest = MTP::send(MTPmessages_GetDialogs(MTP_int(_dialogsOffset), MTP_int(loadCount)), rpcDone(&DialogsWidget::dialogsReceived), rpcFail(&DialogsWidget::dialogsFailed), _channelDialogsRequest ? 0 : 5);
|
||||
if (!_channelDialogsRequest) {
|
||||
_channelDialogsRequest = MTP::send(MTPmessages_GetChannelDialogs(MTP_int(0), MTP_int(DialogsPerPage)), rpcDone(&DialogsWidget::dialogsReceived), rpcFail(&DialogsWidget::dialogsFailed));
|
||||
}
|
||||
}
|
||||
|
||||
void DialogsWidget::contactsReceived(const MTPcontacts_Contacts &contacts) {
|
||||
|
@ -1932,7 +1959,7 @@ void DialogsWidget::onListScroll() {
|
|||
void DialogsWidget::onFilterUpdate(bool force) {
|
||||
if (animating() && !force) return;
|
||||
|
||||
QString filterText = _filter.text();
|
||||
QString filterText = _filter.getLastText();
|
||||
list.onFilterUpdate(filterText);
|
||||
if (filterText.isEmpty()) {
|
||||
_searchCache.clear();
|
||||
|
@ -1956,12 +1983,12 @@ void DialogsWidget::searchInPeer(PeerData *peer) {
|
|||
_searchInPeer = peer;
|
||||
list.searchInPeer(peer);
|
||||
onFilterUpdate(true);
|
||||
list.onFilterUpdate(_filter.text(), true);
|
||||
list.onFilterUpdate(_filter.getLastText(), true);
|
||||
}
|
||||
|
||||
void DialogsWidget::onFilterCursorMoved(int from, int to) {
|
||||
if (to < 0) to = _filter.cursorPosition();
|
||||
QString t = _filter.text();
|
||||
QString t = _filter.getLastText();
|
||||
QStringRef r;
|
||||
for (int start = to; start > 0;) {
|
||||
--start;
|
||||
|
@ -1976,7 +2003,7 @@ void DialogsWidget::onFilterCursorMoved(int from, int to) {
|
|||
}
|
||||
|
||||
void DialogsWidget::onCompleteHashtag(QString tag) {
|
||||
QString t = _filter.text(), r;
|
||||
QString t = _filter.getLastText(), r;
|
||||
int cur = _filter.cursorPosition();
|
||||
for (int start = cur; start > 0;) {
|
||||
--start;
|
||||
|
@ -2116,7 +2143,7 @@ void DialogsWidget::onNewGroup() {
|
|||
}
|
||||
|
||||
bool DialogsWidget::onCancelSearch() {
|
||||
bool clearing = !_filter.text().isEmpty();
|
||||
bool clearing = !_filter.getLastText().isEmpty();
|
||||
if (_searchInPeer && !clearing) {
|
||||
if (!cWideMode()) {
|
||||
App::main()->showPeerHistory(_searchInPeer->id, ShowAtUnreadMsgId);
|
||||
|
|
|
@ -175,7 +175,7 @@ class DialogsWidget : public QWidget, public Animated, public RPCSender {
|
|||
public:
|
||||
DialogsWidget(MainWidget *parent);
|
||||
|
||||
void dialogsReceived(const MTPmessages_Dialogs &dialogs);
|
||||
void dialogsReceived(const MTPmessages_Dialogs &dialogs, mtpRequestId req);
|
||||
void contactsReceived(const MTPcontacts_Contacts &contacts);
|
||||
void searchReceived(bool fromStart, const MTPmessages_Messages &result, mtpRequestId req);
|
||||
void peopleReceived(const MTPcontacts_Found &result, mtpRequestId req);
|
||||
|
@ -255,7 +255,7 @@ private:
|
|||
QTimer _chooseByDragTimer;
|
||||
|
||||
void unreadCountsReceived(const QVector<MTPDialog> &dialogs);
|
||||
bool dialogsFailed(const RPCError &error);
|
||||
bool dialogsFailed(const RPCError &error, mtpRequestId req);
|
||||
bool contactsFailed(const RPCError &error);
|
||||
bool searchFailed(const RPCError &error, mtpRequestId req);
|
||||
bool peopleFailed(const RPCError &error, mtpRequestId req);
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop version of Telegram messaging app, see https://telegram.org
|
||||
|
||||
Telegram Desktop is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
It is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||
Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#include "stdafx.h"
|
||||
#include "style.h"
|
||||
|
||||
#include "gui/countrycodeinput.h"
|
||||
#include "gui/countryinput.h"
|
||||
|
||||
CountryCodeInput::CountryCodeInput(QWidget *parent, const style::flatInput &st) : FlatInput(parent, st), _nosignal(false) {
|
||||
|
||||
}
|
||||
|
||||
void CountryCodeInput::startErasing(QKeyEvent *e) {
|
||||
setFocus();
|
||||
keyPressEvent(e);
|
||||
}
|
||||
|
||||
void CountryCodeInput::codeSelected(const QString &code) {
|
||||
QString old(text());
|
||||
setText('+' + code);
|
||||
_nosignal = true;
|
||||
correctValue(0, old);
|
||||
_nosignal = false;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
void CountryCodeInput::correctValue(QKeyEvent *e, const QString &was) {
|
||||
QString oldText(text()), newText, addToNumber;
|
||||
int oldPos(cursorPosition()), newPos(-1), oldLen(oldText.length()), start = 0, digits = 5;
|
||||
newText.reserve(oldLen + 1);
|
||||
newText += '+';
|
||||
if (oldLen && oldText[0] == '+') {
|
||||
++start;
|
||||
}
|
||||
for (int i = start; i < oldLen; ++i) {
|
||||
QChar ch(oldText[i]);
|
||||
if (ch.isDigit()) {
|
||||
if (!digits || !--digits) {
|
||||
addToNumber += ch;
|
||||
} else {
|
||||
newText += ch;
|
||||
}
|
||||
}
|
||||
if (i == oldPos) {
|
||||
newPos = newText.length();
|
||||
}
|
||||
}
|
||||
if (!addToNumber.isEmpty()) {
|
||||
QString validCode = findValidCode(newText.mid(1));
|
||||
addToNumber = newText.mid(1 + validCode.length()) + addToNumber;
|
||||
newText = '+' + validCode;
|
||||
}
|
||||
if (newPos < 0 || newPos > newText.length()) {
|
||||
newPos = newText.length();
|
||||
}
|
||||
if (newText != oldText) {
|
||||
setText(newText);
|
||||
if (newPos != oldPos) {
|
||||
setCursorPosition(newPos);
|
||||
}
|
||||
}
|
||||
if (!_nosignal && was != newText) {
|
||||
emit codeChanged(newText.mid(1));
|
||||
}
|
||||
if (!addToNumber.isEmpty()) {
|
||||
emit addedToNumber(addToNumber);
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop version of Telegram messaging app, see https://telegram.org
|
||||
|
||||
Telegram Desktop is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
It is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||
Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "gui/flatinput.h"
|
||||
|
||||
class CountryCodeInput : public FlatInput {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
CountryCodeInput(QWidget *parent, const style::flatInput &st);
|
||||
|
||||
public slots:
|
||||
|
||||
void startErasing(QKeyEvent *e);
|
||||
void codeSelected(const QString &code);
|
||||
|
||||
signals:
|
||||
|
||||
void codeChanged(const QString &code);
|
||||
void addedToNumber(const QString &added);
|
||||
|
||||
protected:
|
||||
|
||||
void correctValue(QKeyEvent *e, const QString &was);
|
||||
|
||||
private:
|
||||
|
||||
bool _nosignal;
|
||||
|
||||
};
|
|
@ -20,11 +20,13 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
|||
|
||||
#include "flatinput.h"
|
||||
#include "window.h"
|
||||
#include "countryinput.h"
|
||||
|
||||
namespace {
|
||||
class FlatInputStyle : public QCommonStyle {
|
||||
template <typename InputClass>
|
||||
class InputStyle : public QCommonStyle {
|
||||
public:
|
||||
FlatInputStyle() {
|
||||
InputStyle() {
|
||||
}
|
||||
|
||||
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const {
|
||||
|
@ -32,14 +34,14 @@ namespace {
|
|||
QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const {
|
||||
switch (r) {
|
||||
case SE_LineEditContents:
|
||||
const FlatInput *w = widget ? qobject_cast<const FlatInput*>(widget) : 0;
|
||||
const InputClass *w = widget ? qobject_cast<const InputClass*>(widget) : 0;
|
||||
return w ? w->getTextRect() : QCommonStyle::subElementRect(r, opt, widget);
|
||||
break;
|
||||
}
|
||||
return QCommonStyle::subElementRect(r, opt, widget);
|
||||
}
|
||||
};
|
||||
FlatInputStyle _flatInputStyle;
|
||||
InputStyle<FlatInput> _flatInputStyle;
|
||||
}
|
||||
|
||||
FlatInput::FlatInput(QWidget *parent, const style::flatInput &st, const QString &pholder, const QString &v) : QLineEdit(v, parent),
|
||||
|
@ -319,3 +321,711 @@ void FlatInput::notaBene() {
|
|||
a_borderColor.start(_st.borderError->c);
|
||||
anim::start(this);
|
||||
}
|
||||
|
||||
CountryCodeInput::CountryCodeInput(QWidget *parent, const style::flatInput &st) : FlatInput(parent, st), _nosignal(false) {
|
||||
|
||||
}
|
||||
|
||||
void CountryCodeInput::startErasing(QKeyEvent *e) {
|
||||
setFocus();
|
||||
keyPressEvent(e);
|
||||
}
|
||||
|
||||
void CountryCodeInput::codeSelected(const QString &code) {
|
||||
QString old(text());
|
||||
setText('+' + code);
|
||||
_nosignal = true;
|
||||
correctValue(0, old);
|
||||
_nosignal = false;
|
||||
emit changed();
|
||||
}
|
||||
|
||||
void CountryCodeInput::correctValue(QKeyEvent *e, const QString &was) {
|
||||
QString oldText(text()), newText, addToNumber;
|
||||
int oldPos(cursorPosition()), newPos(-1), oldLen(oldText.length()), start = 0, digits = 5;
|
||||
newText.reserve(oldLen + 1);
|
||||
newText += '+';
|
||||
if (oldLen && oldText[0] == '+') {
|
||||
++start;
|
||||
}
|
||||
for (int i = start; i < oldLen; ++i) {
|
||||
QChar ch(oldText[i]);
|
||||
if (ch.isDigit()) {
|
||||
if (!digits || !--digits) {
|
||||
addToNumber += ch;
|
||||
} else {
|
||||
newText += ch;
|
||||
}
|
||||
}
|
||||
if (i == oldPos) {
|
||||
newPos = newText.length();
|
||||
}
|
||||
}
|
||||
if (!addToNumber.isEmpty()) {
|
||||
QString validCode = findValidCode(newText.mid(1));
|
||||
addToNumber = newText.mid(1 + validCode.length()) + addToNumber;
|
||||
newText = '+' + validCode;
|
||||
}
|
||||
if (newPos < 0 || newPos > newText.length()) {
|
||||
newPos = newText.length();
|
||||
}
|
||||
if (newText != oldText) {
|
||||
setText(newText);
|
||||
if (newPos != oldPos) {
|
||||
setCursorPosition(newPos);
|
||||
}
|
||||
}
|
||||
if (!_nosignal && was != newText) {
|
||||
emit codeChanged(newText.mid(1));
|
||||
}
|
||||
if (!addToNumber.isEmpty()) {
|
||||
emit addedToNumber(addToNumber);
|
||||
}
|
||||
}
|
||||
|
||||
InputField::InputField(QWidget *parent, const style::InputField &st, const QString &ph, const QString &val) : TWidget(parent),
|
||||
_inner(this, val),
|
||||
_oldtext(val),
|
||||
_keyEvent(0),
|
||||
|
||||
_undoAvailable(false),
|
||||
_redoAvailable(false),
|
||||
|
||||
_fakeMargin(0),
|
||||
_customUpDown(false),
|
||||
|
||||
_placeholderFull(ph),
|
||||
_placeholderVisible(val.isEmpty()),
|
||||
a_placeholderLeft(_placeholderVisible ? 0 : st.placeholderShift),
|
||||
a_placeholderOpacity(_placeholderVisible ? 1 : 0),
|
||||
a_placeholderFg(st.placeholderFg->c),
|
||||
_placeholderFgAnim(animFunc(this, &InputField::placeholderFgStep)),
|
||||
_placeholderShiftAnim(animFunc(this, &InputField::placeholderShiftStep)),
|
||||
|
||||
a_borderFg(st.borderFg->c),
|
||||
a_borderOpacityActive(0),
|
||||
_borderAnim(animFunc(this, &InputField::borderStep)),
|
||||
|
||||
_focused(false), _error(false),
|
||||
|
||||
_st(&st),
|
||||
|
||||
_touchPress(false),
|
||||
_touchRightButton(false),
|
||||
_touchMove(false),
|
||||
_replacingEmojis(false) {
|
||||
_inner.setAcceptRichText(false);
|
||||
resize(_st->width, _st->height);
|
||||
|
||||
_inner.setWordWrapMode(QTextOption::NoWrap);
|
||||
_inner.setLineWrapMode(QTextEdit::NoWrap);
|
||||
|
||||
_inner.setFont(_st->font->f);
|
||||
_inner.setAlignment(cRtl() ? Qt::AlignRight : Qt::AlignLeft);
|
||||
|
||||
_placeholder = _st->font->m.elidedText(_placeholderFull, Qt::ElideRight, width() - _st->textMargins.left() - _st->textMargins.right() - _st->placeholderMargins.left() - _st->placeholderMargins.right() - 1);
|
||||
|
||||
QPalette p(palette());
|
||||
p.setColor(QPalette::Text, _st->textFg->c);
|
||||
setPalette(p);
|
||||
|
||||
_inner.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
_inner.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
_inner.setFrameStyle(QFrame::NoFrame | QFrame::Plain);
|
||||
_inner.viewport()->setAutoFillBackground(false);
|
||||
|
||||
_inner.setContentsMargins(0, 0, 0, 0);
|
||||
_inner.document()->setDocumentMargin(0);
|
||||
|
||||
setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
_inner.viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
_touchTimer.setSingleShot(true);
|
||||
connect(&_touchTimer, SIGNAL(timeout()), this, SLOT(onTouchTimer()));
|
||||
|
||||
connect(_inner.document(), SIGNAL(contentsChange(int, int, int)), this, SLOT(onDocumentContentsChange(int, int, int)));
|
||||
connect(_inner.document(), SIGNAL(contentsChanged()), this, SLOT(onDocumentContentsChanged()));
|
||||
connect(&_inner, SIGNAL(undoAvailable(bool)), this, SLOT(onUndoAvailable(bool)));
|
||||
connect(&_inner, SIGNAL(redoAvailable(bool)), this, SLOT(onRedoAvailable(bool)));
|
||||
if (App::wnd()) connect(&_inner, SIGNAL(selectionChanged()), App::wnd(), SLOT(updateGlobalMenu()));
|
||||
}
|
||||
|
||||
void InputField::onTouchTimer() {
|
||||
_touchRightButton = true;
|
||||
}
|
||||
|
||||
InputField::InputFieldInner::InputFieldInner(InputField *parent, const QString &val) : QTextEdit(val, parent) {
|
||||
}
|
||||
|
||||
bool InputField::InputFieldInner::viewportEvent(QEvent *e) {
|
||||
if (e->type() == QEvent::TouchBegin || e->type() == QEvent::TouchUpdate || e->type() == QEvent::TouchEnd || e->type() == QEvent::TouchCancel) {
|
||||
QTouchEvent *ev = static_cast<QTouchEvent*>(e);
|
||||
if (ev->device()->type() == QTouchDevice::TouchScreen) {
|
||||
qobject_cast<InputField*>(parentWidget())->touchEvent(ev);
|
||||
return QTextEdit::viewportEvent(e);
|
||||
}
|
||||
}
|
||||
return QTextEdit::viewportEvent(e);
|
||||
}
|
||||
|
||||
void InputField::touchEvent(QTouchEvent *e) {
|
||||
switch (e->type()) {
|
||||
case QEvent::TouchBegin:
|
||||
if (_touchPress || e->touchPoints().isEmpty()) return;
|
||||
_touchTimer.start(QApplication::startDragTime());
|
||||
_touchPress = true;
|
||||
_touchMove = _touchRightButton = false;
|
||||
_touchStart = e->touchPoints().cbegin()->screenPos().toPoint();
|
||||
break;
|
||||
|
||||
case QEvent::TouchUpdate:
|
||||
if (!_touchPress || e->touchPoints().isEmpty()) return;
|
||||
if (!_touchMove && (e->touchPoints().cbegin()->screenPos().toPoint() - _touchStart).manhattanLength() >= QApplication::startDragDistance()) {
|
||||
_touchMove = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case QEvent::TouchEnd:
|
||||
if (!_touchPress) return;
|
||||
if (!_touchMove && window()) {
|
||||
Qt::MouseButton btn(_touchRightButton ? Qt::RightButton : Qt::LeftButton);
|
||||
QPoint mapped(mapFromGlobal(_touchStart)), winMapped(window()->mapFromGlobal(_touchStart));
|
||||
|
||||
if (_touchRightButton) {
|
||||
QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, mapped, _touchStart);
|
||||
contextMenuEvent(&contextEvent);
|
||||
}
|
||||
}
|
||||
_touchTimer.stop();
|
||||
_touchPress = _touchMove = _touchRightButton = false;
|
||||
break;
|
||||
|
||||
case QEvent::TouchCancel:
|
||||
_touchPress = false;
|
||||
_touchTimer.stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int32 InputField::fakeMargin() const {
|
||||
return _fakeMargin;
|
||||
}
|
||||
|
||||
void InputField::paintEvent(QPaintEvent *e) {
|
||||
Painter p(this);
|
||||
|
||||
QRect r(rect().intersected(e->rect()));
|
||||
p.fillRect(r, st::white->b);
|
||||
if (_st->border) {
|
||||
p.fillRect(0, height() - _st->border, width(), _st->border, _st->borderFg->b);
|
||||
}
|
||||
if (_st->borderActive && a_borderOpacityActive.current() > 0) {
|
||||
p.setOpacity(a_borderOpacityActive.current());
|
||||
p.fillRect(0, height() - _st->borderActive, width(), _st->borderActive, a_borderFg.current());
|
||||
p.setOpacity(1);
|
||||
}
|
||||
if (_st->iconSprite.pxWidth()) {
|
||||
p.drawSpriteLeft(_st->iconPosition, width(), _st->iconSprite);
|
||||
}
|
||||
|
||||
bool drawPlaceholder = _placeholderVisible;
|
||||
if (_placeholderShiftAnim.animating()) {
|
||||
p.setOpacity(a_placeholderOpacity.current());
|
||||
drawPlaceholder = true;
|
||||
}
|
||||
if (drawPlaceholder) {
|
||||
p.save();
|
||||
p.setClipRect(r);
|
||||
|
||||
QRect r(rect().marginsRemoved(_st->textMargins + _st->placeholderMargins));
|
||||
r.moveLeft(r.left() + a_placeholderLeft.current());
|
||||
if (rtl()) r.moveLeft(width() - r.left() - r.width());
|
||||
|
||||
p.setFont(_st->font->f);
|
||||
p.setPen(a_placeholderFg.current());
|
||||
p.drawText(r, _placeholder, _st->placeholderAlign);
|
||||
|
||||
p.restore();
|
||||
}
|
||||
TWidget::paintEvent(e);
|
||||
}
|
||||
|
||||
void InputField::focusInEvent(QFocusEvent *e) {
|
||||
_inner.setFocus();
|
||||
}
|
||||
|
||||
void InputField::mousePressEvent(QMouseEvent *e) {
|
||||
_inner.setFocus();
|
||||
}
|
||||
|
||||
void InputField::contextMenuEvent(QContextMenuEvent *e) {
|
||||
_inner.contextMenuEvent(e);
|
||||
}
|
||||
|
||||
void InputField::InputFieldInner::focusInEvent(QFocusEvent *e) {
|
||||
f()->focusInInner();
|
||||
QTextEdit::focusInEvent(e);
|
||||
emit f()->focused();
|
||||
}
|
||||
|
||||
void InputField::focusInInner() {
|
||||
if (!_focused) {
|
||||
_focused = true;
|
||||
|
||||
a_placeholderFg.start(_st->placeholderFgActive->c);
|
||||
_placeholderFgAnim.start();
|
||||
|
||||
a_borderFg.start((_error ? _st->borderFgError : _st->borderFgActive)->c);
|
||||
a_borderOpacityActive.start(1);
|
||||
_borderAnim.start();
|
||||
}
|
||||
}
|
||||
|
||||
void InputField::InputFieldInner::focusOutEvent(QFocusEvent *e) {
|
||||
f()->focusOutInner();
|
||||
QTextEdit::focusOutEvent(e);
|
||||
emit f()->blurred();
|
||||
}
|
||||
|
||||
void InputField::focusOutInner() {
|
||||
if (_focused) {
|
||||
_focused = false;
|
||||
|
||||
a_placeholderFg.start(_st->placeholderFg->c);
|
||||
_placeholderFgAnim.start();
|
||||
|
||||
a_borderFg.start((_error ? _st->borderFgError : _st->borderFg)->c);
|
||||
a_borderOpacityActive.start(_error ? 1 : 0);
|
||||
_borderAnim.start();
|
||||
}
|
||||
}
|
||||
|
||||
QSize InputField::sizeHint() const {
|
||||
return geometry().size();
|
||||
}
|
||||
|
||||
QSize InputField::minimumSizeHint() const {
|
||||
return geometry().size();
|
||||
}
|
||||
|
||||
QString InputField::getText(int32 start, int32 end) const {
|
||||
if (end >= 0 && end <= start) return QString();
|
||||
|
||||
if (start < 0) start = 0;
|
||||
bool full = (start == 0) && (end < 0);
|
||||
|
||||
QTextDocument *doc(_inner.document());
|
||||
QTextBlock from = full ? doc->begin() : doc->findBlock(start), till = (end < 0) ? doc->end() : doc->findBlock(end);
|
||||
if (till.isValid()) till = till.next();
|
||||
|
||||
int32 possibleLen = 0;
|
||||
for (QTextBlock b = from; b != till; b = b.next()) {
|
||||
possibleLen += b.length();
|
||||
}
|
||||
QString result;
|
||||
result.reserve(possibleLen + 1);
|
||||
if (!full && end < 0) {
|
||||
end = possibleLen;
|
||||
}
|
||||
|
||||
for (QTextBlock b = from; b != till; b = b.next()) {
|
||||
for (QTextBlock::Iterator iter = b.begin(); !iter.atEnd(); ++iter) {
|
||||
QTextFragment fragment(iter.fragment());
|
||||
if (!fragment.isValid()) continue;
|
||||
|
||||
int32 p = full ? 0 : fragment.position(), e = full ? 0 : (p + fragment.length());
|
||||
if (!full) {
|
||||
if (p >= end || e <= start) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
QTextCharFormat f = fragment.charFormat();
|
||||
QString emojiText;
|
||||
QString t(fragment.text());
|
||||
if (!full) {
|
||||
if (p < start) {
|
||||
t = t.mid(start - p, end - start);
|
||||
} else if (e > end) {
|
||||
t = t.mid(0, end - p);
|
||||
}
|
||||
}
|
||||
QChar *ub = t.data(), *uc = ub, *ue = uc + t.size();
|
||||
for (; uc != ue; ++uc) {
|
||||
switch (uc->unicode()) {
|
||||
case 0xfdd0: // QTextBeginningOfFrame
|
||||
case 0xfdd1: // QTextEndOfFrame
|
||||
case QChar::ParagraphSeparator:
|
||||
case QChar::LineSeparator:
|
||||
*uc = QLatin1Char('\n');
|
||||
break;
|
||||
case QChar::Nbsp:
|
||||
*uc = QLatin1Char(' ');
|
||||
break;
|
||||
case QChar::ObjectReplacementCharacter:
|
||||
if (emojiText.isEmpty() && f.isImageFormat()) {
|
||||
QString imageName = static_cast<QTextImageFormat*>(&f)->name();
|
||||
if (imageName.startsWith(qstr("emoji://e."))) {
|
||||
if (EmojiPtr emoji = emojiFromUrl(imageName)) {
|
||||
emojiText = emojiString(emoji);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (uc > ub) result.append(ub, uc - ub);
|
||||
if (!emojiText.isEmpty()) result.append(emojiText);
|
||||
ub = uc + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (uc > ub) result.append(ub, uc - ub);
|
||||
}
|
||||
result.append('\n');
|
||||
}
|
||||
result.chop(1);
|
||||
return result;
|
||||
}
|
||||
|
||||
bool InputField::hasText() const {
|
||||
QTextDocument *doc(_inner.document());
|
||||
QTextBlock from = doc->begin(), till = doc->end();
|
||||
|
||||
if (from == till) return false;
|
||||
|
||||
for (QTextBlock::Iterator iter = from.begin(); !iter.atEnd(); ++iter) {
|
||||
QTextFragment fragment(iter.fragment());
|
||||
if (!fragment.isValid()) continue;
|
||||
if (!fragment.text().isEmpty()) return true;
|
||||
}
|
||||
return (from.next() != till);
|
||||
}
|
||||
|
||||
bool InputField::isUndoAvailable() const {
|
||||
return _undoAvailable;
|
||||
}
|
||||
|
||||
bool InputField::isRedoAvailable() const {
|
||||
return _redoAvailable;
|
||||
}
|
||||
|
||||
void InputField::insertEmoji(EmojiPtr emoji, QTextCursor c) {
|
||||
QTextImageFormat imageFormat;
|
||||
int32 ew = ESize + st::emojiPadding * cIntRetinaFactor() * 2, eh = _st->font->height * cIntRetinaFactor();
|
||||
imageFormat.setWidth(ew / cIntRetinaFactor());
|
||||
imageFormat.setHeight(eh / cIntRetinaFactor());
|
||||
imageFormat.setName(qsl("emoji://e.") + QString::number(emojiKey(emoji), 16));
|
||||
imageFormat.setVerticalAlignment(QTextCharFormat::AlignBaseline);
|
||||
|
||||
static QString objectReplacement(QChar::ObjectReplacementCharacter);
|
||||
c.insertText(objectReplacement, imageFormat);
|
||||
}
|
||||
|
||||
QVariant InputField::InputFieldInner::loadResource(int type, const QUrl &name) {
|
||||
QString imageName = name.toDisplayString();
|
||||
if (imageName.startsWith(qstr("emoji://e."))) {
|
||||
if (EmojiPtr emoji = emojiFromUrl(imageName)) {
|
||||
return QVariant(App::emojiSingle(emoji, f()->_st->font->height));
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
void InputField::processDocumentContentsChange(int position, int charsAdded) {
|
||||
int32 emojiPosition = 0, emojiLen = 0;
|
||||
const EmojiData *emoji = 0;
|
||||
|
||||
static QString space(' ');
|
||||
|
||||
QTextDocument *doc(_inner.document());
|
||||
QTextCursor c(_inner.textCursor());
|
||||
c.joinPreviousEditBlock();
|
||||
while (true) {
|
||||
int32 start = position, end = position + charsAdded;
|
||||
QTextBlock from = doc->findBlock(start), till = doc->findBlock(end);
|
||||
if (till.isValid()) till = till.next();
|
||||
|
||||
for (QTextBlock b = from; b != till; b = b.next()) {
|
||||
for (QTextBlock::Iterator iter = b.begin(); !iter.atEnd(); ++iter) {
|
||||
QTextFragment fragment(iter.fragment());
|
||||
if (!fragment.isValid()) continue;
|
||||
|
||||
int32 fp = fragment.position(), fe = fp + fragment.length();
|
||||
if (fp >= end || fe <= start) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QString t(fragment.text());
|
||||
const QChar *ch = t.constData(), *e = ch + t.size();
|
||||
for (; ch != e; ++ch) {
|
||||
// QTextBeginningOfFrame // QTextEndOfFrame
|
||||
if (ch->unicode() == 0xfdd0 || ch->unicode() == 0xfdd1 || ch->unicode() == QChar::ParagraphSeparator || ch->unicode() == QChar::LineSeparator || ch->unicode() == '\n' || ch->unicode() == '\r') {
|
||||
if (!_inner.document()->pageSize().isNull()) {
|
||||
_inner.document()->setPageSize(QSizeF(0, 0));
|
||||
}
|
||||
int32 nlPosition = fp + (ch - t.constData());
|
||||
QTextCursor c(doc->docHandle(), nlPosition);
|
||||
c.setPosition(nlPosition + 1, QTextCursor::KeepAnchor);
|
||||
c.insertText(space);
|
||||
position = nlPosition + 1;
|
||||
emoji = TwoSymbolEmoji; // just a flag
|
||||
break;
|
||||
}
|
||||
emoji = emojiFromText(ch, e, emojiLen);
|
||||
if (emoji) {
|
||||
emojiPosition = fp + (ch - t.constData());
|
||||
break;
|
||||
}
|
||||
if (ch + 1 < e && ch->isHighSurrogate() && (ch + 1)->isLowSurrogate()) ++ch;
|
||||
}
|
||||
if (emoji) break;
|
||||
}
|
||||
if (emoji) break;
|
||||
if (b.next() != doc->end()) {
|
||||
int32 nlPosition = b.next().position() - 1;
|
||||
QTextCursor c(doc->docHandle(), nlPosition);
|
||||
c.setPosition(nlPosition + 1, QTextCursor::KeepAnchor);
|
||||
c.insertText(space);
|
||||
position = nlPosition + 1;
|
||||
emoji = TwoSymbolEmoji; // just a flag
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (emoji == TwoSymbolEmoji) { // just skip
|
||||
emoji = 0;
|
||||
emojiPosition = 0;
|
||||
} else if (emoji) {
|
||||
if (!_inner.document()->pageSize().isNull()) {
|
||||
_inner.document()->setPageSize(QSizeF(0, 0));
|
||||
}
|
||||
|
||||
QTextCursor c(doc->docHandle(), emojiPosition);
|
||||
c.setPosition(emojiPosition + emojiLen, QTextCursor::KeepAnchor);
|
||||
int32 removedUpto = c.position();
|
||||
|
||||
insertEmoji(emoji, c);
|
||||
|
||||
for (Insertions::iterator i = _insertions.begin(), e = _insertions.end(); i != e; ++i) {
|
||||
if (i->first >= removedUpto) {
|
||||
i->first -= removedUpto - emojiPosition - 1;
|
||||
} else if (i->first >= emojiPosition) {
|
||||
i->second -= removedUpto - emojiPosition;
|
||||
i->first = emojiPosition + 1;
|
||||
} else if (i->first + i->second > emojiPosition + 1) {
|
||||
i->second -= qMin(removedUpto, i->first + i->second) - emojiPosition;
|
||||
}
|
||||
}
|
||||
|
||||
charsAdded -= removedUpto - position;
|
||||
position = emojiPosition + 1;
|
||||
|
||||
emoji = 0;
|
||||
emojiPosition = 0;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
c.endEditBlock();
|
||||
}
|
||||
|
||||
void InputField::onDocumentContentsChange(int position, int charsRemoved, int charsAdded) {
|
||||
if (_replacingEmojis) return;
|
||||
|
||||
if (_inner.document()->availableRedoSteps() > 0) return;
|
||||
|
||||
const int takeBack = 3;
|
||||
|
||||
position -= takeBack;
|
||||
charsAdded += takeBack;
|
||||
if (position < 0) {
|
||||
charsAdded += position;
|
||||
position = 0;
|
||||
}
|
||||
if (charsAdded <= 0) return;
|
||||
|
||||
// _insertions.push_back(Insertion(position, charsAdded));
|
||||
_replacingEmojis = true;
|
||||
QSizeF s = _inner.document()->pageSize();
|
||||
processDocumentContentsChange(position, charsAdded);
|
||||
if (_inner.document()->pageSize() != s) {
|
||||
_inner.document()->setPageSize(s);
|
||||
}
|
||||
_replacingEmojis = false;
|
||||
}
|
||||
|
||||
void InputField::onDocumentContentsChanged() {
|
||||
if (_replacingEmojis) return;
|
||||
|
||||
if (!_insertions.isEmpty()) {
|
||||
if (_inner.document()->availableRedoSteps() > 0) {
|
||||
_insertions.clear();
|
||||
} else {
|
||||
_replacingEmojis = true;
|
||||
QSizeF s = _inner.document()->pageSize();
|
||||
|
||||
do {
|
||||
Insertion i = _insertions.front();
|
||||
_insertions.pop_front();
|
||||
if (i.second > 0) {
|
||||
processDocumentContentsChange(i.first, i.second);
|
||||
}
|
||||
} while (!_insertions.isEmpty());
|
||||
|
||||
if (_inner.document()->pageSize() != s) {
|
||||
_inner.document()->setPageSize(s);
|
||||
}
|
||||
_replacingEmojis = false;
|
||||
}
|
||||
}
|
||||
|
||||
QString curText(getText());
|
||||
if (_oldtext != curText) {
|
||||
_oldtext = curText;
|
||||
emit changed();
|
||||
}
|
||||
updatePlaceholder();
|
||||
if (App::wnd()) App::wnd()->updateGlobalMenu();
|
||||
}
|
||||
|
||||
void InputField::onUndoAvailable(bool avail) {
|
||||
_undoAvailable = avail;
|
||||
if (App::wnd()) App::wnd()->updateGlobalMenu();
|
||||
}
|
||||
|
||||
void InputField::onRedoAvailable(bool avail) {
|
||||
_redoAvailable = avail;
|
||||
if (App::wnd()) App::wnd()->updateGlobalMenu();
|
||||
}
|
||||
|
||||
bool InputField::placeholderFgStep(float64 ms) {
|
||||
float dt = ms / _st->duration;
|
||||
bool res = true;
|
||||
if (dt >= 1) {
|
||||
res = false;
|
||||
a_placeholderFg.finish();
|
||||
} else {
|
||||
a_placeholderFg.update(dt, anim::linear);
|
||||
}
|
||||
update();
|
||||
return res;
|
||||
}
|
||||
|
||||
bool InputField::placeholderShiftStep(float64 ms) {
|
||||
float dt = ms / _st->duration;
|
||||
bool res = true;
|
||||
if (dt >= 1) {
|
||||
res = false;
|
||||
a_placeholderLeft.finish();
|
||||
a_placeholderOpacity.finish();
|
||||
} else {
|
||||
a_placeholderLeft.update(dt, anim::linear);
|
||||
a_placeholderOpacity.update(dt, anim::linear);
|
||||
}
|
||||
update();
|
||||
return res;
|
||||
}
|
||||
|
||||
bool InputField::borderStep(float64 ms) {
|
||||
float dt = ms / _st->duration;
|
||||
bool res = true;
|
||||
if (dt >= 1) {
|
||||
res = false;
|
||||
a_borderFg.finish();
|
||||
a_borderOpacityActive.finish();
|
||||
} else {
|
||||
a_borderFg.update(dt, anim::linear);
|
||||
a_borderOpacityActive.update(dt, anim::linear);
|
||||
}
|
||||
update();
|
||||
return res;
|
||||
}
|
||||
const QString &InputField::getLastText() const {
|
||||
return _oldtext;
|
||||
}
|
||||
|
||||
void InputField::updatePlaceholder() {
|
||||
bool placeholderVisible = _oldtext.isEmpty();
|
||||
if (placeholderVisible != _placeholderVisible) {
|
||||
_placeholderVisible = placeholderVisible;
|
||||
|
||||
a_placeholderLeft.start(_placeholderVisible ? 0 : _st->placeholderShift);
|
||||
a_placeholderOpacity.start(_placeholderVisible ? 1 : 0);
|
||||
_placeholderShiftAnim.start();
|
||||
}
|
||||
}
|
||||
|
||||
void InputField::correctValue(QKeyEvent *e, const QString &was) {
|
||||
}
|
||||
|
||||
QMimeData *InputField::InputFieldInner::createMimeDataFromSelection() const {
|
||||
QMimeData *result = new QMimeData();
|
||||
QTextCursor c(textCursor());
|
||||
int32 start = c.selectionStart(), end = c.selectionEnd();
|
||||
if (end > start) {
|
||||
result->setText(f()->getText(start, end));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void InputField::customUpDown(bool custom) {
|
||||
_customUpDown = custom;
|
||||
}
|
||||
|
||||
void InputField::InputFieldInner::keyPressEvent(QKeyEvent *e) {
|
||||
bool shift = e->modifiers().testFlag(Qt::ShiftModifier);
|
||||
bool macmeta = (cPlatform() == dbipMac) && 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), ctrlGood = true;
|
||||
bool enter = (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return);
|
||||
|
||||
if (macmeta && e->key() == Qt::Key_Backspace) {
|
||||
QTextCursor tc(textCursor()), start(tc);
|
||||
start.movePosition(QTextCursor::StartOfLine);
|
||||
tc.setPosition(start.position(), QTextCursor::KeepAnchor);
|
||||
tc.removeSelectedText();
|
||||
} else if (enter && ctrlGood) {
|
||||
emit f()->submitted(ctrl && shift);
|
||||
} else if (e->key() == Qt::Key_Escape) {
|
||||
emit f()->cancelled();
|
||||
} else if (e->key() == Qt::Key_Tab || (ctrl && e->key() == Qt::Key_Backtab)) {
|
||||
if (ctrl) {
|
||||
e->ignore();
|
||||
} else {
|
||||
emit f()->tabbed();
|
||||
}
|
||||
} else if (e->key() == Qt::Key_Search || e == QKeySequence::Find) {
|
||||
e->ignore();
|
||||
} else if (f()->_customUpDown && (e->key() == Qt::Key_Up || e->key() == Qt::Key_Down)) {
|
||||
e->ignore();
|
||||
} else {
|
||||
QTextCursor tc(textCursor());
|
||||
if (enter && ctrl) {
|
||||
e->setModifiers(e->modifiers() & ~Qt::ControlModifier);
|
||||
}
|
||||
QTextEdit::keyPressEvent(e);
|
||||
if (tc == textCursor()) {
|
||||
bool check = false;
|
||||
if (e->key() == Qt::Key_PageUp || e->key() == Qt::Key_Up) {
|
||||
tc.movePosition(QTextCursor::Start, e->modifiers().testFlag(Qt::ShiftModifier) ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor);
|
||||
check = true;
|
||||
} else if (e->key() == Qt::Key_PageDown || e->key() == Qt::Key_Down) {
|
||||
tc.movePosition(QTextCursor::End, e->modifiers().testFlag(Qt::ShiftModifier) ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor);
|
||||
check = true;
|
||||
}
|
||||
if (check) {
|
||||
if (tc == textCursor()) {
|
||||
e->ignore();
|
||||
} else {
|
||||
setTextCursor(tc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InputField::InputFieldInner::paintEvent(QPaintEvent *e) {
|
||||
return QTextEdit::paintEvent(e);
|
||||
}
|
||||
|
||||
void InputField::resizeEvent(QResizeEvent *e) {
|
||||
_placeholder = _st->font->m.elidedText(_placeholderFull, Qt::ElideRight, width() - _st->textMargins.left() - _st->textMargins.right() - _st->placeholderMargins.left() - _st->placeholderMargins.right() - 1);
|
||||
_inner.setGeometry(rect().marginsRemoved(_st->textMargins));
|
||||
TWidget::resizeEvent(e);
|
||||
}
|
||||
|
|
|
@ -52,6 +52,9 @@ public:
|
|||
QSize minimumSizeHint() const;
|
||||
|
||||
void customUpDown(bool isCustom);
|
||||
QString getLastText() const {
|
||||
return text();
|
||||
}
|
||||
|
||||
public slots:
|
||||
|
||||
|
@ -100,3 +103,175 @@ private:
|
|||
bool _touchPress, _touchRightButton, _touchMove;
|
||||
QPoint _touchStart;
|
||||
};
|
||||
|
||||
class CountryCodeInput : public FlatInput {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
CountryCodeInput(QWidget *parent, const style::flatInput &st);
|
||||
|
||||
public slots:
|
||||
|
||||
void startErasing(QKeyEvent *e);
|
||||
void codeSelected(const QString &code);
|
||||
|
||||
signals:
|
||||
|
||||
void codeChanged(const QString &code);
|
||||
void addedToNumber(const QString &added);
|
||||
|
||||
protected:
|
||||
|
||||
void correctValue(QKeyEvent *e, const QString &was);
|
||||
|
||||
private:
|
||||
|
||||
bool _nosignal;
|
||||
|
||||
};
|
||||
|
||||
class InputField : public TWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
InputField(QWidget *parent, const style::InputField &st, const QString &ph = QString(), const QString &val = QString());
|
||||
|
||||
void touchEvent(QTouchEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void focusInEvent(QFocusEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
const QString &getLastText() const;
|
||||
void updatePlaceholder();
|
||||
|
||||
int32 fakeMargin() const;
|
||||
|
||||
bool placeholderFgStep(float64 ms);
|
||||
bool placeholderShiftStep(float64 ms);
|
||||
bool borderStep(float64 ms);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
|
||||
QString getText(int32 start = 0, int32 end = -1) const;
|
||||
bool hasText() const;
|
||||
|
||||
bool isUndoAvailable() const;
|
||||
bool isRedoAvailable() const;
|
||||
|
||||
void customUpDown(bool isCustom);
|
||||
|
||||
void setTextCursor(const QTextCursor &cursor) {
|
||||
return _inner.setTextCursor(cursor);
|
||||
}
|
||||
QTextCursor textCursor() const {
|
||||
return _inner.textCursor();
|
||||
}
|
||||
void setText(const QString &text) {
|
||||
return _inner.setText(text);
|
||||
}
|
||||
void clear() {
|
||||
return _inner.clear();
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void onTouchTimer();
|
||||
|
||||
void onDocumentContentsChange(int position, int charsRemoved, int charsAdded);
|
||||
void onDocumentContentsChanged();
|
||||
|
||||
void onUndoAvailable(bool avail);
|
||||
void onRedoAvailable(bool avail);
|
||||
|
||||
signals:
|
||||
|
||||
void changed();
|
||||
void submitted(bool ctrlShiftEnter);
|
||||
void cancelled();
|
||||
void tabbed();
|
||||
|
||||
void focused();
|
||||
void blurred();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void correctValue(QKeyEvent *e, const QString &was);
|
||||
|
||||
void insertEmoji(EmojiPtr emoji, QTextCursor c);
|
||||
TWidget *tparent() {
|
||||
return qobject_cast<TWidget*>(parentWidget());
|
||||
}
|
||||
const TWidget *tparent() const {
|
||||
return qobject_cast<const TWidget*>(parentWidget());
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
friend class InputFieldInner;
|
||||
class InputFieldInner : public QTextEdit {
|
||||
public:
|
||||
InputFieldInner(InputField *parent, const QString &val = QString());
|
||||
|
||||
bool viewportEvent(QEvent *e);
|
||||
void focusInEvent(QFocusEvent *e);
|
||||
void focusOutEvent(QFocusEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
|
||||
QMimeData *createMimeDataFromSelection() const;
|
||||
|
||||
QVariant loadResource(int type, const QUrl &name);
|
||||
|
||||
private:
|
||||
|
||||
InputField *f() const {
|
||||
return static_cast<InputField*>(parentWidget());
|
||||
}
|
||||
friend class InputField;
|
||||
};
|
||||
InputFieldInner _inner;
|
||||
void focusInInner();
|
||||
void focusOutInner();
|
||||
|
||||
void processDocumentContentsChange(int position, int charsAdded);
|
||||
|
||||
QString _oldtext;
|
||||
|
||||
QKeyEvent *_keyEvent;
|
||||
|
||||
bool _undoAvailable, _redoAvailable;
|
||||
|
||||
int32 _fakeMargin;
|
||||
|
||||
bool _customUpDown;
|
||||
|
||||
QString _placeholder, _placeholderFull;
|
||||
bool _placeholderVisible;
|
||||
anim::ivalue a_placeholderLeft;
|
||||
anim::fvalue a_placeholderOpacity;
|
||||
anim::cvalue a_placeholderFg;
|
||||
Animation _placeholderFgAnim, _placeholderShiftAnim;
|
||||
|
||||
anim::fvalue a_borderOpacityActive;
|
||||
anim::cvalue a_borderFg;
|
||||
Animation _borderAnim;
|
||||
|
||||
bool _focused, _error;
|
||||
|
||||
const style::InputField *_st;
|
||||
|
||||
QTimer _touchTimer;
|
||||
bool _touchPress, _touchRightButton, _touchMove;
|
||||
QPoint _touchStart;
|
||||
|
||||
bool _replacingEmojis;
|
||||
typedef QPair<int, int> Insertion;
|
||||
typedef QList<Insertion> Insertions;
|
||||
Insertions _insertions;
|
||||
};
|
||||
|
|
|
@ -63,6 +63,8 @@ public:
|
|||
|
||||
void insertFromMimeData(const QMimeData *source);
|
||||
|
||||
QMimeData *createMimeDataFromSelection() const;
|
||||
|
||||
public slots:
|
||||
|
||||
void onTouchTimer();
|
||||
|
@ -111,8 +113,6 @@ private:
|
|||
void getSingleEmojiFragment(QString &text, QTextFragment &fragment) const;
|
||||
void processDocumentContentsChange(int position, int charsAdded);
|
||||
|
||||
QMimeData *createMimeDataFromSelection() const;
|
||||
|
||||
QString _ph, _phelided, _oldtext;
|
||||
bool _phVisible;
|
||||
anim::ivalue a_phLeft;
|
||||
|
|
|
@ -1087,7 +1087,7 @@ int32 HistoryList::recountHeight(bool dontRecountText) {
|
|||
|
||||
int32 descH = st::msgMargin.top() + st::msgPadding.top() + st::msgNameFont->height + st::botDescSkip + botDescHeight + st::msgPadding.bottom() + st::msgMargin.bottom();
|
||||
int32 descAtX = (scrollArea->width() - botDescWidth) / 2 - st::msgPadding.left();
|
||||
int32 descAtY = qMin(ySkip - descH, (scrollArea->height() - descH) / 2) + st::msgMargin.top();
|
||||
int32 descAtY = qMin(ySkip - descH, qMax(0, (scrollArea->height() - descH) / 2)) + st::msgMargin.top();
|
||||
|
||||
botDescRect = QRect(descAtX, descAtY, botDescWidth + st::msgPadding.left() + st::msgPadding.right(), descH - st::msgMargin.top() - st::msgMargin.bottom());
|
||||
} else {
|
||||
|
@ -1161,7 +1161,7 @@ void HistoryList::updateSize() {
|
|||
if (botDescHeight > 0) {
|
||||
int32 descH = st::msgMargin.top() + st::msgPadding.top() + st::msgNameFont->height + st::botDescSkip + botDescHeight + st::msgPadding.bottom() + st::msgMargin.bottom();
|
||||
int32 descAtX = (scrollArea->width() - botDescWidth) / 2 - st::msgPadding.left();
|
||||
int32 descAtY = qMin(newYSkip - descH, (scrollArea->height() - descH) / 2) + st::msgMargin.top();
|
||||
int32 descAtY = qMin(newYSkip - descH, qMax(0, (scrollArea->height() - descH) / 2)) + st::msgMargin.top();
|
||||
|
||||
botDescRect = QRect(descAtX, descAtY, botDescWidth + st::msgPadding.left() + st::msgPadding.right(), descH - st::msgMargin.top() - st::msgMargin.bottom());
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
|||
#include <QtWidgets/QWidget>
|
||||
#include "gui/flatbutton.h"
|
||||
#include "gui/phoneinput.h"
|
||||
#include "gui/countrycodeinput.h"
|
||||
#include "gui/countryinput.h"
|
||||
#include "intro.h"
|
||||
|
||||
|
|
|
@ -2476,6 +2476,7 @@ void OverviewInner::showAll(bool recountHeights) {
|
|||
newHeight = _height;
|
||||
_addToY = (_height < _minHeight) ? (_minHeight - _height) : 0;
|
||||
}
|
||||
|
||||
if (newHeight < _minHeight) {
|
||||
newHeight = _minHeight;
|
||||
}
|
||||
|
|
|
@ -951,6 +951,16 @@ void ProfileInner::resizeEvent(QResizeEvent *e) {
|
|||
_blockUser.move(_left, top); top += _blockUser.height();
|
||||
}
|
||||
|
||||
// actions
|
||||
top += st::profileHeaderSkip;
|
||||
_searchInPeer.move(_left, top); top += _searchInPeer.height() + st::setLittleSkip;
|
||||
_clearHistory.move(_left, top); top += _clearHistory.height() + st::setLittleSkip;
|
||||
_deleteConversation.move(_left, top); top += _deleteConversation.height();
|
||||
if (_peerUser && peerToUser(_peerUser->id) != MTP::authedId()) {
|
||||
top += st::setSectionSkip;
|
||||
_blockUser.move(_left, top); top += _blockUser.height();
|
||||
}
|
||||
|
||||
// participants
|
||||
if (_peerChat && (_peerChat->count > 0 || !_participants.isEmpty())) {
|
||||
top += st::profileHeaderSkip;
|
||||
|
|
|
@ -212,10 +212,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_countrycodeinput.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_countryinput.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -482,10 +478,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Deploy\moc_countrycodeinput.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Deploy\moc_countryinput.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -778,10 +770,6 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_countrycodeinput.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_countryinput.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -1018,7 +1006,6 @@
|
|||
<ClCompile Include="SourceFiles\gui\boxshadow.cpp" />
|
||||
<ClCompile Include="SourceFiles\gui\button.cpp" />
|
||||
<ClCompile Include="SourceFiles\gui\contextmenu.cpp" />
|
||||
<ClCompile Include="SourceFiles\gui\countrycodeinput.cpp" />
|
||||
<ClCompile Include="SourceFiles\gui\countryinput.cpp" />
|
||||
<ClCompile Include="SourceFiles\gui\emoji_config.cpp" />
|
||||
<ClCompile Include="SourceFiles\gui\filedialog.cpp" />
|
||||
|
@ -1490,20 +1477,6 @@
|
|||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="SourceFiles\gui\countrycodeinput.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing countrycodeinput.h...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\OpenSSL-Win32\include" "-I.\..\..\Libraries\ffmpeg-2.6.3" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.0\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.0\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countrycodeinput.h"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing countrycodeinput.h...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">Moc%27ing countrycodeinput.h...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\OpenSSL-Win32\include" "-I.\..\..\Libraries\libogg-1.3.2\include" "-I.\..\..\Libraries\opus\include" "-I.\..\..\Libraries\opusfile\include" "-I.\..\..\Libraries\mpg123-1.22.1\ports\MSVC++" "-I.\..\..\Libraries\mpg123-1.22.1\src\libmpg123" "-I.\..\..\Libraries\faad2-2.7\include" "-I.\..\..\Libraries\faad2-2.7\common\mp4ff" "-I.\..\..\Libraries\ffmpeg-2.6.3" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.0\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.0\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countrycodeinput.h"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\OpenSSL-Win32\include" "-I.\..\..\Libraries\ffmpeg-2.6.3" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.0\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.0\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countrycodeinput.h"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="SourceFiles\gui\phoneinput.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing phoneinput.h...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
|
@ -2178,4 +2151,4 @@
|
|||
<UserProperties UicDir=".\GeneratedFiles" MocDir=".\GeneratedFiles\$(ConfigurationName)" MocOptions="" RccDir=".\GeneratedFiles" lupdateOnBuild="1" lupdateOptions="" lreleaseOptions="" Qt5Version_x0020_Win32="$(DefaultQtVersion)" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -87,9 +87,6 @@
|
|||
<ClCompile Include="SourceFiles\gui\phoneinput.cpp">
|
||||
<Filter>gui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SourceFiles\gui\countrycodeinput.cpp">
|
||||
<Filter>gui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SourceFiles\gui\countryinput.cpp">
|
||||
<Filter>gui</Filter>
|
||||
</ClCompile>
|
||||
|
@ -546,15 +543,6 @@
|
|||
<ClCompile Include="GeneratedFiles\Release\moc_countryinput.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Deploy\moc_countrycodeinput.cpp">
|
||||
<Filter>Generated Files\Deploy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_countrycodeinput.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_countrycodeinput.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Deploy\moc_contactsbox.cpp">
|
||||
<Filter>Generated Files\Deploy</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1038,9 +1026,6 @@
|
|||
<CustomBuild Include="SourceFiles\gui\phoneinput.h">
|
||||
<Filter>gui</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="SourceFiles\gui\countrycodeinput.h">
|
||||
<Filter>gui</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="SourceFiles\gui\countryinput.h">
|
||||
<Filter>gui</Filter>
|
||||
</CustomBuild>
|
||||
|
|
|
@ -179,10 +179,8 @@
|
|||
ADE99904299B99EB6135E8D9 /* scrollarea.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 6E1859D714E4471E053D90C9 /* scrollarea.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
B0B88EFE444C0DE673389418 /* moc_flatbutton.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = C9FFCCE4FCB845744636795F /* moc_flatbutton.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
B2F5B08BFFBBE7E37D3863BB /* moc_button.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 46292F489228B60010794CE4 /* moc_button.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
B3CD52E504409DC1B560024F /* countrycodeinput.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 751C8D0E0BE6D16937B77A2C /* countrycodeinput.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
B460F624007324313696BE86 /* QuartzCore.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 7EC00404ACD5AB0E97726B0E /* QuartzCore.framework */; };
|
||||
B6346B66B0A2228A91D8A5D9 /* mtpDC.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 315C7FACB4A9E18AA95486CA /* mtpDC.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
B6F50D5FBFAEB16DD0E5B1C3 /* moc_countrycodeinput.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = A1F48DF3E5D0D7C741C1EAC4 /* moc_countrycodeinput.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
B780F9E21269259B90A1F32A /* moc_mtpDC.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 2C540BAEABD7F9B5FA11008E /* moc_mtpDC.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
B78304F135DEF1F7A68393A6 /* CoreMedia.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 547CCADBD1CC5050167EF948 /* CoreMedia.framework */; };
|
||||
B8CA3E1E11A7E0E7DF9E1CDE /* mtpFileLoader.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 01D6341DC31FE5997F7BB159 /* mtpFileLoader.cpp */; settings = {ATTRIBUTES = (); }; };
|
||||
|
@ -469,7 +467,6 @@
|
|||
5CEA7A2DB2136425A88D1254 /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_opengl.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_opengl.pri"; sourceTree = "<absolute>"; };
|
||||
5F781C7FD8422D359EA1D2FE /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_core_private.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_core_private.pri"; sourceTree = "<absolute>"; };
|
||||
6011DDB120E1B2D4803E129A /* stdafx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = stdafx.h; path = SourceFiles/stdafx.h; sourceTree = "<absolute>"; };
|
||||
60C0061633AC4244EA634B2A /* countrycodeinput.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = countrycodeinput.h; path = SourceFiles/gui/countrycodeinput.h; sourceTree = "<absolute>"; };
|
||||
6102C69805B6398AF6FA5BEB /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_qml_private.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_qml_private.pri"; sourceTree = "<absolute>"; };
|
||||
61C679D8B4B332026BD34200 /* introphone.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = introphone.cpp; path = SourceFiles/intro/introphone.cpp; sourceTree = "<absolute>"; };
|
||||
62807F13DBD204D0716143AD /* Telegram.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Telegram.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -496,7 +493,6 @@
|
|||
74772222DA764BE4623EAC5D /* moc_pspecific_mac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_pspecific_mac.cpp; path = GeneratedFiles/Debug/moc_pspecific_mac.cpp; sourceTree = "<absolute>"; };
|
||||
748F1BCCBEEB3675768960FB /* mtpAuthKey.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mtpAuthKey.h; path = SourceFiles/mtproto/mtpAuthKey.h; sourceTree = "<absolute>"; };
|
||||
74C1C232DFAA71028A0412CA /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_plugin_qtmultimedia_m3u.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_plugin_qtmultimedia_m3u.pri"; sourceTree = "<absolute>"; };
|
||||
751C8D0E0BE6D16937B77A2C /* countrycodeinput.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = countrycodeinput.cpp; path = SourceFiles/gui/countrycodeinput.cpp; sourceTree = "<absolute>"; };
|
||||
763ED3C6815ED6C89E352652 /* flatlabel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = flatlabel.cpp; path = SourceFiles/gui/flatlabel.cpp; sourceTree = "<absolute>"; };
|
||||
77FF486B1F9BCD55A8A3F35D /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_concurrent.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_concurrent.pri"; sourceTree = "<absolute>"; };
|
||||
7A94C7168B3FCBE5F04A013B /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_declarative.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_declarative.pri"; sourceTree = "<absolute>"; };
|
||||
|
@ -567,7 +563,6 @@
|
|||
A022AF919D1977534CA66BB8 /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_widgets.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_lib_widgets.pri"; sourceTree = "<absolute>"; };
|
||||
A1479F94376F9732B57C69DB /* moc_animation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_animation.cpp; path = GeneratedFiles/Debug/moc_animation.cpp; sourceTree = "<absolute>"; };
|
||||
A1A67BEAA744704B29168D39 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
|
||||
A1F48DF3E5D0D7C741C1EAC4 /* moc_countrycodeinput.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_countrycodeinput.cpp; path = GeneratedFiles/Debug/moc_countrycodeinput.cpp; sourceTree = "<absolute>"; };
|
||||
A3622760CEC6D6827A25E710 /* mtpPublicRSA.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mtpPublicRSA.h; path = SourceFiles/mtproto/mtpPublicRSA.h; sourceTree = "<absolute>"; };
|
||||
A37C7E516201B0264A4CDA38 /* moc_intro.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = moc_intro.cpp; path = GeneratedFiles/Debug/moc_intro.cpp; sourceTree = "<absolute>"; };
|
||||
A4D8AC60897F435C1C3B9D02 /* /usr/local/Qt-5.5.0/mkspecs/modules/qt_plugin_qtsensors_generic.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.0/mkspecs/modules/qt_plugin_qtsensors_generic.pri"; sourceTree = "<absolute>"; };
|
||||
|
@ -839,7 +834,6 @@
|
|||
08A7682548FB7E671FF03822 /* boxshadow.cpp */,
|
||||
4D55B83DFDFE3D492CDBD27A /* button.cpp */,
|
||||
074FCB8C19D36851004C6EB2 /* contextmenu.cpp */,
|
||||
751C8D0E0BE6D16937B77A2C /* countrycodeinput.cpp */,
|
||||
3E329D4547CC23585307FA32 /* countryinput.cpp */,
|
||||
B3062303CE8F4EB9325CB3DC /* emoji_config.cpp */,
|
||||
DE4C0E3685DDAE58F9397B13 /* filedialog.cpp */,
|
||||
|
@ -859,7 +853,6 @@
|
|||
BDAB6725B830DEE896DC0F55 /* boxshadow.h */,
|
||||
4604687EBA85611C9E8A9CDF /* button.h */,
|
||||
074FCB8D19D36851004C6EB2 /* contextmenu.h */,
|
||||
60C0061633AC4244EA634B2A /* countrycodeinput.h */,
|
||||
6868ADA9E9A9801B2BA92B97 /* countryinput.h */,
|
||||
19618554524B8D928F13940D /* emoji_config.h */,
|
||||
9BD0BE66E93ACE27D00D6D75 /* filedialog.h */,
|
||||
|
@ -1155,7 +1148,6 @@
|
|||
63AF8520023B4EA40306CB03 /* moc_mtpSession.cpp */,
|
||||
A1479F94376F9732B57C69DB /* moc_animation.cpp */,
|
||||
46292F489228B60010794CE4 /* moc_button.cpp */,
|
||||
A1F48DF3E5D0D7C741C1EAC4 /* moc_countrycodeinput.cpp */,
|
||||
9D9F4744B2F9FF22569D4535 /* moc_countryinput.cpp */,
|
||||
C9FFCCE4FCB845744636795F /* moc_flatbutton.cpp */,
|
||||
58E05D0B8B104D83F43F9859 /* moc_flatcheckbox.cpp */,
|
||||
|
@ -1549,7 +1541,6 @@
|
|||
D1FC601FC2F9F3E33F3A14E9 /* animation.cpp in Compile Sources */,
|
||||
8F65F0D95B1F0CEB859F2FB3 /* boxshadow.cpp in Compile Sources */,
|
||||
D7EF8F129FCCE9AB3F3F081F /* button.cpp in Compile Sources */,
|
||||
B3CD52E504409DC1B560024F /* countrycodeinput.cpp in Compile Sources */,
|
||||
07DC42A01B5EA15300B6B888 /* numbers.cpp in Compile Sources */,
|
||||
C03447C9A7D9FF73463B8BB5 /* countryinput.cpp in Compile Sources */,
|
||||
07BE850F1A2093C9008ACB9F /* localstorage.cpp in Compile Sources */,
|
||||
|
@ -1625,7 +1616,6 @@
|
|||
9A523F51135FD4E2464673A6 /* moc_mtpSession.cpp in Compile Sources */,
|
||||
C329997D36D34D568CE16C9A /* moc_animation.cpp in Compile Sources */,
|
||||
B2F5B08BFFBBE7E37D3863BB /* moc_button.cpp in Compile Sources */,
|
||||
B6F50D5FBFAEB16DD0E5B1C3 /* moc_countrycodeinput.cpp in Compile Sources */,
|
||||
6A8BC88AB464B92706EFE6FF /* moc_countryinput.cpp in Compile Sources */,
|
||||
0764D55A1ABAD6F900FBFEED /* apiwrap.cpp in Compile Sources */,
|
||||
07DE92A01AA4923300A18F6F /* passcodewidget.cpp in Compile Sources */,
|
||||
|
|
|
@ -40,7 +40,7 @@ compilers: GeneratedFiles/qrc_telegram.cpp GeneratedFiles/qrc_telegram_emojis.cp
|
|||
GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp\
|
||||
GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp\
|
||||
GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp\
|
||||
GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp\
|
||||
GeneratedFiles/Debug/moc_contextmenu.cpp\
|
||||
GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp\
|
||||
GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp\
|
||||
GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp\
|
||||
|
@ -99,9 +99,9 @@ GeneratedFiles/qrc_telegram_mac.cpp: SourceFiles/telegram_mac.qrc \
|
|||
SourceFiles/art/osxtray.png
|
||||
/usr/local/Qt-5.5.0/bin/rcc -name telegram_mac SourceFiles/telegram_mac.qrc -o GeneratedFiles/qrc_telegram_mac.cpp
|
||||
|
||||
compiler_moc_header_make_all: GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamebox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
||||
compiler_moc_header_make_all: GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamebox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
||||
compiler_moc_header_clean:
|
||||
-$(DEL_FILE) GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countrycodeinput.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamedbox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
||||
-$(DEL_FILE) GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_phoneinput.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamedbox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
||||
GeneratedFiles/Debug/moc_apiwrap.cpp: SourceFiles/types.h \
|
||||
SourceFiles/logs.h \
|
||||
SourceFiles/apiwrap.h
|
||||
|
@ -352,20 +352,6 @@ GeneratedFiles/Debug/moc_contextmenu.cpp: ../../Libraries/QtStatic/qtbase/includ
|
|||
SourceFiles/gui/contextmenu.h
|
||||
/usr/local/Qt-5.5.0/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.5.0/mkspecs/macx-clang -I. -I/usr/local/Qt-5.5.0/include/QtGui/5.5.0/QtGui -I/usr/local/Qt-5.5.0/include/QtCore/5.5.0/QtCore -I/usr/local/Qt-5.5.0/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.5.0/include -I/usr/local/Qt-5.5.0/include/QtMultimedia -I/usr/local/Qt-5.5.0/include/QtWidgets -I/usr/local/Qt-5.5.0/include/QtNetwork -I/usr/local/Qt-5.5.0/include/QtGui -I/usr/local/Qt-5.5.0/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/gui/contextmenu.h -o GeneratedFiles/Debug/moc_contextmenu.cpp
|
||||
|
||||
GeneratedFiles/Debug/moc_countrycodeinput.cpp: SourceFiles/gui/flatinput.h \
|
||||
../../Libraries/QtStatic/qtbase/include/QtWidgets/QLineEdit \
|
||||
SourceFiles/style.h \
|
||||
GeneratedFiles/style_classes.h \
|
||||
GeneratedFiles/style_auto.h \
|
||||
SourceFiles/gui/animation.h \
|
||||
SourceFiles/types.h \
|
||||
../../Libraries/QtStatic/qtbase/include/QtCore/QReadWriteLock \
|
||||
SourceFiles/logs.h \
|
||||
../../Libraries/QtStatic/qtbase/include/QtCore/QTimer \
|
||||
../../Libraries/QtStatic/qtbase/include/QtGui/QColor \
|
||||
SourceFiles/gui/countrycodeinput.h
|
||||
/usr/local/Qt-5.5.0/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.5.0/mkspecs/macx-clang -I. -I/usr/local/Qt-5.5.0/include/QtGui/5.5.0/QtGui -I/usr/local/Qt-5.5.0/include/QtCore/5.5.0/QtCore -I/usr/local/Qt-5.5.0/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.5.0/include -I/usr/local/Qt-5.5.0/include/QtMultimedia -I/usr/local/Qt-5.5.0/include/QtWidgets -I/usr/local/Qt-5.5.0/include/QtNetwork -I/usr/local/Qt-5.5.0/include/QtGui -I/usr/local/Qt-5.5.0/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/gui/countrycodeinput.h -o GeneratedFiles/Debug/moc_countrycodeinput.cpp
|
||||
|
||||
GeneratedFiles/Debug/moc_countryinput.cpp: ../../Libraries/QtStatic/qtbase/include/QtWidgets/QWidget \
|
||||
SourceFiles/style.h \
|
||||
GeneratedFiles/style_classes.h \
|
||||
|
@ -646,7 +632,6 @@ GeneratedFiles/Debug/moc_introphone.cpp: ../../Libraries/QtStatic/qtbase/include
|
|||
SourceFiles/gui/phoneinput.h \
|
||||
SourceFiles/gui/flatinput.h \
|
||||
../../Libraries/QtStatic/qtbase/include/QtWidgets/QLineEdit \
|
||||
SourceFiles/gui/countrycodeinput.h \
|
||||
SourceFiles/gui/countryinput.h \
|
||||
SourceFiles/gui/scrollarea.h \
|
||||
../../Libraries/QtStatic/qtbase/include/QtWidgets/QScrollArea \
|
||||
|
@ -672,7 +657,6 @@ GeneratedFiles/Debug/moc_intropwdcheck.cpp: ../../Libraries/QtStatic/qtbase/incl
|
|||
SourceFiles/gui/phoneinput.h \
|
||||
SourceFiles/gui/flatinput.h \
|
||||
../../Libraries/QtStatic/qtbase/include/QtWidgets/QLineEdit \
|
||||
SourceFiles/gui/countrycodeinput.h \
|
||||
SourceFiles/gui/countryinput.h \
|
||||
SourceFiles/gui/scrollarea.h \
|
||||
../../Libraries/QtStatic/qtbase/include/QtWidgets/QScrollArea \
|
||||
|
|
Loading…
Reference in New Issue