Пример #1
0
static void sort(int init){
	int limit;
	if (init)
		limit = NBPLAYER;
	else
		limit = NBQUALIF;
	for(int i = 0 ; i < limit ; i ++){
		int max = i;
		for(int j = i+1 ; j < NBPLAYER ; j ++){
			if(isAhead(max, j) == j)
				max = j;
		}
		if(max != i){
			struct Engine tmp = participants[i];
			participants[i] = participants[max];
			participants[max] = tmp;
		}
		if(! init)
			input[participants[i].id].nbQualif ++;
	}
	if (init){
		int sb = 0;
		int pt = 0;
		for(int i = 0 ; i < limit ; i ++){
			if (participants[i].SB > sb)
				sb = participants[i].SB;
			if (participants[i].score > pt)
				pt = participants[i].score;
		}
		for(int i = 0 ; i < limit ; i ++)
			printEngine(i, sb, pt);
	}
}
Пример #2
0
void PrintDialog::storeValues()
{
	getOptions(); // options were not set get last options with this hack

	m_doc->Print_Options.printer = PrintDest->currentText();
	m_doc->Print_Options.filename = QDir::fromNativeSeparators(LineEdit1->text());
	m_doc->Print_Options.toFile = outputToFile();
	m_doc->Print_Options.copies = numCopies();
	m_doc->Print_Options.outputSeparations = outputSeparations();
	m_doc->Print_Options.separationName = separationName();
	m_doc->Print_Options.allSeparations = allSeparations();
	if (m_doc->Print_Options.outputSeparations)
		m_doc->Print_Options.useSpotColors = true;
	else
		m_doc->Print_Options.useSpotColors = doSpot();
	m_doc->Print_Options.useColor = color();
	m_doc->Print_Options.mirrorH  = mirrorHorizontal();
	m_doc->Print_Options.mirrorV  = mirrorVertical();
	m_doc->Print_Options.useICC   = ICCinUse();
	m_doc->Print_Options.doClip   = doClip();
	m_doc->Print_Options.doGCR    = doGCR();
	m_doc->Print_Options.prnEngine= printEngine();
	m_doc->Print_Options.setDevParam = doDev();
	m_doc->Print_Options.useDocBleeds  = docBleeds->isChecked();
	m_doc->Print_Options.bleeds.Top    = BleedTop->value() / m_doc->unitRatio();
	m_doc->Print_Options.bleeds.Left   = BleedLeft->value() / m_doc->unitRatio();
	m_doc->Print_Options.bleeds.Right  = BleedRight->value() / m_doc->unitRatio();
	m_doc->Print_Options.bleeds.Bottom = BleedBottom->value() / m_doc->unitRatio();
	m_doc->Print_Options.markLength = markLength->value() / m_doc->unitRatio();
	m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
	m_doc->Print_Options.cropMarks  = cropMarks->isChecked();
	m_doc->Print_Options.bleedMarks = bleedMarks->isChecked();
	m_doc->Print_Options.registrationMarks = registrationMarks->isChecked();
	m_doc->Print_Options.colorMarks = colorMarks->isChecked();
	m_doc->Print_Options.includePDFMarks = usePDFMarks->isChecked();
	if (OtherCom->isChecked())
	{
		m_doc->Print_Options.printerCommand = Command->text();
		m_doc->Print_Options.useAltPrintCommand = true;
	}
	else
		m_doc->Print_Options.useAltPrintCommand = false;
#ifdef HAVE_CUPS
	m_doc->Print_Options.printerOptions = PrinterOpts;
#else
	m_doc->Print_Options.printerOptions = QString();
#endif
	m_doc->Print_Options.devMode = DevMode;
}