WidgetDiscovery::WidgetDiscovery(QWidget* parent) : QMainWindow(parent), ui(new Ui::WidgetDiscovery) { ui->setupUi(this); m_pDiscoveryMenu = new QMenu( this ); m_pDiscoveryMenu->addAction( ui->actionDiscoveryAddService ); m_pDiscoveryMenu->addAction( ui->actionDiscoveryRemoveService ); m_pDiscoveryMenu->addAction( ui->actionDiscoveryQueryNow ); m_pDiscoveryMenu->addAction( ui->actionDiscoveryAdvertise ); restoreState( quazaaSettings.WinMain.DiscoveryToolbar ); tableViewDiscovery = new CTableView(); tableViewDiscovery->verticalHeader()->setVisible( false ); ui->verticalLayoutDiscoveryTable->addWidget( tableViewDiscovery ); connect(tableViewDiscovery, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(tableViewDiscovery_customContextMenuRequested(QPoint))); connect(tableViewDiscovery, SIGNAL(clicked(QModelIndex)), this, SLOT(tableViewDiscovery_clicked(QModelIndex))); connect(tableViewDiscovery, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(tableViewDiscovery_doubleClicked(QModelIndex))); //m_pDiscoveryList = new CDiscoveryTableModel( this, tableView() ); //setModel( m_pDiscoveryList ); //m_pDiscoveryList->sort( tableViewDiscovery->horizontalHeader()->sortIndicatorSection(), // tableViewDiscovery->horizontalHeader()->sortIndicatorOrder() ); setSkin(); }
CDialogSelectVisualisation::CDialogSelectVisualisation(QWidget* parent) : QDialog(parent), ui(new Ui::CDialogSelectVisualisation) { ui->setupUi(this); setSkin(); }
CDialogTransferProgressTooltip::CDialogTransferProgressTooltip( QWidget* parent ) : QDialog( parent ), ui( new Ui::CDialogTransferProgressTooltip ) { ui->setupUi( this ); setSkin(); }
CWidgetSearchTemplate::CWidgetSearchTemplate(QString searchString, QWidget* parent) : QWidget(parent), ui(new Ui::CWidgetSearchTemplate) { ui->setupUi(this); searchMenu = new QMenu(this); searchMenu->addAction(ui->actionDownload); searchMenu->addSeparator(); searchMenu->addAction(ui->actionBanNode); searchMenu->addAction(ui->actionMarkAsJunk); searchMenu->addAction(ui->actionClearResults); searchMenu->addSeparator(); searchMenu->addAction(ui->actionViewReviews); searchMenu->addAction(ui->actionVirusTotalCheck); m_sSearchString = searchString; m_pSearch = 0; m_nFiles = 0; m_nHits = 0; m_nHubs = 0; m_nLeaves = 0; m_searchState = SearchState::Default; m_pSortModel = new QSortFilterProxyModel(this); m_pSearchModel = new SearchTreeModel(); m_pSortModel->setSourceModel(m_pSearchModel); ui->treeViewSearchResults->setModel(m_pSortModel); m_pSortModel->setDynamicSortFilter(false); connect(m_pSearchModel, SIGNAL(sort()), this, SLOT(Sort())); connect(m_pSearchModel, SIGNAL(updateStats()), this, SLOT(OnStatsUpdated())); loadHeaderState(); connect(ui->treeViewSearchResults->header(), SIGNAL(sectionMoved(int,int,int)), this, SLOT(saveHeaderState())); connect(ui->treeViewSearchResults->header(), SIGNAL(sectionResized(int,int,int)), this, SLOT(saveHeaderState())); connect(ui->treeViewSearchResults->header(), SIGNAL(sectionClicked(int)), this, SLOT(saveHeaderState())); setSkin(); }
void Pod::uncloakPod() { if (mtype == POD_HAZARD || podShape == POD_SHAPE_UNKNOWN) return; switch (podColor) { case POD_COLOR_BLUE: materialName = "General/PodBlue"; break; case POD_COLOR_GREEN: materialName = "General/PodGreen"; break; case POD_COLOR_PINK: materialName = "General/PodRed"; break; case POD_COLOR_YELLOW: materialName = "General/PodYellow"; break; case POD_COLOR_PURPLE: materialName = "General/PodPurple"; break; default: materialName = "General/PodWhite"; break; } setSkin(); //if (!podTrigger) generateGlow(podColor, podShape); }
void Geometry::setAnimation( const std::string& fileName ) { // tinyxml2::XMLDocument doc; if (tinyxml2::XML_SUCCESS != doc.LoadFile(fileName.c_str())) { return; } tinyxml2::XMLElement* r = doc.RootElement(); tinyxml2::XMLElement* tex= r->FirstChildElement("animation"); while (tex) { sAnimation an; an.name = tex->Attribute("name"); an.skinFile = tex->Attribute("skin"); an.duration = tex->IntAttribute("duration"); mAnimations[an.name] = an; tex = tex->NextSiblingElement("animation"); } // std::string parentPath = Buddha::FileSystem::getInstancePtr()->getParent(fileName); parentPath = Buddha::FileSystem::getInstancePtr()->getParent(parentPath); setSkin(parentPath + "/" + mAnimations.begin()->second.skinFile); mAniTime.current = 0; mAniTime.start = 0; mAniTime.end = mAnimations.begin()->second.duration; }
DialogSecuritySubscriptions::DialogSecuritySubscriptions(QWidget* parent) : QDialog(parent), ui(new Ui::DialogSecuritySubscriptions) { ui->setupUi(this); setSkin(); }
ChampTexte::ChampTexte ( sf::Vector2f taille , std::shared_ptr<Skin> skin ) : m_type ( sans ) , m_grpUI ( new Groupe ( ) ) , m_lbl ( new Label ( ) ) , m_btn ( new BoutonEncoche ( skin , false ) ) , m_curseur ( sf::RectangleShape ( ) ) , m_timerClignot ( ) , m_clignot ( false ) { m_btn->setSize ( taille ); m_curseur.setSize ( {0 , 20} ); initLocalSkin (); initUI(); // les skin setSkin ( skin ); // integration dans le groupe UI m_grpUI->setParent ( this ); m_grpUI->ajouter ( m_btn ); m_grpUI->ajouter ( m_lbl ); }
int QtScrollWheel::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QAbstractSlider::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = skin(); break; } _id -= 1; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setSkin(*reinterpret_cast< QString*>(_v)); break; } _id -= 1; } else if (_c == QMetaObject::ResetProperty) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 1; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 1; } #endif // QT_NO_PROPERTIES return _id; }
void Pod::uncloakPod() { if (mtype == POD_HAZARD || mtype == POD_POWERUP) return; switch (podColor) { case POD_COLOR_BLUE: materialName = "General/PodBlue"; break; case POD_COLOR_GREEN: materialName = "General/PodGreen"; break; case POD_COLOR_PINK: materialName = "General/PodRed"; break; case POD_COLOR_YELLOW: materialName = "General/PodYellow"; break; case POD_COLOR_PURPLE: materialName = "General/PodPurple"; break; case POD_COLOR_ORANGE: materialName = "General/PodOrange"; break; case POD_COLOR_HOLDOUT: materialName = "General/PodUnknown"; break; default: materialName = "General/PodUnknown"; break; } if (podTaken || isIndicatorVisible()) materialName += "Transparent"; setSkin(); }
Skin::Skin (const QString &url) { setSizes (); setPositions (); m_valid = setSkin (url); }
//! constructor CGUIEnvironment::CGUIEnvironment(io::IFileSystem* fs, video::IVideoDriver* driver, IOSOperator* op) : IGUIElement(EGUIET_ELEMENT, 0, 0, 0, core::rect<s32>(core::position2d<s32>(0,0), driver ? driver->getScreenSize() : core::dimension2d<s32>(0,0))), Hovered(0), CurrentSkin(0), Driver(driver), Focus(0), FileSystem(fs), UserReceiver(0), Operator(op) { if (Driver) Driver->grab(); if (FileSystem) FileSystem->grab(); if (Operator) Operator->grab(); #ifdef _DEBUG IGUIEnvironment::setDebugName("CGUIEnvironment IGUIEnvironment"); IGUIElement::setDebugName("CGUIEnvironment IGUIElement"); #endif loadBuidInFont(); IGUISkin* skin = createSkin(EGST_WINDOWS_METALLIC); setSkin(skin); skin->drop(); }
CDialogAddSecuritySubscription::CDialogAddSecuritySubscription( QWidget* parent ) : QDialog( parent ), ui( new Ui::CDialogAddSecuritySubscription ) { ui->setupUi( this ); setSkin(); }
DialogAddDownload::DialogAddDownload(QWidget* parent) : QDialog(parent), ui(new Ui::DialogAddDownload) { ui->setupUi(this); setSkin(); }
WidgetSearch::WidgetSearch(QWidget* parent) : QWidget( parent ), ui( new Ui::WidgetSearch ) { ui->setupUi( this ); ui->comboBoxSearchFileType->setView( new QListView() ); ui->comboBoxSearchSizeMax->setView( new QListView() ); ui->comboBoxSearchSizeMin->setView( new QListView() ); ui->splitterSearch->restoreState( quazaaSettings.WinMain.SearchSplitter ); ui->toolButtonSearchFiletypeTaskHeader->setChecked( quazaaSettings.WinMain.SearchFileTypeTaskVisible ); ui->toolButtonSearchNetworksTaskHeader->setChecked( quazaaSettings.WinMain.SearchNetworksTaskVisible ); ui->toolButtonSearchResultsTaskHeader->setChecked( quazaaSettings.WinMain.SearchResultsTaskVisible ); ui->toolButtonSearchTaskHeader->setChecked( quazaaSettings.WinMain.SearchTaskVisible ); panelSearchResults = new WidgetSearchResults(); ui->verticalLayoutSearchResults->addWidget( panelSearchResults ); connect( panelSearchResults, SIGNAL( searchTabChanged( WidgetSearchTemplate* ) ), this, SLOT( onSearchTabChanged( WidgetSearchTemplate* ) ) ); connect( panelSearchResults, SIGNAL( statsUpdated( WidgetSearchTemplate* ) ), this, SLOT( updateStats( WidgetSearchTemplate* ) ) ); connect( panelSearchResults, SIGNAL( stateChanged() ), this, SLOT( updateButtons() ) ); panelSearchResults->on_tabWidgetSearch_currentChanged( -1 ); setSkin(); // TODO: make some settings to control this thingy CSuggestedLineEdit* pSuggest = new CSuggestedLineEdit( ui->lineEditSearch, this ); pSuggest->setEnableExternal( true ); pSuggest->setMaxRecentItems( 20 ); pSuggest->setNetworkAccessManager( &netManager ); }
CDialogLibrarySearch::CDialogLibrarySearch(QWidget* parent) : QDialog(parent), ui(new Ui::CDialogLibrarySearch) { ui->setupUi(this); setSkin(); }
CDialogDownloadProperties::CDialogDownloadProperties( QWidget* parent ) : QDialog( parent ), ui( new Ui::CDialogDownloadProperties ) { ui->setupUi( this ); setSkin(); }
CWizardQuickStart::CWizardQuickStart(QWidget *parent) : QWizard(parent), ui(new Ui::CWizardQuickStart) { ui->setupUi(this); this->setPixmap(QWizard::LogoPixmap, QPixmap(":/Resource/Quazaa48.png")); ui->comboBoxGender->setView(new QListView()); ui->doubleSpinBoxInSpeed->setValue((quazaaSettings.Connection.InSpeed / 1024) * 8); ui->doubleSpinBoxOutSpeed->setValue((quazaaSettings.Connection.OutSpeed / 1024) * 8); ui->spinBoxPort->setValue(quazaaSettings.Connection.Port); ui->checkBoxRandomPort->setChecked(quazaaSettings.Connection.RandomPort); ui->checkBoxUPnP->setChecked(quazaaSettings.Security.EnableUPnP); ui->checkBoxAllowBrowseShares->setChecked(quazaaSettings.Security.AllowSharesBrowse); ui->listWidgetShares->addItems(quazaaSettings.Library.Shares); ui->checkBoxAllowBrowseProfile->setChecked(quazaaSettings.Security.AllowProfileBrowse); ui->lineEditIrcNick->setText(quazaaSettings.Profile.IrcNickname); ui->lineEditIrcAlternateNick->setText(quazaaSettings.Profile.IrcAlternateNickname); ui->lineEditGnutellaScreenName->setText(quazaaSettings.Profile.GnutellaScreenName); ui->comboBoxGender->setCurrentIndex(quazaaSettings.Profile.Gender); ui->spinBoxAge->setValue(quazaaSettings.Profile.Age); ui->lineEditCountry->setText(quazaaSettings.Profile.Country); ui->lineEditStateProvince->setText(quazaaSettings.Profile.StateProvince); ui->lineEditCity->setText(quazaaSettings.Profile.City); ui->checkBoxG2Connect->setChecked(quazaaSettings.Gnutella2.Enable); ui->checkBoxAresConnect->setChecked(quazaaSettings.Ares.Enable); ui->checkBoxEDonkeyConnect->setChecked(quazaaSettings.EDonkey.Enable); ui->checkBoxKADConnect->setChecked(quazaaSettings.EDonkey.EnableKad); ui->checkBoxBitTorrent->setChecked(quazaaSettings.Web.Torrent); ui->checkBoxBitTorrentKademliaConnect->setChecked(quazaaSettings.BitTorrent.UseKademlia); ui->checkBoxConnectNetworksAlways->setChecked(quazaaSettings.System.ConnectOnStartup); ui->checkBoxOSStart->setChecked(quazaaSettings.System.StartWithSystem); ui->checkBoxSimpleProgress->setChecked(quazaaSettings.Transfers.SimpleProgressBar); ui->checkBoxSlowHashing->setChecked(!quazaaSettings.Library.HighPriorityHashing); setSkin(); }
CWidgetScheduler::CWidgetScheduler( QWidget* parent ) : QMainWindow( parent ), ui( new Ui::CWidgetScheduler ) { ui->setupUi( this ); restoreState( quazaaSettings.WinMain.SchedulerToolbar ); setSkin(); }
CDialogAbout::CDialogAbout(QWidget* parent) : QDialog(parent), ui(new Ui::CDialogAbout) { ui->setupUi(this); ui->labelVersion->setText(ui->labelVersion->text().replace("<version>", CQuazaaGlobals::APPLICATION_VERSION_STRING())); setSkin(); }
CDialogCreateTorrent::CDialogCreateTorrent(QWidget* parent) : QDialog(parent), ui(new Ui::CDialogCreateTorrent) { ui->setupUi(this); ui->comboBoxSeedDHT->setView(new QListView()); setSkin(); }
CWidgetUploads::CWidgetUploads(QWidget* parent) : QMainWindow(parent), ui(new Ui::CWidgetUploads) { ui->setupUi(this); restoreState(quazaaSettings.WinMain.UploadsToolbar); setSkin(); }
DialogAddRule::DialogAddRule(WidgetSecurity* parent, CSecureRule* pRule) : QDialog( parent ), ui( new Ui::DialogAddRule ), m_pParent( parent ) { ui->setupUi( this ); ui->comboBoxAction->setView( new QListView() ); ui->comboBoxExpire->setView( new QListView() ); ui->comboBoxRuleType->setView( new QListView() ); if ( pRule ) { m_pRule = pRule->getCopy(); ui->lineEditComment->setText( m_pRule->m_sComment ); } else m_pRule = new CIPRule(); switch ( m_pRule->type() ) { case Security::CSecureRule::srContentAddressRange: ui->comboBoxRuleType->setCurrentIndex( 1 ); ui->stackedWidgetType->setCurrentIndex( 1 ); break; case Security::CSecureRule::srContentCountry: ui->comboBoxRuleType->setCurrentIndex( 2 ); ui->stackedWidgetType->setCurrentIndex( 2 ); ui->lineEditCountry->setText( m_pRule->getContentString() ); break; case Security::CSecureRule::srContentHash: ui->comboBoxRuleType->setCurrentIndex( 3 ); ui->stackedWidgetType->setCurrentIndex( 3 ); break; case Security::CSecureRule::srContentText: ui->comboBoxRuleType->setCurrentIndex( 4 ); ui->stackedWidgetType->setCurrentIndex( 4 ); ui->lineEditContent->setText( m_pRule->getContentString() ); break; case Security::CSecureRule::srContentRegExp: ui->comboBoxRuleType->setCurrentIndex( 5 ); ui->stackedWidgetType->setCurrentIndex( 5 ); ui->lineEditRegularExpression->setText( m_pRule->getContentString() ); break; case Security::CSecureRule::srContentUserAgent: ui->comboBoxRuleType->setCurrentIndex( 6 ); ui->stackedWidgetType->setCurrentIndex( 6 ); ui->checkBoxUserAgent->setChecked( ((CUserAgentRule*)m_pRule)->getRegExp() ); ui->lineEditUserAgent->setText( m_pRule->getContentString() ); break; case Security::CSecureRule::srContentAddress: default: ui->comboBoxRuleType->setCurrentIndex( 0 ); ui->stackedWidgetType->setCurrentIndex( 0 ); ui->lineEditIP->setText( ((CIPRule*)m_pRule)->getContentString() ); break; } setSkin(); }
CWidgetGraph::CWidgetGraph(QWidget* parent) : QMainWindow(parent), ui(new Ui::CWidgetGraph) { ui->setupUi(this); restoreState(quazaaSettings.WinMain.GraphToolbar); ui->splitterGraph->restoreState(quazaaSettings.WinMain.GraphSplitter); setSkin(); }
CDialogScheduler::CDialogScheduler(QWidget* parent) : QDialog(parent), ui(new Ui::CDialogScheduler) { ui->setupUi(this); ui->comboBoxAction->setView(new QListView()); ui->comboBoxOnceWeekly->setView(new QListView()); setSkin(); }
IElement::IElement(unsigned int hp, unsigned int posX ,unsigned int posY, unsigned int sizeX, unsigned int sizeY, int speed, std::string* skin){ setHp(hp); setPosX(posX); setPosY(posY); setSizeX(sizeX); setSizeY(sizeY); setSpeed(speed); setSkin(skin); return ; }
int QtSvgDialGauge::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 1) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 1; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = skin(); break; case 1: *reinterpret_cast< int*>(_v) = minimum(); break; case 2: *reinterpret_cast< int*>(_v) = maximum(); break; case 3: *reinterpret_cast< qreal*>(_v) = startAngle(); break; case 4: *reinterpret_cast< qreal*>(_v) = endAngle(); break; } _id -= 5; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setSkin(*reinterpret_cast< QString*>(_v)); break; case 1: setMinimum(*reinterpret_cast< int*>(_v)); break; case 2: setMaximum(*reinterpret_cast< int*>(_v)); break; case 3: setStartAngle(*reinterpret_cast< qreal*>(_v)); break; case 4: setEndAngle(*reinterpret_cast< qreal*>(_v)); break; } _id -= 5; } else if (_c == QMetaObject::ResetProperty) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 5; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 5) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 5; } #endif // QT_NO_PROPERTIES return _id; }
CWidgetSmileyList::CWidgetSmileyList(QWidget *parent) : ui(new Ui::CWidgetSmileyList) { Q_UNUSED(parent); ui->setupUi(this); setWindowFlags(windowFlags() |= Qt::FramelessWindowHint); setAttribute(Qt::WA_TranslucentBackground); ui->listWidget->setAutoFillBackground(true); connect(this, SIGNAL(aboutToShow()), ui->listWidget, SLOT(clearSelection())); setSkin(); }
CWidgetLibrary::CWidgetLibrary(QWidget* parent) : QWidget(parent), ui(new Ui::CWidgetLibrary) { ui->setupUi(this); ui->comboBoxLibraryNavigatorSharesFilter->setView(new QListView()); ui->tabWidgetLibraryNavigator->setCurrentIndex(quazaaSettings.WinMain.LibraryNavigatorTab); ui->splitterLibrary->restoreState(quazaaSettings.WinMain.LibrarySplitter); panelLibraryView = new CWidgetLibraryView(); ui->verticalLayoutLibraryView->addWidget(panelLibraryView); setSkin(); }
void Pod::takePod() { if (!podTaken) { podTaken = true; materialName += "Transparent"; if (mtype == POD_POWERUP) hidePod(); setSkin(); } }