mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Animation on hiding "Save password" question
This commit is contained in:
parent
03601b7cd9
commit
5b70f50a90
|
@ -23,21 +23,37 @@ AutoFillWidget::AutoFillWidget(QUrl url, QByteArray data, QString pass, QWidget
|
||||||
|
|
||||||
connect(ui->remember, SIGNAL(clicked()), this, SLOT(remember()));
|
connect(ui->remember, SIGNAL(clicked()), this, SLOT(remember()));
|
||||||
connect(ui->never, SIGNAL(clicked()), this, SLOT(never()));
|
connect(ui->never, SIGNAL(clicked()), this, SLOT(never()));
|
||||||
connect(ui->notnow, SIGNAL(clicked()), this, SLOT(close()));
|
connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide()));
|
||||||
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(close()));
|
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoFillWidget::hide()
|
||||||
|
{
|
||||||
|
m_animation = new QTimeLine(300, this);
|
||||||
|
m_animation->setFrameRange(0, 35);
|
||||||
|
m_animation->setDirection(QTimeLine::Backward);
|
||||||
|
|
||||||
|
m_animation->start();
|
||||||
|
connect(m_animation, SIGNAL(finished()), this, SLOT(close()));
|
||||||
|
connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoFillWidget::frameChanged(int frame)
|
||||||
|
{
|
||||||
|
setMinimumHeight(frame);
|
||||||
|
setMaximumHeight(frame);
|
||||||
}
|
}
|
||||||
// addEntry(request.url(), outgoingData, pass);
|
|
||||||
|
|
||||||
void AutoFillWidget::never()
|
void AutoFillWidget::never()
|
||||||
{
|
{
|
||||||
MainApplication::getInstance()->autoFill()->blockStoringfor(m_url);
|
MainApplication::getInstance()->autoFill()->blockStoringfor(m_url);
|
||||||
close();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoFillWidget::remember()
|
void AutoFillWidget::remember()
|
||||||
{
|
{
|
||||||
MainApplication::getInstance()->autoFill()->addEntry(m_url, m_data, m_pass);
|
MainApplication::getInstance()->autoFill()->addEntry(m_url, m_data, m_pass);
|
||||||
close();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoFillWidget::~AutoFillWidget()
|
AutoFillWidget::~AutoFillWidget()
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QTimeLine>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AutoFillWidget;
|
class AutoFillWidget;
|
||||||
|
@ -17,14 +18,18 @@ public:
|
||||||
~AutoFillWidget();
|
~AutoFillWidget();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void frameChanged(int frame);
|
||||||
void remember();
|
void remember();
|
||||||
void never();
|
void never();
|
||||||
|
|
||||||
|
void hide();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AutoFillWidget *ui;
|
Ui::AutoFillWidget *ui;
|
||||||
QUrl m_url;
|
QUrl m_url;
|
||||||
QByteArray m_data;
|
QByteArray m_data;
|
||||||
QString m_pass;
|
QString m_pass;
|
||||||
|
QTimeLine* m_animation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AUTOFILLWIDGET_H
|
#endif // AUTOFILLWIDGET_H
|
||||||
|
|
|
@ -74,6 +74,9 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Remember</string>
|
<string>Remember</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -87,6 +90,9 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Never For This Site</string>
|
<string>Never For This Site</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -100,6 +106,9 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Not Now</string>
|
<string>Not Now</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -25,6 +25,7 @@ void WebTab::showNotification(QWidget *notif)
|
||||||
delete m_layout->itemAt(0)->widget();
|
delete m_layout->itemAt(0)->widget();
|
||||||
|
|
||||||
m_layout->insertWidget(0, notif);
|
m_layout->insertWidget(0, notif);
|
||||||
|
notif->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
WebTab::~WebTab()
|
WebTab::~WebTab()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user