예제 #1
0
파일: Tray.cpp 프로젝트: coderwoo/QAltRun
Tray::Tray(QObject *parent) :
    QSystemTrayIcon(parent)
{
    QIcon icon("icon\\trayIcon.png");
    this->setIcon(icon);
    this->setToolTip("AltRun");

    createContextMenu();

    connect ( this,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
              this,SLOT(activatedSlot(QSystemTrayIcon::ActivationReason)) );

 //   shortcut = new QxtGlobalShortcut(QKeySequence("Alt+t"), this);
 //   QObject::connect(shortcut, SIGNAL(activated()),this, SLOT(showDlgSlot()));
}
예제 #2
0
TrayIcon::TrayIcon(const QString& trayIcon,const QString& programName, QObject *parent) :
    QSystemTrayIcon(QIcon(trayIcon),parent)
{
    setToolTip(programName);

    pMenu=new QMenu;
    pMenu->addAction("Головне вікно",this,SIGNAL(mainWindowSignal()));
    pMenu->addAction("Вікно налаштувань",this,SIGNAL(settingsSignal()));
    pMenu->addAction("Оновити курси",this,SIGNAL(updateSignal()));
    pMenu->addSeparator();
    pMenu->addAction("Вийти",qApp,SLOT(quit()));
    setContextMenu(pMenu);

    connect(this,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
            SLOT(activatedSlot(QSystemTrayIcon::ActivationReason)));
}
예제 #3
0
GTreeView::GTreeView(QWidget *parent,VM *pVM)  : QTreeView(parent)
{
	this->pVM = pVM;
	this->pParaList = ring_list_new(0);
	strcpy(this->ccollapsedEvent,"");
	strcpy(this->cexpandedEvent,"");
	strcpy(this->cactivatedEvent,"");
	strcpy(this->cclickedEvent,"");
	strcpy(this->cdoubleClickedEvent,"");
	strcpy(this->centeredEvent,"");
	strcpy(this->cpressedEvent,"");
	strcpy(this->cviewportEnteredEvent,"");

	QObject::connect(this, SIGNAL(collapsed(QModelIndex)),this, SLOT(collapsedSlot()));
	QObject::connect(this, SIGNAL(expanded(QModelIndex)),this, SLOT(expandedSlot()));
	QObject::connect(this, SIGNAL(activated(QModelIndex)),this, SLOT(activatedSlot()));
	QObject::connect(this, SIGNAL(clicked(QModelIndex)),this, SLOT(clickedSlot()));
	QObject::connect(this, SIGNAL(doubleClicked(QModelIndex)),this, SLOT(doubleClickedSlot()));
	QObject::connect(this, SIGNAL(entered(QModelIndex)),this, SLOT(enteredSlot()));
	QObject::connect(this, SIGNAL(pressed(QModelIndex)),this, SLOT(pressedSlot()));
	QObject::connect(this, SIGNAL(viewportEntered()),this, SLOT(viewportEnteredSlot()));

}