1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
//
// C++ Interface: sessionbutton
//
// Description:
//
//
// Author: Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef SESSIONBUTTON_H
#define SESSIONBUTTON_H
#include "SVGFrame.h"
#include <QPushButton>
#include <QLabel>
class ONMainWindow;
class QComboBox;
class QPushButton;
/**
@author Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de>
*/
class SessionButton : public SVGFrame
{
Q_OBJECT
public:
enum {KDE,GNOME,UNITY,LXDE,RDP,XDMCP,SHADOW,PUBLISHED,OTHER,APPLICATION};
SessionButton ( ONMainWindow* mw, QWidget* parent,QString id );
~SessionButton();
QString id() {
return sid;
}
void redraw();
const QPixmap* sessIcon() {
return icon->pixmap();
}
static bool lessThen ( const SessionButton* b1, const SessionButton* b2 );
QString name();
private:
QString sid;
QLabel* sessName;
QLabel* sessStatus;
QLabel* icon;
QComboBox* cmdBox;
QLabel* cmd;
QLabel* serverIcon;
QLabel* geomIcon;
QLabel* cmdIcon;
QLabel* server;
QPushButton* editBut;
QLabel* geom;
QMenu* sessMenu;
QComboBox* geomBox;
QPushButton* sound;
QLabel* soundIcon;
ONMainWindow* par;
QAction* act_edit;
QAction* act_createIcon;
QAction* act_remove;
bool rootless;
bool published;
bool editable;
private slots:
void slotClicked();
void slotEdit();
void slot_soundClicked();
void slot_cmd_change ( const QString& command );
void slot_geom_change ( const QString& new_g );
void slotRemove();
void slotMenuHide();
void slotShowMenu();
void slotCreateSessionIcon();
signals:
void sessionSelected ( SessionButton* );
void signal_edit ( SessionButton* );
void signal_remove ( SessionButton* );
void clicked();
protected:
virtual void mouseMoveEvent ( QMouseEvent * event );
virtual void mousePressEvent ( QMouseEvent * event );
virtual void mouseReleaseEvent ( QMouseEvent * event );
};
#endif
|