2014-11-13 19:30:51 +02:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// This file is part of the KDE project
|
|
|
|
//
|
|
|
|
// Copyright 1999 Martin R. Jones <mjones@kde.org>
|
|
|
|
// Copyright 2003 Oswald Buddenhagen <ossi@kde.org>
|
|
|
|
// Copyright 2004 Chris Howells <howells@kde.org>
|
|
|
|
|
|
|
|
#ifndef AUTOLOGOUT_H
|
|
|
|
#define AUTOLOGOUT_H
|
|
|
|
|
|
|
|
#include <QtCore/QTimer>
|
|
|
|
#include <QtGui/QDialog>
|
|
|
|
#include <QtGui/QLayout>
|
|
|
|
|
|
|
|
namespace ScreenLocker
|
|
|
|
{
|
|
|
|
class LockWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class LockProcess;
|
2019-05-05 02:36:36 +00:00
|
|
|
#include <QGridLayout>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QProgressBar>
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
class AutoLogout : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
AutoLogout(ScreenLocker::LockWindow *parent);
|
|
|
|
~AutoLogout();
|
|
|
|
virtual void setVisible(bool visible);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void timerEvent(QTimerEvent *);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void slotActivity();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateInfo(int);
|
|
|
|
QGridLayout *frameLayout;
|
|
|
|
QLabel *mStatusLabel;
|
|
|
|
int mCountdownTimerId;
|
|
|
|
int mRemaining;
|
|
|
|
QTimer countDownTimer;
|
|
|
|
QProgressBar *mProgressRemaining;
|
|
|
|
void logout();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // AUTOLOGOUT_H
|