2014-12-20 20:29:17 +03:00
|
|
|
/*
|
2017-06-15 15:40:59 +03:00
|
|
|
* Bittorrent Client using Qt and libtorrent.
|
|
|
|
* Copyright (C) 2013 Nick Tiskov <daymansmail@gmail.com>
|
2014-12-20 20:29:17 +03:00
|
|
|
*
|
|
|
|
* This program 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 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* In addition, as a special exception, the copyright holders give permission to
|
|
|
|
* link this program with the OpenSSL project's "OpenSSL" library (or with
|
|
|
|
* modified versions of it that use the same license as the "OpenSSL" library),
|
|
|
|
* and distribute the linked executables. You must obey the GNU General Public
|
|
|
|
* License in all respects for all of the code used other than "OpenSSL". If you
|
|
|
|
* modify file(s), you may extend this exception to your version of the file(s),
|
|
|
|
* but you are not obligated to do so. If you do not wish to do so, delete this
|
|
|
|
* exception statement from your version.
|
|
|
|
*/
|
|
|
|
|
2020-12-10 20:56:37 +03:00
|
|
|
#pragma once
|
2014-12-20 20:29:17 +03:00
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QLineEdit>
|
2019-06-02 12:13:34 +03:00
|
|
|
|
|
|
|
class QString;
|
2014-12-20 20:29:17 +03:00
|
|
|
|
2017-06-15 15:40:59 +03:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class AutoExpandableDialog;
|
2014-12-20 20:29:17 +03:00
|
|
|
}
|
|
|
|
|
2020-04-19 05:42:11 +03:00
|
|
|
class AutoExpandableDialog final : public QDialog
|
2017-06-15 15:40:59 +03:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2022-05-18 08:43:04 +03:00
|
|
|
Q_DISABLE_COPY_MOVE(AutoExpandableDialog)
|
2015-10-26 11:43:41 +03:00
|
|
|
|
2014-12-20 20:29:17 +03:00
|
|
|
public:
|
2017-06-15 15:40:59 +03:00
|
|
|
explicit AutoExpandableDialog(QWidget *parent);
|
|
|
|
~AutoExpandableDialog();
|
2014-12-20 20:29:17 +03:00
|
|
|
|
2017-06-15 15:40:59 +03:00
|
|
|
static QString getText(QWidget *parent, const QString &title, const QString &label,
|
2019-02-22 04:33:04 +03:00
|
|
|
QLineEdit::EchoMode mode = QLineEdit::Normal, const QString &text = {},
|
2018-09-05 16:55:21 +03:00
|
|
|
bool *ok = nullptr, bool excludeExtension = false, Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
|
2014-12-20 20:29:17 +03:00
|
|
|
|
|
|
|
protected:
|
2018-06-06 16:48:17 +03:00
|
|
|
void showEvent(QShowEvent *e) override;
|
2015-10-26 11:43:41 +03:00
|
|
|
|
2014-12-20 20:29:17 +03:00
|
|
|
private:
|
2022-06-23 07:28:00 +03:00
|
|
|
Ui::AutoExpandableDialog *m_ui = nullptr;
|
2014-12-20 20:29:17 +03:00
|
|
|
};
|