Example #1
0
OpenGUI::OpenGUI(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::OpenGUI)
{
    admin = new MediaControl();
    ui->setupUi(this);
    connect(ui->pushButton_2, SIGNAL(clicked()), this, SLOT(handleButton()));
    connect(ui->pushButton_3, SIGNAL(clicked()), this, SLOT(handleButtonPause()));
    connect(ui->pushButton_5, SIGNAL(clicked()), this, SLOT(handleButtonUp()));
    connect(ui->pushButton_6, SIGNAL(clicked()), this, SLOT(handleButtonDown()));
}
Example #2
0
AddClientDialog::AddClientDialog(const QString& clientName, QWidget* parent) :
	QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
	Ui::AddClientDialog(),
	m_AddResult(kAddClientIgnore),
	m_IgnoreAutoConfigClient(false)
{
	setupUi(this);

	m_pLabelHead->setText("A client wants to connect. "
					"Please choose a location for " + clientName + ".");

	QIcon icon(":res/icons/64x64/video-display.png");
	QSize IconSize(32,32);

	m_pButtonLeft = new QPushButton(this);
	m_pButtonLeft->setIcon(icon);
	m_pButtonLeft->setIconSize(IconSize);
	gridLayout->addWidget(m_pButtonLeft, 2, 0, 1, 1, Qt::AlignCenter);
	connect(m_pButtonLeft, SIGNAL(clicked()), this, SLOT(handleButtonLeft()));

	m_pButtonUp = new QPushButton(this);
	m_pButtonUp->setIcon(icon);
	m_pButtonUp->setIconSize(IconSize);
	gridLayout->addWidget(m_pButtonUp, 1, 1, 1, 1, Qt::AlignCenter);
	connect(m_pButtonUp, SIGNAL(clicked()), this, SLOT(handleButtonUp()));

	m_pButtonRight = new QPushButton(this);
	m_pButtonRight->setIcon(icon);
	m_pButtonRight->setIconSize(IconSize);
	gridLayout->addWidget(m_pButtonRight, 2, 2, 1, 1, Qt::AlignCenter);
	connect(m_pButtonRight, SIGNAL(clicked()), this, SLOT(handleButtonRight()));

	m_pButtonDown = new QPushButton(this);
	m_pButtonDown->setIcon(icon);
	m_pButtonDown->setIconSize(IconSize);
	gridLayout->addWidget(m_pButtonDown, 3, 1, 1, 1, Qt::AlignCenter);
	connect(m_pButtonDown, SIGNAL(clicked()), this, SLOT(handleButtonDown()));

	m_pLabelCenter = new QLabel(this);
	m_pLabelCenter->setPixmap(QPixmap(":res/icons/64x64/video-display.png"));
	gridLayout->addWidget(m_pLabelCenter, 2, 1, 1, 1, Qt::AlignCenter);

#if defined(Q_OS_MAC)
	m_pDialogButtonBox->setLayoutDirection(Qt::RightToLeft);
#endif

	QPushButton* advanced = m_pDialogButtonBox->addButton("Advanced",
													QDialogButtonBox::HelpRole);
	connect(advanced, SIGNAL(clicked()), this, SLOT(handleButtonAdvanced()));
}