Example #1
0
// Construct and return an XML string representing the settings
QString PDFOptionsIO::buildXMLString()
{
	// Verify to make sure our settings are sane
	QString vrfyError;
	// Make sure the options are sane
	PDFOptions::VerifyResults vr = m_opts->verify(&vrfyError);
	if (vr != PDFOptions::Verify_NoError)
	{
		m_error = QObject::tr("Verification of settings failed: %1").arg(vrfyError);
		return QString::null;
	}
	// Build the document. Initial implementation uses QDom.
	m_doc = QDomDocument();
	m_root = m_doc.createElement("ScribusPDFOptions");
	m_root.setAttribute("version", formatVersion);
	m_doc.appendChild(m_root);
	// Fill the guts of the document
	buildSettings();
	// We're done - return a string containing the document XML
	QString xml = m_doc.toString();
	xml.prepend(
		"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
		"<!DOCTYPE ScribusPDFOptions SYSTEM 'scribuspdfoptions.dtd'>\n"
		);
	return xml;
}
Example #2
0
int main(int argc, char ** argv) {
  buildSetting buildSettings(argc, argv);
  int success = Builder::build(buildSettings);
  if (success == 0) {
    runProgram(buildSettings.get_runAfter(), buildSettings.get_outputFilename());
  }
  return success;
}
Example #3
0
MenuMainState::MenuMainState(xy::StateStack& stack, Context context)
    : State         (stack, context),
    m_messageBus    (context.appInstance.getMessageBus()),
    m_uiContainer   (m_messageBus)
{
    launchLoadingScreen();
    
    buildMenu();
    buildSettings();

    auto msg = m_messageBus.post<xy::Message::UIEvent>(xy::Message::UIMessage);
    msg->type = xy::Message::UIEvent::MenuOpened;
    msg->value = 0.f;
    msg->stateID = States::ID::MenuMain;

    xy::App::setMouseCursorVisible(true);
    getContext().renderWindow.setTitle("xy tools");

    quitLoadingScreen();
}