int main(int argc, char *argv[]) { _argc = argc; _argv = argv; QApplication::setColorSpec( QApplication::ManyColor ); #if USE_KDE KAboutData aboutData(PACKAGE, I18N_NOOP(PACKAGE), VERSION, I18N_NOOP("ICQ client"), KAboutData::License_GPL, "Copyright (C) 2002, Vladimir Shutoff", 0, "http://sim.shutoff.spb.ru/", "*****@*****.**"); aboutData.addAuthor("Vladimir Shutoff",I18N_NOOP("Maintainer"),"*****@*****.**"); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineOptions options[] = { { "b <dir>", i18n("Directory for files"), 0 }, { "d <loglevel>", i18n("Loglevel"), 0 }, { 0, 0, 0 } }; KCmdLineArgs::addCmdLineOptions( options ); KUniqueApplication::addCmdLineOptions(); if (!KUniqueApplication::start()) exit(-1); SimApp app; kApp = &app; #else SimApp app(argc, argv); #endif initIcons(""); pMain = new MainWindow; #if USE_KDE KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->isSet("b")) pMain->homeDir = strdup(args->getOption("b")); if (args->isSet("d")) log_level = atoi(args->getOption("d")); #else for (int i = 0; i < argc; i++){ if (!strcmp(argv[i], "-b") && argv[i+1]) pMain->homeDir = argv[++i]; if (!strcmp(argv[i], "-d") && argv[i+1]) log_level = atoi(argv[++i]); } #endif if (!pMain->init()) return 0; app.setMainWidget(pMain); return app.exec(); }
BasicItem::BasicItem(int itemId): GalacticraftItem("basicItem", itemId) { creativeCategory = 3; setMaxDamage(0); setStackedByData(false); initIcons(); }
UndoManager::UndoManager() { currentUndoObjectId_ = -1; if (!UndoManager::IGuides) initIcons(); prefs_ = PrefsManager::instance()->prefsFile->getContext("undo"); languageChange(); setUndoEnabled(prefs_->getBool("enabled", true)); }
bool IconManager::setup() { if (!initIcons()) { qDebug()<<"No icons found :("; return false; } return true; }
void StyleEngene::setStyle(QString internalName) { if(_styleMap.contains(internalName)) { _currentStyle = _styleMap[internalName]; m_iconCache.clear(); } else { qCritical() << "No style found"; return; } initIcons(); loadStyleSheet(StaticHelpers::CombinePathes(_currentStyle.rootPath, "style.qss")); emit styleChanged(); }
NAMESPACE_EDITOR_BEGIN //-----------------------------------// ResourcesPage::ResourcesPage( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size ) : wxTreeCtrl(parent, id, pos, size, wxTR_DEFAULT_STYLE | wxTR_HIDE_ROOT) { ResourceManager* res = GetResourceManager(); res->onResourcePrepared.Connect( this, &ResourcesPage::onResourcePrepared ); res->onResourceRemoved.Connect( this, &ResourcesPage::onResourceRemoved ); res->onResourceLoaded.Connect( this, &ResourcesPage::onResourceReloaded ); res->onResourceReloaded.Connect( this, &ResourcesPage::onResourceReloaded ); initIcons(); initControl(); updateTree(); }
QIcon StyleEngene::guessMimeIcon(const QString& suffix) { QString lSuffix = suffix.toLower(); if(fileIcons[0].isNull()) { initIcons(); } if(!suffix.isEmpty()) { for(int i = 0; i < TYPE_COUNT; ++i) { if(suffixes[i].contains(lSuffix)) { return fileIcons[i]; } } } return fallback; }
QString StyleEngene::gessMimeIconType(const QString& suffix) { QString lSuffix = suffix.toLower(); if (fileIcons[0].isNull()) { initIcons(); } if (!suffix.isEmpty()) { for (int i = 0; i < TYPE_COUNT; ++i) { if (suffixes[i].contains(lSuffix)) { return EnumStrings[i]; } } } return "folder"; }
FileManager::FileManager( QSizeF size, OpenGLScene* scene, OpenManager* open ) : BarBase( size, 10, 60 ) , _FileTrans( 0, 0 ) , _heightPercent( 0 ) , _DRAGFILE( false ) , _Control( size.width()/3, 0, size.width()/3, 18 ) , _ONMOVE( false ) , _HIGHLIGHTCONTROL( false ) , _VISINDEX( -1 ) , _EllipseMove( size.width()/3*2 - 36, 0 , 18, 18) , _EllipseHide( size.width()/3*2 - 18, 0 , 18, 18) , _EllipseMap( size.width()/3*2 - 54, 0 , 18, 18) , _EllipseColor( size.width()/3*2 - 72, 0 , 18, 18) , SHIFTFILEVIEW( false ) , _DIRECTPREOPEN( false ) , _ONCONTROLTYPE( -1 ) , CLICKINDEX(-1) , COLORBAR( false ) , _CurrentFileName( "" ) , _CTRL( false ) { setFlag( QGraphicsItem::ItemIsMovable, true); setFlag( QGraphicsItem::ItemIsSelectable, true); setFlag( QGraphicsItem::ItemIsFocusable, true); initViewRect(); initIcons(); this->_scene = scene; this->_open = open; controlName[0] = QString( tr("") ); controlName[1] = QString( tr("") ); controlName[2] = QString( tr("") ); controlName[3] = QString( tr("") ); // initManager(); return; }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { //QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode)); ui->setupUi( this); //ui->listWidget->setCurrentRow(0); //ui->listWidget_2->setCurrentRow(0); wordList << "title:"<<"author:"<<"keyword:"<<"tag:"<<"note:"; initToolbar(); initMainArea(); initIcons(); initTabWidget(); initTheDownLeftCorner(); initTheUpLeftCorner(); initSignalsAndSlots(); initContextMenu(); ui->listWidget->setCurrentRow(0); ui->listWidget_2->setCurrentRow(0); }
CloudIcon::CloudIcon() { initIcons(); hide(); _lastUpdateTime = g_system->getMillis(); }