Beispiel #1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow){    
    ui->setupUi(this);
    createActions();
    createMenus();
    initVectors();
    initListeners();
    muteEvent=false;
    ClickedClear();
    sqlite = new SQLite();
    openSet(true);
    sqlite->startDriver();
}
Beispiel #2
0
DialogLayer * DialogLayer::create(const Color4B & color)
{

	auto layer = new DialogLayer();
	
	auto ss = Director::getInstance()->getWinSize();

	if (layer->initWithColor(color, ss.width, ss.height)) {
		layer->initListeners();
		layer->autorelease();
		
		return layer;
	}
	else {
		CC_SAFE_DELETE(layer);
		return nullptr;
	}
}
Beispiel #3
0
int main(int argc, char** argv)
{
  OSS::OSS_init();

  ServiceOptions::daemonize(argc, argv);
  ServiceOptions service(argc, argv, "sipXsbc", "1.0.0", "(c) eZuce, Inc. All rights reserved.");
  service.addDaemonOptions();

  //
  // Initialize the logger
  //
  service.addOptionString('L', "log-file", ": Specify the application log file.", ServiceOptions::CommandLineOption);
  service.addOptionInt('l', "log-level",
      ": Specify the application log priority level."
      "Valid level is between 0-7.  "
      "0 (EMERG) 1 (ALERT) 2 (CRIT) 3 (ERR) 4 (WARNING) 5 (NOTICE) 6 (INFO) 7 (DEBUG)"
            , ServiceOptions::CommandLineOption);
  service.addOptionFlag("log-no-compress", ": Specify if logs will be compressed after rotation.");
  service.addOptionInt("log-purge-count", ": Specify the number of archive to maintain.");
  service.parseOptions();
  initLogger(service);


  OSS::SIP::B2BUA::SBController sbc;
  //
  // Initialize the datastore
  //
  initDataStore(sbc);
  //
  // Initialize java scripts
  //
  initHandler(sbc, service);
  //
  // Initialize the transports
  //
  initListeners(sbc, service);

  sbc.run();

  OSS::app_wait_for_termination_request();

  OSS::OSS_deinit();
}
Beispiel #4
0
void StereoManager::init(Ogre::Viewport* leftViewport, Ogre::Viewport* rightViewport)
{
	if(mStereoMode == SM_NONE)
		return;
	if(!leftViewport)
        OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "At least left viewport must be provided",
        "StereoManager::init");

	mCamera = leftViewport->getCamera();
	if(!mCamera && rightViewport && !rightViewport->getCamera())
        OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "Viewports must have cameras associated",
        "StereoManager::init");

	if(rightViewport && mCamera != rightViewport->getCamera())
        OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "Left and right viewports must have the same camera associated",
        "StereoManager::init");


	if(mAvailableModes[mStereoMode].mUsesCompositor)
	{
		Ogre::Viewport *newLeft, *newRight;
		initCompositor(leftViewport, mAvailableModes[mStereoMode].mMaterialName, newLeft, newRight);
		leftViewport = newLeft;
		rightViewport = newRight;
	}

	initListeners(leftViewport, rightViewport);

    RenderTargetList::iterator it;
	RenderTargetList::iterator end = mRenderTargetList.end();
	for(it = mRenderTargetList.begin(); it != end; ++it)
	{
		it->first->setAutoUpdated(false);
	}

	bool infinite = mFocalLengthInfinite;
	setFocalLength(mFocalLength); // setFocalLength will erase the infinite focal length option, so backup it and restore it
	setFocalLengthInfinite(infinite);

	if(mIsFocalPlaneFixed)
		updateCamera(0);
}
Beispiel #5
0
    void StereoManager::init(Ogre::Viewport* leftViewport, Ogre::Viewport* rightViewport)
    {
        if(stereo_mode_ == SM_NONE)
            return;
        if(!leftViewport)
            OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "At least left viewport must be provided",
            "StereoManager::init");

        camera_ = leftViewport->getCamera();
        if(!camera_ && rightViewport && !rightViewport->getCamera())
            OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "Viewports must have cameras associated",
            "StereoManager::init");

        if(rightViewport && camera_ != rightViewport->getCamera())
            OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "Left and right viewports must have the same camera associated",
            "StereoManager::init");

        if(available_nodes_[stereo_mode_].uses_compositor_)
        {
            Ogre::Viewport *newLeft, *newRight;
            initCompositor(leftViewport, available_nodes_[stereo_mode_].mat_name_, newLeft, newRight);
            leftViewport = newLeft;
            rightViewport = newRight;
        }

        initListeners(leftViewport, rightViewport);

        RenderTargetList::iterator it;
        RenderTargetList::iterator end = rendertarget_list_.end();
        for(it = rendertarget_list_.begin(); it != end; ++it)
        {
            it->first->setAutoUpdated(false);
        }

        bool infinite = infinite_focal_length_;
        setFocalLength(focal_length_); // setFocalLength will erase the infinite focal length option, so backup it and restore it
        setFocalLengthInfinite(infinite);

        if(focal_plane_fixed_)
            updateCamera(0);
    }