1 /**************************************************************************
2 *   Copyright (C) 2005-2020 by Oleksandr Shneyder                         *
3 *                              <o.shneyder@phoca-gmbh.de>                 *
4 *                                                                         *
5 *   This program is free software; you can redistribute it and/or modify  *
6 *   it under the terms of the GNU General Public License as published by  *
7 *   the Free Software Foundation; either version 2 of the License, or     *
8 *   (at your option) any later version.                                   *
9 *   This program is distributed in the hope that it will be useful,       *
10 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12 *   GNU General Public License for more details.                          *
13 *                                                                         *
14 *   You should have received a copy of the GNU General Public License     *
15 *   along with this program.  If not, see <https://www.gnu.org/licenses/>. *
16 ***************************************************************************/
17 
18 #ifndef USERBUTTON_H
19 #define USERBUTTON_H
20 
21 #include "x2goclientconfig.h"
22 #include <QPushButton>
23 
24 /**
25 @author Oleksandr Shneyder
26 */
27 
28 class QPixmap;
29 class ONMainWindow;
30 class UserButton : public QPushButton
31 {
32 		Q_OBJECT
33 	public:
34 		UserButton ( ONMainWindow* wnd, QWidget *parent,
35 		             QString username, QString fullName,
36 		             QPixmap& foto, QPalette& backGround,
37 		             int width=0,int height=0 );
38 		~UserButton();
username()39 		QString username() {return user;}
fullName()40 		QString fullName() {return fname;}
foto()41 		const QPixmap& foto() {return image;}
background()42 		const QPixmap& background() {return bg;}
43 
44 	private:
45 		QString user;
46 		QString fname;
47 		QPixmap image;
48 		QPixmap bg;
49 	private slots:
50 		void slotClicked();
51 	signals:
52 		void userSelected ( UserButton* );
53 };
54 #endif
55