Example #1
0
void XMLScene::display()
{

	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
	activeCamera->applyView();
	//axis.draw();
	/*glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	sceneCameras[camera].second->applyView();
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();*/
	//draw lights

	selectDrawMode();
	unsigned int initial=files[option]->sceneLights[0]->getLightId();
	unsigned int finalId=files[option]->sceneLights[files[option]->sceneLights.size()-1]->getLightId();
	for(unsigned int i=initial;i<finalId;i++)
	{
		if(activeLights[i]==1)
		{

			files[option]->sceneLights[i]->enable();
			files[option]->sceneLights[i]->draw();
		}
		else
			files[option]->sceneLights[i]->disable();

		files[option]->sceneLights[i]->update();
	}

	//end of draw lights
	glPushMatrix();
	drawObjects();
	glPopMatrix();
	pieces->draw();
	board->draw();



	//if theme is changed
	if(lastOption!=option)
	{
		pieces->setOption(option);
		changeTheme();
		pieces->setOption(option);
		changeTheme();
		lastOption=option;

	}
	glutSwapBuffers();
}
Example #2
0
void ThemeWidget::initData() {
//    list_widget = new NormalWidget(150, 150, 20, this);
    list_widget = new NormalWidget(119, 139, 20, this);
    list_widget->setGeometry(QRect(30, 55, 860, 330));
    list_widget->calculate_data();

    QString current_theme = sessionproxy->get_theme_qt();
    /*QStringList */syslist = sessionproxy->get_themes_qt();
    card_list.clear();
    QSignalMapper *signal_mapper = new QSignalMapper(this);
    for(int i = 0; i<syslist.length(); ++i)
    {
        NormalCard *card = new NormalCard(syslist[i], list_widget->cardPanel);
        card_list.append(card);
        if(current_theme == syslist[i]) {
            card->showUsingLogo(true);
        }
        list_widget->add_card(card);
        connect(card, SIGNAL(sendSelectThemeName(QString)), signal_mapper, SLOT(map()));
        signal_mapper->setMapping(card, QString::number(i, 10));
        connect(signal_mapper, SIGNAL(mapped(QString)), this, SLOT(switchUsingLogo(QString)));
        connect(card, SIGNAL(sendSelectThemeName(QString)), this, SLOT(changeTheme(QString)));
    }
    dataOK = true;
    this->initConnect();
}
Example #3
0
void DropShadowWindow::setBackgroundImageURL(QString url)
{
	m_BackgroundImageURL = url;
	m_BackgroundImage = new QPixmap(url);
	m_Img = new QImage(url);

	changeTheme();
}
Example #4
0
void XMLScene::display()
{
	static int i=0;
	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
	//axis.draw();
	/*
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();

	int viewport[]={0,0,0,0};
	glGetIntegerv(GL_VIEWPORT,viewport);
	glViewport(0,0,viewport[2],viewport[3]);
	//file->sceneCameras[camera].second->updateProjectionMatrix(viewport[2],viewport[3]);
	file->sceneCameras[camera].second->applyView();
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
	*/
	//activeCamera->setZ(-20);
	activeCamera->applyView();
	printScoreBoard();
	//draw lights

	selectDrawMode();
	for(unsigned int i=0;i<file->sceneLights.size();i++)
	{
		if(activeLights[i]==1)
		{

			file->sceneLights[i]->enable();
			file->sceneLights[i]->draw();
		}
		else
			file->sceneLights[i]->disable();

		file->sceneLights[i]->update();
	}

	//end of draw lights
	glPushMatrix();
	drawObjects();
	glPopMatrix();
	data->getBoard()->draw();



	//if theme is changed
	if(lastOption!=option)
	{
		data->getBoard()->setPieceOption(option);
		changeTheme();
		lastOption=option;
	}
	i++;
	glutSwapBuffers();
}
Example #5
0
Settings::Settings( Core *coreSettings, QWidget *parent ) :
        QDialog( parent ),
        updateAccountsOnExit( false ),
        core( coreSettings ),
        pluginManagerTab(0)
{
    // Sorry, but this has to be here and not in Qtwitter::Qtwitter() for the core to be aware
    // of the signal emitted in Settings::Settings()
    connect( this, SIGNAL(createAccounts(QWidget*)), core, SLOT(createAccounts(QWidget*)) );

    ui.setupUi( this );

    themes.insert( Themes::STYLESHEET_COCOA.first,   Themes::STYLESHEET_COCOA.second);
    themes.insert( Themes::STYLESHEET_GRAY.first,    Themes::STYLESHEET_GRAY.second);
    themes.insert( Themes::STYLESHEET_GREEN.first,   Themes::STYLESHEET_GREEN.second);
    themes.insert( Themes::STYLESHEET_PURPLE.first,  Themes::STYLESHEET_PURPLE.second);
    themes.insert( Themes::STYLESHEET_SKY.first,     Themes::STYLESHEET_SKY.second);

    for (int i = 0; i < themes.keys().size(); ++i ) {
        ui.colorBox->addItem( themes.keys()[i] );
    }

    createLanguageMenu();

#ifdef Q_WS_X11
    QHBoxLayout *hlayout = new QHBoxLayout;

    useCustomBrowserCheckBox = new QCheckBox( tr( "Use custom web browser" ), ui.networkTab );
    selectBrowserEdit = new QLineEdit( ui.networkTab );
    selectBrowserButton = new QPushButton( tr( "Browse" ), ui.networkTab );

    hlayout->addWidget(selectBrowserEdit);
    hlayout->addWidget(selectBrowserButton);
    ui.verticalLayout_2->addWidget(useCustomBrowserCheckBox);
    ui.verticalLayout_2->addLayout(hlayout);

    selectBrowserEdit->setEnabled( false );
    selectBrowserButton->setEnabled( false );


    connect( useCustomBrowserCheckBox, SIGNAL(toggled(bool)), selectBrowserEdit, SLOT(setEnabled(bool)) );
    connect( useCustomBrowserCheckBox, SIGNAL(toggled(bool)), selectBrowserButton, SLOT(setEnabled(bool)) );
    connect( selectBrowserButton, SIGNAL(clicked()), this, SLOT(setBrowser()) );
#endif

    connect( ui.languageCombo, SIGNAL( currentIndexChanged( int )), this, SLOT( switchLanguage( int ) ) );
    connect( ui.colorBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(changeTheme(QString)) );
    connect( ui.checkNowButton, SIGNAL(clicked()), this, SLOT(checkForUpdate()) );
    ui.portEdit->setValidator( new QIntValidator( 1, 65535, this ) );

    emit createAccounts( ui.widget );
    //  loadConfig();
}
Example #6
0
void DropShadowWindow::setBackground(eBKMode bkMode, QString bkImageURL)
{
	m_BackgroundMode = bkMode;
	m_BackgroundImageURL = bkImageURL;
	m_BackgroundImage = new QPixmap(bkImageURL);

	QImage *img = new QImage(bkImageURL);
	//QImage img = QImage(bkImageURL);
	//m_Img = get_blurred_image(*img, img->rect(), 2, false);
	m_Img = get_blurred_image(*img, img->rect(), 2, false);
	//qt_blurImage(*img, 50, true,false);
 
	changeTheme();
}
Example #7
0
/** \reimp */
void RzxNotifier::propInit(bool def)
{
	ui->chkBeepFavorites->setChecked(RzxNotifierConfig::beepConnection(def));
	ui->txtBeepFavorites->setText(RzxNotifierConfig::beepSound(def));
	ui->cbHere->setChecked(RzxNotifierConfig::notifyHere(def));
	ui->cbDisconnect->setChecked(RzxNotifierConfig::notifyDisconnection(def));
	ui->cbAway->setChecked(RzxNotifierConfig::notifyAway(def));
	ui->cbILeave->setChecked(RzxNotifierConfig::notNotifyWhenILeave(def));
	ui->cbNotifyChat->setChecked(RzxNotifierConfig::notifyChat(def));
	ui->cbNoChatForeground->setChecked(!RzxNotifierConfig::notifyChatWhenFocus(def));

	changeTheme();
	translate();

	ui->cbStyleConnection->setCurrentIndex(RzxNotifierConfig::windowStyle());
	ui->cbStyleChat->setCurrentIndex(RzxNotifierConfig::chatWindowStyle());
}
Example #8
0
/** La construction consiste juste à mettre en place les connexions qvb
 */
RzxNotifier::RzxNotifier()
	:RzxModule(RZX_MODULE_NAME, QT_TRANSLATE_NOOP("RzxBaseModule", "Notify that a favorite state has changed"), RZX_MODULE_VERSION)
{
	beginLoading();
	favoriteWarn = false;
	ui = NULL;
	propWidget = NULL;
	setType(MOD_GUI);
	setIcon(RZX_MODULE_ICON);
	new RzxNotifierConfig(this);
	connect(RzxConnectionLister::global(), SIGNAL(login(RzxComputer* )), this, SLOT(login(RzxComputer* )));
	connect(RzxConnectionLister::global(), SIGNAL(initialLoging(bool)), this, SLOT(ignoreLoging(bool)));
	RzxTranslator::connect(this, SLOT(translate()));
	RzxIconCollection::connect(this, SLOT(changeTheme()));
	if(RzxConnectionLister::global()->computerNumber())
		ignoreLoging(false);
#ifdef Q_OS_MAC
	installGrowlSupport();
#endif

	endLoading();
}
Example #9
0
void MainWindow::setupThemes()
{
    QAction* act;

    act = ui->menuThemes->addAction("Polybox3D");
    connect(act,SIGNAL(triggered()),this, SLOT(changeTheme()));
    act = ui->menuThemes->addAction("Fusion White");
    connect(act,SIGNAL(triggered()),this, SLOT(changeTheme()));

    act = ui->menuThemes->addAction("Fusion Dark");
    connect(act,SIGNAL(triggered()),this, SLOT(changeTheme()));

    act = ui->menuThemes->addAction("Fusion Purple");
    connect(act,SIGNAL(triggered()),this, SLOT(changeTheme()));

    act = ui->menuThemes->addAction("Fusion Clean");
    connect(act,SIGNAL(triggered()),this, SLOT(changeTheme()));

    act = ui->menuThemes->addAction("White");
    connect(act,SIGNAL(triggered()),this, SLOT(changeTheme()));

}
Example #10
0
void DropShadowWindow::setBackgroundMode(eBKMode mode)
{
	m_BackgroundMode = mode; 
	changeTheme(); 
}
Example #11
0
void BitcoinGUI::createActions()
{
    QActionGroup *tabGroup = new QActionGroup(this);

    overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this);
    overviewAction->setToolTip(tr("Show general overview of wallet"));
    overviewAction->setCheckable(true);
    overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
    tabGroup->addAction(overviewAction);
	
	statisticsAction = new QAction(QIcon(":/icons/statistics"), tr("&Statistics"), this);
    statisticsAction->setToolTip(tr("View statistics"));
    statisticsAction->setCheckable(true);
    tabGroup->addAction(statisticsAction);

    chatAction = new QAction(QIcon(":/icons/social"), tr("&Social/Exchange"), this);
    chatAction->setToolTip(tr("View chat, links to social media and exchanges"));
    chatAction->setCheckable(true);
    tabGroup->addAction(chatAction);

    sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this);
    sendCoinsAction->setToolTip(tr("Send coins to a ColossusCoin2 address"));
    sendCoinsAction->setCheckable(true);
    sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
    tabGroup->addAction(sendCoinsAction);

    receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive coins"), this);
    receiveCoinsAction->setToolTip(tr("Show the list of addresses for receiving payments"));
    receiveCoinsAction->setCheckable(true);
    receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
    tabGroup->addAction(receiveCoinsAction);

    historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this);
    historyAction->setToolTip(tr("Browse transaction history"));
    historyAction->setCheckable(true);
    historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
    tabGroup->addAction(historyAction);

    addressBookAction = new QAction(QIcon(":/icons/address-book"), tr("&Address Book"), this);
    addressBookAction->setToolTip(tr("Edit the list of stored addresses and labels"));
    addressBookAction->setCheckable(true);
    addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
    tabGroup->addAction(addressBookAction);
	
	blockAction = new QAction(QIcon(":/icons/block"), tr("&Block Explorer"), this);
    blockAction->setToolTip(tr("Explore the BlockChain"));
    blockAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
    blockAction->setCheckable(true);
    tabGroup->addAction(blockAction);

	connect(blockAction, SIGNAL(triggered()), this, SLOT(gotoBlockBrowser()));
    connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
    connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
	connect(statisticsAction, SIGNAL(triggered()), this, SLOT(gotoStatisticsPage()));
	connect(chatAction, SIGNAL(triggered()), this, SLOT(gotoChatPage()));
    connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
    connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
    connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
    connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
    connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
    connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
    connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
    connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage()));

    quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
    quitAction->setToolTip(tr("Quit application"));
    quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
    quitAction->setMenuRole(QAction::QuitRole);
    aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About ColossusCoin2"), this);
    aboutAction->setToolTip(tr("Show information about ColossusCoin2"));
    aboutAction->setMenuRole(QAction::AboutRole);
	
	charityAction = new QAction(QIcon(":/icons/bitcoin"), tr("&Stake For Charity"), this);
    charityAction->setToolTip(tr("Enable Stake For Charity"));
    charityAction->setMenuRole(QAction::AboutRole);
	
    aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this);
    aboutQtAction->setToolTip(tr("Show information about Qt"));
    aboutQtAction->setMenuRole(QAction::AboutQtRole);
    optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
    optionsAction->setToolTip(tr("Modify configuration options for ColossusCoin2"));
    optionsAction->setMenuRole(QAction::PreferencesRole);
    toggleHideAction = new QAction(QIcon(":/icons/bitcoin"), tr("&Show / Hide"), this);
    encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
    encryptWalletAction->setToolTip(tr("Encrypt or decrypt wallet"));
    encryptWalletAction->setCheckable(true);
    backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
    backupWalletAction->setToolTip(tr("Backup wallet to another location"));
    changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this);
    changePassphraseAction->setToolTip(tr("Change the passphrase used for wallet encryption"));
    unlockWalletAction = new QAction(QIcon(":/icons/lock_open"), tr("&Unlock Wallet..."), this);
    unlockWalletAction->setToolTip(tr("Unlock wallet"));
    lockWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Lock Wallet"), this);
    lockWalletAction->setToolTip(tr("Lock wallet"));
    signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this);
    verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
	checkWalletAction = new QAction(QIcon(":/icons/transaction_confirmed"), tr("&Check Wallet..."), this);
	checkWalletAction->setStatusTip(tr("Check wallet integrity and report findings"));
	repairWalletAction = new QAction(QIcon(":/icons/options"), tr("&Repair Wallet..."), this);
	repairWalletAction->setStatusTip(tr("Fix wallet integrity and remove orphans"));
    exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this);
    exportAction->setToolTip(tr("Export the data in the current tab to a file"));
    openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this);
    openRPCConsoleAction->setToolTip(tr("Open debugging and diagnostic console"));

    connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
    connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
	connect(charityAction, SIGNAL(triggered()), this, SLOT(charityClicked()));
    connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
    connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
    connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
    connect(encryptWalletAction, SIGNAL(triggered(bool)), this, SLOT(encryptWallet(bool)));
	connect(checkWalletAction, SIGNAL(triggered()), this, SLOT(checkWallet()));
	connect(repairWalletAction, SIGNAL(triggered()), this, SLOT(repairWallet()));
    connect(backupWalletAction, SIGNAL(triggered()), this, SLOT(backupWallet()));
    connect(changePassphraseAction, SIGNAL(triggered()), this, SLOT(changePassphrase()));
    connect(unlockWalletAction, SIGNAL(triggered()), this, SLOT(unlockWallet()));
    connect(lockWalletAction, SIGNAL(triggered()), this, SLOT(lockWallet()));
    connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
    connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
	
	/* zeewolf: Hot swappable wallet themes */
    if (themesList.count()>0)
    {
        QSignalMapper* signalMapper = new QSignalMapper (this) ;
        //QActionGroup* menuActionGroup = new QActionGroup( this );
        //menuActionGroup->setExclusive(true);

        // Add custom themes (themes directory)
        for( int i=0; i < themesList.count(); i++ )
        {
            QString theme=themesList[i];
            customActions[i] = new QAction(QIcon(":/icons/options"), theme, this);
            customActions[i]->setToolTip(QString("Switch to " + theme + " theme"));
            customActions[i]->setStatusTip(QString("Switch to " + theme + " theme"));
            //customActions[i]->setActionGroup(menuActionGroup);
            signalMapper->setMapping(customActions[i], theme);
            connect(customActions[i], SIGNAL(triggered()), signalMapper, SLOT (map()));
        }
        connect(signalMapper, SIGNAL(mapped(QString)), this, SLOT(changeTheme(QString)));
    }
    /* zeewolf: Hot swappable wallet themes */
}