Example #1
0
 // Default constructor
 SpectraCnPlotArgs() : BasePlotArgs(MIN_ARGS),
     mx_arg(""), x_max(DEFAULT_X_MAX), y_max(DEFAULT_Y_MAX), ignore_absent(DEFAULT_IGNORE_ABSENT), max_duplication(DEFAULT_DUPLICATION), columns("")
 {
     title = defaultTitle();
     x_label = defaultXLabel();
     y_label = defaultYLabel();
     width = defaultWidth();
     height = defaultHeight();
 }
Example #2
0
static void usage()
{
    qWarning() << "VNC Platform Integration options:";
    qWarning() << "    size=<Width>x<Height> - set the display width and height";
    qWarning() << "         defaults to" << defaultWidth() << "x" << defaultHeight();
    qWarning() << "    display=<ID> - set the VNC display port to ID + 5900";
    qWarning() << "         defaults to" << defaultDisplay();
    qWarning() << "    offset=<X>x<Y> - set the current screens offset";
    qWarning() << "    vnc - start configuration of a new screen";
    qWarning() << "         size and offset are inherited from the previous screen if not set";
    qWarning() << "         display id is incremented from the previous screen if not set";
    qWarning() << "    virtual - manage the set of screens as a virtual desktop";
}
Example #3
0
QVNCIntegration::QVNCIntegration(const QStringList& paramList)
    : virtualDesktop(false), fontDb(new QGenericUnixFontDatabase())
{
    int sizeX = defaultWidth();
    int sizeY = defaultHeight();
    int offsetX = 0;
    int offsetY = 0;
    int display = defaultDisplay();
    bool showUsage = false;

    foreach(QString confString, paramList) {
        if (confString.startsWith(QLatin1String("size="))) {
            QString val = confString.section(QLatin1Char('='), 1, 1);
            sizeX = val.section(QLatin1Char('x'), 0, 0).toInt();
            sizeY = val.section(QLatin1Char('x'), 1, 1).toInt();
        }
        else if (confString.startsWith(QLatin1String("display="))) {
            display = confString.section(QLatin1Char('='), 1, 1).toInt();
        }
        else if (confString.startsWith(QLatin1String("offset="))) {
            QString val = confString.section(QLatin1Char('='), 1, 1);
            offsetX = val.section(QLatin1Char('x'), 0, 0).toInt();
            offsetY = val.section(QLatin1Char('x'), 1, 1).toInt();
        }
        else if (confString == QLatin1String("vnc")) {
            QRect screenRect(offsetX, offsetY, sizeX, sizeY);
            QVNCScreen *screen = new QVNCScreen(screenRect, display);
            mScreens.append(screen);
            screen->setObjectName(QString("screen %1").arg(display));
            screen->setDirty(screenRect);
            ++display;
        }
        else if (confString == QLatin1String("virtual")) {
            virtualDesktop = true;
        }
        else {
            qWarning() << "Unknown VNC option:" << confString;
            showUsage = true;
        }
    }

    if (showUsage)
        usage();

    QRect screenRect(offsetX, offsetY, sizeX, sizeY);
    QVNCScreen *screen = new QVNCScreen(screenRect, display);
    mScreens.append(screen);
    mPrimaryScreen = qobject_cast<QVNCScreen *>(mScreens.first());
    screen->setObjectName(QString("screen %1").arg(display));
    screen->setDirty(screenRect);
}
Example #4
0
        const string optionsDescription() const
        {
            ostringstream help_str;

            help_str << " -p, --output_type=string    The plot file type to create: png, ps, pdf.  Warning... if pdf is selected" << endl
                     << "                             please ensure your gnuplot installation can export pdf files. (\"" << DEFAULT_OUTPUT_TYPE << "\")" << endl
                     << " -o, --output=string         Output file (\"" << defaultOutputPrefix() << "." << DEFAULT_OUTPUT_TYPE << "\")" << endl
                     << " -t, --title=string          Title for plot (\"" << defaultTitle() << "\")" << endl
                     << " -i, --x_label=string        Label for the x-axis (\"" << defaultXLabel() << "\")" << endl
                     << " -j, --y_label=string        Label for the y-axis (\"" << defaultYLabel() << "\")" << endl
                     << " -w, --width=uint16          Width of canvas (" << defaultWidth() << ")" << endl
                     << " -h, --height=uint16         Height of canvas (" << defaultHeight() << ")";

            return help_str.str();
        }
Example #5
0
void OnyxPushButton::useDefaultHeight()
{
    setFixedHeight(defaultHeight());
}
Example #6
0
File: ui.cpp Project: JUX84/3tXc4
void ui ( void ) { // main menu

	uint8_t selected ( 1 );
	uint8_t defaultHeight ( 5 );
	uint8_t defaultWidth ( 5 );
	uint8_t defaultAlignWinSize ( 5 );
	uint8_t defaultAlignWinTotal ( 1 );
	uint8_t defaultAI_prof ( 3 );
	int32_t Key;
	uint8_t row , col;

	while ( true ) {

		clear ();

		getmaxyx ( stdscr , row , col );

		if ( selected < 1 )
			selected = 1;

		if ( selected > 3 )
			selected = 3;

		attron ( A_BOLD );

		mvprintw ( row / 4 , ( col - STR_TITLE_GAME.length () + 1 ) / 2 , STR_TITLE_GAME.c_str () );

		mvprintw ( ( row / 2 ) + ( ( selected - 1 ) * 2 ) , 5 * col / 20 , STR_ARROW_RIGHT.c_str () );
		mvprintw ( ( row / 2 ) + ( ( selected - 1 ) * 2 ) , 15 * col / 20 , STR_ARROW_LEFT.c_str () );

		mvprintw ( 2 , 2 , STR_HELP.c_str () );

		attroff ( A_BOLD );

		mvprintw ( row / 2 , ( col - STR_PLAY.length () + 1 ) / 2 , STR_PLAY.c_str () );
		mvprintw ( ( row / 2 ) + 2 , ( col - STR_OPTIONS.length () + 1 ) / 2 , STR_OPTIONS.c_str () );
		mvprintw ( ( row / 2 ) + 4 , ( col - STR_EXIT.length () + 1 ) / 2 , STR_EXIT.c_str () );

		refresh();

		Key = getch ();

		if ( Key == KEY_DOWN )
			selected += 1;

		if ( Key == KEY_UP )
			selected -= 1;

		if ( Key == ENTER ) {

			if ( selected == 1 ) {

				play_menu ( defaultHeight , defaultWidth , defaultAlignWinSize , defaultAlignWinTotal , defaultAI_prof );
			}

			if ( selected == 2 )
				options ( defaultHeight , defaultWidth , defaultAlignWinSize , defaultAlignWinTotal , defaultAI_prof );

			if ( selected == 3 ) {
				if ( warnExit () ) {
					endwin ();
					return;
				}
			}
		}

		if ( Key == KEY_P ) {

			play_menu ( defaultHeight , defaultWidth , defaultAlignWinSize , defaultAlignWinTotal , defaultAI_prof );
		}

		if ( Key == KEY_O )
			options ( defaultHeight , defaultWidth , defaultAlignWinSize , defaultAlignWinTotal , defaultAI_prof );

		if ( Key == ESC || Key == KEY_E ) {
			if ( warnExit () ) {
				endwin ();
				return;
			}
		}

		if ( Key == KEY_F ( 5 ) )
			ui_help ();
	}
}