Exemplo n.º 1
0
void Dialog::performConnections()
{
    connect(socketClient, SIGNAL(sendOutputText(QString)),this, SLOT(setOutputText(QString)));
    connect(socketClient, SIGNAL(alertConnectionState(bool)),this, SLOT(changeBtConnectState(bool)));
    connect(socketClient, SIGNAL(sendConnectionError(QString)),this, SLOT(displayConnectionError(QString)));

    connect(ui->btCon, SIGNAL(clicked(bool)),this, SLOT(tryConnection(bool)));
    connect(ui->btSend, SIGNAL(clicked(bool)),this, SLOT(sendMessage(bool)));
}
Exemplo n.º 2
0
CustomMessageBox::CustomMessageBox(MessageType msgType, QWidget *parent, const unsigned short table) : QDialog(parent, Qt::FramelessWindowHint), _clickOnWindow(false), _type(msgType)
{

    this->setAttribute(Qt::WA_TranslucentBackground);

    _menu = new MinCloseMenu(this);
    _menu->setStyleSheet("QPushButton#Cross{background-image: url(none);}QPushButton#mini{margin-right: 5px;}QPushButton{background-color: rgba(255, 255, 255, 0);margin: 0px;padding: 0px;}QPushButton:pressed{color: rgb(255,169,50);}");
    _label = new QLabel(this);

    _okBouton = new QPushButton("Ok", this);
    _okBouton->setAttribute(Qt::WA_TranslucentBackground);
    _okBouton->setObjectName("OkBouton");
    _okBouton->setStyleSheet("QPushButton#OkBouton{background-color: rgba(255, 255, 255, 0);color: rgb(144,191,79);}");

    switch(_type)
    {
    case ConnectionError:
        displayConnectionError();
        break;
    case NewUpdate:
        displayNewUpdate();
        break;
    case NoUpdateMsg:
        displayNoUpdate();
        break;
    case Trick:
        displayTricks(table);
        break;
    case CannotMediumMode:

    case CannotHardMode:
        displayCannotAMode();
        break;
    case CannotDoThisTable:
        displayCannotDoATable(table);
        break;
    }

    connect(_okBouton, SIGNAL(clicked()), this, SLOT(close()));
}