refs #227, view/model for client class

* model
* view
* and GUI component which now encapsulates the user table view
This commit is contained in:
Klaus Basan
2014-05-06 13:23:47 +02:00
parent 31b83e0f1e
commit 4686da4827
7 changed files with 296 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#ifndef BLACKGUI_USERCOMPONENT_H
#define BLACKGUI_USERCOMPONENT_H
#include "blackgui/runtimebasedcomponent.h"
#include "blackmisc/nwuserlist.h"
#include <QTabWidget>
#include <QTimer>
namespace Ui { class CUserComponent; }
namespace BlackGui
{
//! User componenet (users, clients)
class CUserComponent : public QTabWidget, public CRuntimeBasedComponent
{
Q_OBJECT
public:
//! Constructor
explicit CUserComponent(QWidget *parent = nullptr);
//! Destructor
~CUserComponent();
public slots:
//! Update users
void update();
//! Update time, time < 100 stops updates
void setUpdateInterval(int milliSeconds);
//! Update time
void setUpdateIntervalSeconds(int seconds) { this->setUpdateInterval(1000 * seconds); }
private:
Ui::CUserComponent *ui;
QTimer *m_timer;
};
}
#endif // guard