コード例 #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();
}
コード例 #2
0
ファイル: VimridViewer.cpp プロジェクト: nbolton/vimrid
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();*/
}
コード例 #3
0
ファイル: ethernet_widget.cpp プロジェクト: public0821/npg
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)));
}
コード例 #4
0
ファイル: dockerinit.c プロジェクト: RC1140/smartos-live
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);
}
コード例 #5
0
ファイル: BCIDataSet.cpp プロジェクト: CreativelyMe/OpenANN
void BCIDataSet::load()
{
  loadFlashing();
  loadStimulusCode();
  loadStimulusType();
  loadTargetChar();
  loadSignal();
  setupInterface();
}
コード例 #6
0
int main(int argc, char** argv) {
    glutInit(&argc, argv);

    setupGLUT();

    setupInterface( );

    glewInit();

    glutMainLoop();

    Game::clear();

    return 0;
}
コード例 #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;
}