summaryrefslogtreecommitdiffstats
path: root/src/gui/frame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/frame.cpp')
-rw-r--r--src/gui/frame.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/gui/frame.cpp b/src/gui/frame.cpp
index aa6b0cb..6054065 100644
--- a/src/gui/frame.cpp
+++ b/src/gui/frame.cpp
@@ -36,13 +36,10 @@ Frame::Frame(const QString & text, QWidget * parent) :
Y = 0;
setBackgroundRole(QPalette::Base);
- setStyleSheet(QString::fromUtf8("QLabel{border-radius:10px;\n"
- "background-color: rgb(150,150,150);}"));
-
- setAlignment(Qt::AlignCenter);
+ setAlignment(Qt::AlignCenter);
setAutoFillBackground(true);
- setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
_isLocked = false;
_dozent = false;
@@ -51,12 +48,13 @@ Frame::Frame(const QString & text, QWidget * parent) :
//QIcon icon;
//icon.addFile(QString::fromUtf8(), QSize(), QIcon::Normal, QIcon::Off);
- button_closeUp = createToolButton(tr("View"), QIcon(":/restore"),SLOT(closeUp()));
- button_closeUp->setCheckable(true);
- button_foto = createToolButton(tr("Foto"), QIcon(":/photos"),SLOT(foto()));
- button_lock = createToolButton(tr("Lock this client"), QIcon(":/lock"),SLOT(setLock()));
+// button_closeUp = createToolButton(tr("View"), QIcon(":/restore"),SLOT(closeUp()));
+// button_closeUp->setCheckable(true);
+// button_foto = createToolButton(tr("Foto"), QIcon(":/photos"),SLOT(foto()));
+// button_lock = createToolButton(tr("Lock this client"), QIcon(":/lock"),SLOT(setLock()));
//button_unlock = createToolButton(tr("Unlock this client"), QIcon(":/lock"),SLOT(setLock()));
- button_dozent = createToolButton(tr("Set as Superclient"), QIcon(":/dozent2"),SLOT(setDozent()));
+// button_dozent = createToolButton(tr("Set as Superclient"), QIcon(":/dozent2"),SLOT(setDozent()));
+// button_dozent->setCheckable(true);
button_control = createToolButton(tr("Enable Remote Control"), QIcon(":/remotecontrol"), SLOT(remoteControlClicked()));
button_control->setCheckable(true);
button_control_all = createToolButton(tr("Remote Control All Clients"), QIcon(":/remotecontrolall"), SLOT(remoteControlAllClicked()));
@@ -292,27 +290,25 @@ QToolButton* Frame::createToolButton(const QString &toolTip, const QIcon &icon,
QToolButton *button = new QToolButton(this);
button->setToolTip(toolTip);
button->setIcon(icon);
- button->setIconSize(QSize(15, 15));
- button->setStyleSheet(QString::fromUtf8("background-color: rgb(230, 230, 230);"));
+ button->setIconSize(QSize(30, 30));
addButton(button);
toolButtonList.append(button);
connect(button, SIGNAL(clicked()), this, member);
-
return button;
}
void Frame::addButton(QToolButton *button)
{
button->move(X,Y);
- Y += button->size().height()-5;
+ Y += button->size().height() + 10;
}
void Frame::setToolButtonListVisible(bool visible)
{
foreach (QToolButton* tb, toolButtonList)
tb->setVisible(visible);
- if (visible && MainWindow::getConnectionWindow()->hasDozent && !_dozent)
- button_dozent->setVisible(false);//At this time this button should only be visible on the dozent machine (the superclient).
+// if (visible && MainWindow::getConnectionWindow()->hasDozent && !_dozent)
+// button_dozent->setVisible(false);//At this time this button should only be visible on the dozent machine (the superclient).
}
@@ -320,12 +316,12 @@ void Frame::setLockStatus(bool lock)
{
if (lock)
{
- button_lock->setToolTip(tr("Unlock this client"));
+ //button_lock->setToolTip(tr("Unlock this client"));
//button_lock->setIcon() TODO
}
else
{
- button_lock->setToolTip(tr("Lock this client"));
+ //button_lock->setToolTip(tr("Lock this client"));
//button_lock->setIcon() TODO
}
_isLocked = lock;
@@ -373,14 +369,14 @@ void Frame::setDozent()
{
if (_dozent)
{
- button_dozent->setToolTip(tr("Set client as Superclient"));
+ //button_dozent->setToolTip(tr("Set client as Superclient"));
_dozent = false;
MainWindow::getConnectionWindow()->hasDozent = false;
getConFrame()->setDozent(false);
}
else
{
- button_dozent->setToolTip(tr("Unset client as Superclient"));
+ //button_dozent->setToolTip(tr("Unset client as Superclient"));
_dozent = true;
MainWindow::getConnectionWindow()->hasDozent = true;
getConFrame()->setDozent(true);
@@ -390,7 +386,7 @@ void Frame::setDozent()
void Frame::setCloseUp(bool value)
{
_isCloseUp = value;
- button_closeUp->setChecked(value);
+ //button_closeUp->setChecked(value);
}
void Frame::remoteControlClicked()
@@ -503,6 +499,7 @@ void Frame::updateMousePosition(QMouseEvent* event)
void Frame::enterEvent(QEvent* event)
{
+ QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
_mouseOver = true;
if(_remoteControlEnabled)
{
@@ -512,6 +509,7 @@ void Frame::enterEvent(QEvent* event)
void Frame::leaveEvent(QEvent* event)
{
+ QApplication::setOverrideCursor(QCursor(Qt::OpenHandCursor));
_mouseOver = false;
if(_remoteControlEnabled)
{