QTfrontend/main.cpp
changeset 2377 f3fab2b09e0c
parent 2261 57e99c908e7c
child 2418 538a777f90c4
equal deleted inserted replaced
2376:ece7b87f1334 2377:f3fab2b09e0c
    72         }
    72         }
    73         *cDataDir = f.absoluteFilePath();
    73         *cDataDir = f.absoluteFilePath();
    74     }
    74     }
    75 
    75 
    76 	app.setStyle(new QPlastiqueStyle);
    76 	app.setStyle(new QPlastiqueStyle);
    77 	
    77 
    78 	QDateTime now = QDateTime::currentDateTime();
    78 	QDateTime now = QDateTime::currentDateTime();
    79 	QDateTime zero;
    79 	QDateTime zero;
    80 	srand(now.secsTo(zero));
    80 	srand(now.secsTo(zero));
    81 	rand();
    81 	rand();
    82 
    82 
   210 				"width: 25px;"
   210 				"width: 25px;"
   211 			"}"
   211 			"}"
   212 			"QComboBox::down-arrow {"
   212 			"QComboBox::down-arrow {"
   213 				"image: url(\":/res/dropdown.png\");"
   213 				"image: url(\":/res/dropdown.png\");"
   214 			"}"
   214 			"}"
   215 			
   215 
   216 			"VertScrArea {"
   216 			"VertScrArea {"
   217 				"background-image: url(\":/res/panelbg.png\");"
   217 				"background-image: url(\":/res/panelbg.png\");"
   218 				"background-position: bottom center;"
   218 				"background-position: bottom center;"
   219 				"background-repeat: repeat-x;"
   219 				"background-repeat: repeat-x;"
   220 			"}"
   220 			"}"
   221 			
   221 
   222 			"IconedGroupBox {"
   222 			"IconedGroupBox {"
   223 				"border-radius: 16px;"
   223 				"border-radius: 16px;"
   224 				"padding: 2px;"
   224 				"padding: 2px;"
   225 			"}"
   225 			"}"
   226 
   226 
   236 				"image: url(\":/res/checked.png\");"
   236 				"image: url(\":/res/checked.png\");"
   237 				"}"
   237 				"}"
   238 			"QCheckBox::indicator:unchecked{"
   238 			"QCheckBox::indicator:unchecked{"
   239 				"image: url(\":/res/unchecked.png\");"
   239 				"image: url(\":/res/unchecked.png\");"
   240 				"}"
   240 				"}"
   241 			
   241 
   242 			".QWidget{"
   242 			".QWidget{"
   243 				"background: transparent;"
   243 				"background: transparent;"
   244 				"}"
   244 				"}"
   245 
   245 
   246 			"QTabWidget::pane {"
   246 			"QTabWidget::pane {"
   272 			"}"
   272 			"}"
   273 
   273 
   274 			"QToolTip{"
   274 			"QToolTip{"
   275 				"background-color: #0d0544;"
   275 				"background-color: #0d0544;"
   276 			"}"
   276 			"}"
   277 			
   277 
   278 			":disabled{"
   278 			":disabled{"
   279 				"color: #a0a0a0;"
   279 				"color: #a0a0a0;"
   280 			"}"
   280 			"}"
   281             "SquareLabel, ItemNum {"
   281             "SquareLabel, ItemNum {"
   282 				"background-color: #000000;"
   282 				"background-color: #000000;"
   287 	bindir->cd("bin"); // workaround over NSIS installer
   287 	bindir->cd("bin"); // workaround over NSIS installer
   288 
   288 
   289 	cfgdir->setPath(cfgdir->homePath());
   289 	cfgdir->setPath(cfgdir->homePath());
   290 #ifdef __APPLE__
   290 #ifdef __APPLE__
   291 
   291 
   292     
   292 
   293 	if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"))
   293 	if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"))
   294 	{
   294 	{
   295 		checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos");
   295 		checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos");
   296 		checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves");
   296 		checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves");
   297 	}
   297 	}
   338 	tmpdir.cd("Maps");
   338 	tmpdir.cd("Maps");
   339 	tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
   339 	tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
   340 	mapList = new QStringList(tmpdir.entryList(QStringList("*")));
   340 	mapList = new QStringList(tmpdir.entryList(QStringList("*")));
   341 
   341 
   342 	HWForm *Form = new HWForm();
   342 	HWForm *Form = new HWForm();
   343     
   343 
   344 
   344 
   345 	Form->show();
   345 	Form->show();
   346 	return app.exec();
   346 	return app.exec();
   347 }
   347 }