Exemple #1
0
connectDialog::connectDialog(QWidget *parent) : QDialog(parent) {

	setupUi(this) ;

	connect(serversButton,SIGNAL(clicked()),this,SLOT(serversClicked())) ;
	connect(connectButton,SIGNAL(clicked()),this,SLOT(connectClicked())) ;
	connect(quitButton,SIGNAL(clicked()),qApp,SLOT(quit())) ;

	updateList() ;

}
Exemple #2
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();
}