예제 #1
0
//////////////////////////////////////////////////////////////
/// \brief QQCmdToolButtons::QQCmdToolButtons
/// \param parent
///
QQCmdToolButtons::QQCmdToolButtons(QWidget *parent) :
	QWidget(parent),
	ui(new Ui::QQCmdToolButtons)
{
	ui->setupUi(this);

	connect(ui->optionsPushButton, SIGNAL(clicked()), this, SLOT(optionsButtonClicked()));
}
예제 #2
0
MyCameraWindow::MyCameraWindow(CvCapture *cam, QWidget *parent) : QWidget(parent) {
    camera = cam;
    layout = new QGridLayout();
    cvwidget = new QOpenCVWidget(this);
    layout->addWidget(cvwidget,0,0,1,3);
    closeButton = new QCommandLinkButton(tr("Close"));
    optionsButton = new QCommandLinkButton(tr("Options"));
    captureButton = new QCommandLinkButton(tr("Capture Image"));
    layout->addWidget(closeButton,1,2);
    layout->addWidget(optionsButton,1,0);
    layout->addWidget(captureButton,1,1);
    setLayout(layout);
    resize(640, 480);

    connect(closeButton,SIGNAL(clicked()),this,SLOT(closeButtonClicked()));
    connect(captureButton,SIGNAL(clicked()),this,SLOT(captureButtonClicked()));
    connect(optionsButton,SIGNAL(clicked()),this,SLOT(optionsButtonClicked()));

    startTimer(40);  // 25 fps = 40ms
 }
예제 #3
0
Container::Container(QWidget *parent, Qt::WindowFlags flags)
  : QMainWindow(parent, flags)
{
	this->setWindowIcon(QIcon(":/images/openirc.png"));
	this->setWindowTitle("OpenIRC");

	qDebug() << "default IRC Server:" << Config::defaultServer() << endl;

	this->menu_File_Exit = new QAction(this);
	this->menubar = new QMenuBar(this);
	this->menu_File = new QMenu(this->menubar);
	this->setMenuBar(this->menubar);

	this->menubar->addAction(this->menu_File->menuAction());
	this->menu_File->addAction(this->menu_File_Exit);

	this->menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8));
	this->menu_File_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8));

	// Create the mdi area
	this->mdiArea = new QMdiArea(this);
	this->setCentralWidget(this->mdiArea);

	// Create the dock window
	this->contextBar = new ContextBar(this, 0);
	this->addDockWidget(Qt::TopDockWidgetArea, this->contextBar);

	this->windowTree = new WindowTree(mdiArea, this, 0);
	this->addDockWidget(Qt::LeftDockWidgetArea, this->windowTree);

	connect(this->windowTree, SIGNAL(windowItemClicked(MdiWindow *)), this, SLOT(windowItemClicked(MdiWindow *)));

	this->statusbar = new QStatusBar(this);
	this->statusbar->setObjectName(QString::fromUtf8("statusbar"));
	this->setStatusBar(statusbar);

	// Connect the contextbar signals
	connect(this->contextBar, SIGNAL(optionsClicked()), this, SLOT(optionsButtonClicked()));
	connect(this->contextBar, SIGNAL(serversClicked()), this, SLOT(serversButtonClicked()));
	connect(this->contextBar, SIGNAL(tileClicked()), this, SLOT(tileButtonClicked()));
	connect(this->contextBar, SIGNAL(tileCascadeClicked()), this, SLOT(tileCascadeButtonClicked()));
	connect(this->contextBar, SIGNAL(previousWindowClicked()), this, SLOT(previousWindowButtonClicked()));
	connect(this->contextBar, SIGNAL(nextWindowClicked()), this, SLOT(nextWindowButtonClicked()));

	parser = new CommandParser(this);

	ctrlB = new QAction(this);
	ctrlU = new QAction(this);
	ctrlK = new QAction(this);
	ctrlI = new QAction(this);
	ctrlO = new QAction(this);

	ctrlB->setShortcut(Qt::CTRL + Qt::Key_B);
	ctrlU->setShortcut(Qt::CTRL + Qt::Key_U);
	ctrlK->setShortcut(Qt::CTRL + Qt::Key_K);
	ctrlI->setShortcut(Qt::CTRL + Qt::Key_I);
	ctrlO->setShortcut(Qt::CTRL + Qt::Key_O);

	this->addAction(ctrlB);
	this->addAction(ctrlU);
	this->addAction(ctrlK);
	this->addAction(ctrlI);
	this->addAction(ctrlO);

	// Connect the color actions
	connect(ctrlB, SIGNAL(triggered(bool)), this, SLOT(ctrlBTriggered(bool)));
	connect(ctrlU, SIGNAL(triggered(bool)), this, SLOT(ctrlUTriggered(bool)));
	connect(ctrlK, SIGNAL(triggered(bool)), this, SLOT(ctrlKTriggered(bool)));
	connect(ctrlI, SIGNAL(triggered(bool)), this, SLOT(ctrlITriggered(bool)));
	connect(ctrlO, SIGNAL(triggered(bool)), this, SLOT(ctrlOTriggered(bool)));

	this->readConfigFile();
	this->newStatusWindow();
	//this->newPictureWindow();
}