Exemplo n.º 1
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
    setupInterface();
    setWindowTitle(tr("Word Analysis"));
    QSettings settings("Iona College", "Word Frequency Analysis");
    workingDirectoryPath = settings.value("workingDirectoryPath").toString();
}
Exemplo n.º 2
0
void VimridViewer::Init()
{
	this->GlutApplication::Init();

	glEnable(GL_CULL_FACE);
	glEnable(GL_BLEND);
	glEnable(GL_TEXTURE_2D);

	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

	// Setup after everything else has initialised.
	setupInterface();

	// Tell the slices to stay out once scrolled out.
	GetMriVisualiser().GetScrollController().ChangeScrollMode(SM_LEAVE_OUT);

	/*for (int i = 0; i < 15; i++)
	{
		GetMriVisualiser().AddTextureAsSlice(new SampleTexture());
	}*/

	// Default camera after init so drag is based on trackd position.
	defaultCamera();

	/*// Reset cursor so it appears centered in menu.
	GetUtility().ResetCursor();

	// Show during init to ensure UI container has been setup.
	mMainMenu->Show();*/
}
Exemplo n.º 3
0
EthernetWidget::EthernetWidget(const QString& protocol_name, const QString& ether_protocol_name, QWidget *parent) :
		BaseProtocolWidget(protocol_name, parent), m_ethernet(NULL) {
	ui.setupUi(this);
	setupInterface(parent);
	setupEtherProtocol(ether_protocol_name);
	connect(ui.interface_box, SIGNAL(currentIndexChanged (int)), this, SLOT(onInterfaceChanged(int)));
}
Exemplo n.º 4
0
void
setupInterfaces()
{
    char *json;
    nvlist_t *data, *nvl;
    nvpair_t *pair;

    if ((json = mdataGet("sdc:nics")) == NULL) {
        dlog("WARN no NICs found in sdc:nics\n");
        return;
    }

    if (nvlist_parse_json(json, strlen(json), &nvl, NVJSON_FORCE_INTEGER,
      NULL) != 0) {
        fatal(ERR_PARSE_JSON, "failed to parse nvpair json"
            " for sdc:nics: %s\n", strerror(errno));
    }
    free(json);

    for (pair = nvlist_next_nvpair(nvl, NULL); pair != NULL;
      pair = nvlist_next_nvpair(nvl, pair)) {
        if (nvpair_type(pair) == DATA_TYPE_NVLIST) {
            if (nvpair_value_nvlist(pair, &data) != 0) {
                fatal(ERR_PARSE_JSON, "failed to parse nvpair json"
                    " for NIC: %s\n", strerror(errno));
            }
            setupInterface(data);
        }
    }

    nvlist_free(nvl);
}
Exemplo n.º 5
0
void BCIDataSet::load()
{
  loadFlashing();
  loadStimulusCode();
  loadStimulusType();
  loadTargetChar();
  loadSignal();
  setupInterface();
}
Exemplo n.º 6
0
int main(int argc, char** argv) {
    glutInit(&argc, argv);

    setupGLUT();

    setupInterface( );

    glewInit();

    glutMainLoop();

    Game::clear();

    return 0;
}
Exemplo n.º 7
0
int main(int argc, char** argv){
	glutInit(&argc, argv);

	setupGLUT();
	
	setupInterface( &glui_callBack );

	/* We register the idle callback with GLUI, *not* with GLUT */
    GLUI_Master.set_glutIdleFunc( idle );

	glewInit();

	Game::game()->run(argc, argv);

	Game::clear();

	return 0;
}