• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ resizeWindow函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中resizeWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ resizeWindow函数的具体用法?C++ resizeWindow怎么用?C++ resizeWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了resizeWindow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: resizeWindow

void MaximizeState::finishMaximizingActiveWindow()
{
	// set the active windows' size to the positive space

	CardWindow* activeWin = m_wm->activeWindow();

        if(activeWin){
            activeWin->setMaxAndLoading(1);
        }
	if (activeWin && activeWin->addedToWindowManager()) {
                // allow direct rendering if no one has requested it to be disabled - Do this only if the window is NOT a modal window
		if(WindowType::Type_ModalChildWindowCard != activeWin->type()) {
			const QRect& r = m_wm->targetPositiveSpace();
            resizeWindow(activeWin, r.width(), r.height());

			if (m_disableDirectRendering == 0) {
				if(false == m_wm->isModalDismissed()) {
					SystemUiController::instance()->setDirectRenderingForWindow(SystemUiController::CARD_WINDOW_MANAGER, activeWin, true);
				}
				else {
					m_wm->setModalDismissed(false);
				}
			}
		}

		if (G_UNLIKELY(Settings::LunaSettings()->perfTesting)) {
			// NOV-97107, hook for automated performance testing
			g_message("SYSMGR PERF: STATE MAXIMIZED appid: %s, processid: %s, type: %s, time: %d",
				activeWin->appId().c_str(),
				activeWin->processId().c_str(),
				activeWin->isHost() ? "host" : "card",
				Time::curTimeMs());
		}
	}
}
开发者ID:ctbrowser,项目名称:luna-sysmgr,代码行数:35,代码来源:CardWindowManagerStates.cpp


示例2: main

int main(int argc, char **argv)
{
    SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);

    SDL_CreateWindowAndRenderer(SCREEN_WIDTH+232, SCREEN_HEIGHT+16, 0, &displayWindow, &displayRenderer);
    SDL_GetRendererInfo(displayRenderer, &displayRendererInfo);
    SDL_SetRenderDrawBlendMode(displayRenderer, SDL_BLENDMODE_BLEND);

    SCREEN_SHIFT_X = 8;
    SCREEN_SHIFT_Y = 8;

#ifdef __EMSCRIPTEN__
    emscripten_set_main_loop(null_loop_iter, 60, 1);
#endif

    srand(time(NULL));
    sound_init();
    resizeWindow(SCREEN_WIDTH, SCREEN_HEIGHT);
    load_resources();

    last_time = clock();

#ifdef __EMSCRIPTEN__
    emscripten_set_main_loop(loop_iter, 60, 1);
#else
    while (!done)
    {
        loop_iter();
    }
#endif

    sound_exit();
    Quit(0);
    return (0);
}
开发者ID:shinyquagsire23,项目名称:DesktopAdventures,代码行数:35,代码来源:main.c


示例3: QWidget

DetailWindow::DetailWindow(DiagramList* list, QWidget* parent) : QWidget(parent)
{
	setupUi(this);
	stationView->setRenderHints( QPainter::Antialiasing );
	stationView->addGraph(list);
	resizeWindow();
}
开发者ID:MichaelRink,项目名称:ogs_ufz,代码行数:7,代码来源:DetailWindow.cpp


示例4: droid_Resize

static GF_Err droid_Resize(GF_VideoOutput *dr, u32 w, u32 h)
{
	RAWCTX;
	LOG( ANDROID_LOG_DEBUG, TAG, "Android Resize: %dx%d", w, h);

	rc->width = w;
	rc->height = h;

	if ( rc->non_power_two )
	{
		rc->tex_width = rc->width;
		rc->tex_height = rc->height;
	}
	else
	{
		rc->tex_width = find_pow_2(rc->width);
		rc->tex_height = find_pow_2(rc->height);
	}

	resizeWindow(rc);

	if ( rc->out_3d_type == 0 )
	{
		createTexture(rc);
#ifdef GLES_FRAMEBUFFER_TEST
		createFrameBuffer(rc);
#endif
	}
        LOG( ANDROID_LOG_VERBOSE, TAG, "Android Resize DONE", w, h);
	return GF_OK;
}
开发者ID:jnorthrup,项目名称:gpac,代码行数:31,代码来源:droid_vout.c


示例5: sdlInit

int sdlInit(int width, int height, int bpp, int debugmode){
	if(debugmode) console_printf("DEBUG -- SDL window initializing \n");
	if(SDL_Init(SDL_INIT_VIDEO)<0){
//		fprintf(stderr, "ERROR -- SDL video init failed: %s \n", SDL_GetError());
		console_printf("ERROR -- SDL video init failed: %s \n", SDL_GetError());
		return FALSE;
	}

	videoInfo = SDL_GetVideoInfo();
	videoFlags = SDL_OPENGL;
	videoFlags |= SDL_GL_DOUBLEBUFFER;
	videoFlags |= SDL_HWPALETTE;
	videoFlags |= SDL_RESIZABLE;
	if(videoInfo->hw_available) videoFlags |= SDL_HWSURFACE;
	else			    videoFlags |= SDL_SWSURFACE;
	if(videoInfo->blit_hw) 	    videoFlags |= SDL_HWACCEL;
	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
/*	videoFlags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS | SDL_WINDOW_OPENGL;
//	SDL_CreateWindowAndRenderer(0, 0, videoFlags, &screen, &renderer);
	screen = SDL_CreateWindow("enaengine", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, videoFlags);
	glcontext = SDL_GL_CreateContext(screen);
//	renderer = SDL_CreateRenderer(screen, -1, 0);
*/
//	setMSAA(16);
	return resizeWindow(width, height, bpp, debugmode);
}
开发者ID:roboman2444,项目名称:enaengine,代码行数:26,代码来源:sdlmanager.c


示例6: showFullScreen

void MusicVideoPlayWidget::resizeWindow(bool resize)
{
    if(resize)
    {
        showFullScreen();
    }
    else
    {
        showNormal();
        setGeometry(250, 150, WINDOW_WIDTH, WINDOW_HEIGHT);
    }
    QSize s = size();
#ifdef Q_OS_UNIX
    QDesktopWidget* desktopWidget = QApplication::desktop();
    if(isFullScreen() && desktopWidget && desktopWidget->screen())
    {
        s = desktopWidget->screen()->size();
    }
    else
    {
        s = QSize(WINDOW_WIDTH, WINDOW_HEIGHT);
        showNormal();
    }
#endif
    resizeWindow(s.width() - WINDOW_WIDTH, s.height() - WINDOW_HEIGHT);
}
开发者ID:jinting6949,项目名称:TTKMusicplayer,代码行数:26,代码来源:musicvideoplaywidget.cpp


示例7: tonen

void tonen(Mat image, String naam)              // afbeelding tonen op scherm a.d.h.v. afbeelding en naam venster
{
    namedWindow( naam, WINDOW_NORMAL );
    resizeWindow(naam, 1200,800);
    imshow( naam, image );
    waitKey(0);
}
开发者ID:SanderGrielens,项目名称:rapido,代码行数:7,代码来源:calibration.cpp


示例8: colour

void DetailWindow::addList(DiagramList* list)
{
	GeoLib::Color* c = GeoLib::getRandomColor();
	QColor colour((*c)[0], (*c)[1], (*c)[2]);
	delete c;
	this->addList(list, colour);
	resizeWindow();
}
开发者ID:MichaelRink,项目名称:ogs_ufz,代码行数:8,代码来源:DetailWindow.cpp


示例9: resizeWindow

void TestWindow::resizeEvent(QResizeEvent* ev) {
    resizeWindow(ev->size());
    float fov_degrees = 60.0f;
    float aspect_ratio = (float)_size.width() / _size.height();
    float near_clip = 0.1f;
    float far_clip = 1000.0f;
    _projectionMatrix = glm::perspective(glm::radians(fov_degrees), aspect_ratio, near_clip, far_clip);
}
开发者ID:BingShearer,项目名称:hifi,代码行数:8,代码来源:TestWindow.cpp


示例10: resizeWindow

	void GraphicManager::resizeVerify()
	{
        if(geiWindow->resized)
        {
            resizeWindow();
            geiWindow->resized = false;
        }
	}
开发者ID:gestaltdevstudio,项目名称:gge,代码行数:8,代码来源:GraphicManager.cpp


示例11: SDL_Init

EAGLView::EAGLView()
{
	d = new PrivateData;
	
	/* this holds some info about our display */
	const SDL_VideoInfo *videoInfo;

	SDL_Init( SDL_INIT_VIDEO );

	d->surface = SDL_SetVideoMode(0, 0, 16, SDL_SWSURFACE | SDL_FULLSCREEN);

	SDL_ShowCursor(0);

	SDL_WM_SetCaption("HexGame", "HexGame");

	SDL_GLES_Init(SDL_GLES_VERSION_1_1);

	SDL_GLES_Context *context = SDL_GLES_CreateContext();
	SDL_GLES_MakeCurrent(context);

	/* Enable smooth shading */
	glShadeModel( GL_SMOOTH );

	/* Set the background black */
	glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );

	/* Enables Depth Testing */
	glEnable( GL_DEPTH_TEST );
	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND_SRC);
	glEnableClientState(GL_VERTEX_ARRAY);
	glEnableClientState(GL_TEXTURE_COORD_ARRAY);

	/* The Type Of Depth Test To Do */
	glDepthFunc( GL_LEQUAL );

	/* Really Nice Perspective Calculations */
	glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );

	/* Use of vertex arrays is mandatory in GLES */
	glEnableClientState(GL_VERTEX_ARRAY);

	resizeWindow( 800, 480 );

	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	glEnable(GL_TEXTURE_2D);
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );

	TextureCatalog* catalog = TextureCatalog::instance();

	catalog->addAndLoad("units", loadTexture("texmap.png"), 2);
	catalog->addAndLoad("hexTiles", loadTexture("texmap_hex.png"), 2);
	catalog->addAndLoad("actions", loadTexture("actions.png"), 4);
	catalog->addAndLoad("icons", loadTexture("icons.png"), 4);

	d->centralControl = CentralControl::instance();
}
开发者ID:johanekholm,项目名称:hex-game,代码行数:58,代码来源:EAGLView.cpp


示例12: setupPolygonVars

//--------------------------------------------------------------
void ofApp::setup(){

    setupPolygonVars();
    setupTriangleVars();
    setupRectVars();
    setupCircleVars();

    resizeWindow();
}
开发者ID:JackBlackx,项目名称:OFCOURSE-SHANGHAI,代码行数:10,代码来源:ofApp.cpp


示例13: while

void BaseGame::eventPoll()
{
	sf::Event event;
    while (window.pollEvent(event))
	{
        if (event.type == sf::Event::Closed) running = false;
		else if (event.type == sf::Event::Resized) resizeWindow(event.size.width, event.size.height);
    }
}
开发者ID:NhojEntuna,项目名称:-GENGN2-Entuna_Quiz_1,代码行数:9,代码来源:BaseGame.cpp


示例14: namedWindow

//检验是否有效
void findCircleParameter::checkVarify()
{
	namedWindow(check_win_name, CV_WINDOW_NORMAL);
	resizeWindow(check_win_name, width_disp_img, height_disp_img);
	imshow(check_win_name, image);
	setMouseCallback(check_win_name, onMouse);
	waitKey();
	cv::destroyWindow(check_win_name);
}
开发者ID:tangjie77wd,项目名称:Fish-eye-Image-Correction-Code,代码行数:10,代码来源:findCircleParameter.cpp


示例15: MYGUI_ASSERT

	void Gui::initialise(const std::string& _core, const std::string& _logFileName)
	{
		// самый первый лог
		LogManager::registerSection(MYGUI_LOG_SECTION, _logFileName);

		MYGUI_ASSERT(!mIsInitialise, INSTANCE_TYPE_NAME << " initialised twice");

		MYGUI_LOG(Info, "* Initialise: " << INSTANCE_TYPE_NAME);
		MYGUI_LOG(Info, "* MyGUI version "
			<< MYGUI_VERSION_MAJOR << "."
			<< MYGUI_VERSION_MINOR << "."
			<< MYGUI_VERSION_PATCH);

		// создаем и инициализируем синглтоны
		mResourceManager = new ResourceManager();
		mLayerManager = new LayerManager();
		mWidgetManager = new WidgetManager();
		mInputManager = new InputManager();
		mSubWidgetManager = new SubWidgetManager();
		mSkinManager = new SkinManager();
		mFontManager = new FontManager();
		mControllerManager = new ControllerManager();
		mPointerManager = new PointerManager();
		mClipboardManager = new ClipboardManager();
		mLayoutManager = new LayoutManager();
		mDynLibManager = new DynLibManager();
		mPluginManager = new PluginManager();
		mLanguageManager = new LanguageManager();
		mFactoryManager = new FactoryManager();

		mResourceManager->initialise();
		mLayerManager->initialise();
		mWidgetManager->initialise();
		mInputManager->initialise();
		mSubWidgetManager->initialise();
		mSkinManager->initialise();
		mFontManager->initialise();
		mControllerManager->initialise();
		mPointerManager->initialise();
		mClipboardManager->initialise();
		mLayoutManager->initialise();
		mDynLibManager->initialise();
		mPluginManager->initialise();
		mLanguageManager->initialise();
		mFactoryManager->initialise();

		WidgetManager::getInstance().registerUnlinker(this);

		// загружаем дефолтные настройки если надо
		if ( _core.empty() == false ) mResourceManager->load(_core);

		mViewSize = RenderManager::getInstance().getViewSize();
		resizeWindow(mViewSize);

		MYGUI_LOG(Info, INSTANCE_TYPE_NAME << " successfully initialized");
		mIsInitialise = true;
	}
开发者ID:OndraK,项目名称:openmw,代码行数:57,代码来源:MyGUI_Gui.cpp


示例16: resizeWindow

void MusicVideoPlayWidget::resizeWindow()
{
    int width = M_SETTING_PTR->value(MusicSettingManager::WidgetSize).toSize().width();
    int height = M_SETTING_PTR->value(MusicSettingManager::WidgetSize).toSize().height();
    if(!isFullScreen())
    {
        resizeWindow(width - WINDOW_WIDTH_MIN, height - WINDOW_HEIGHT_MIN);
    }
}
开发者ID:jinting6949,项目名称:TTKMusicplayer,代码行数:9,代码来源:musicvideoplaywidget.cpp


示例17: QWidget

StratWindow::StratWindow(GeoLib::StationBorehole* station,
                         std::map<std::string, GeoLib::Color*>* stratColors,
                         QWidget* parent) : QWidget(parent)
{
	setupUi(this);
	stationView->setRenderHints( QPainter::Antialiasing );
	stationView->setStation(station, stratColors);
	resizeWindow();
}
开发者ID:MichaelRink,项目名称:ogs_ufz,代码行数:9,代码来源:StratWindow.cpp


示例18: CV_TRACE_FUNCTION

void cv::imshow( const String& winname, InputArray _img )
{
    CV_TRACE_FUNCTION();
    const Size size = _img.size();
#ifndef HAVE_OPENGL
    CV_Assert(size.width>0 && size.height>0);
    {
        Mat img = _img.getMat();
        CvMat c_img = cvMat(img);
        cvShowImage(winname.c_str(), &c_img);
    }
#else
    const double useGl = getWindowProperty(winname, WND_PROP_OPENGL);
    CV_Assert(size.width>0 && size.height>0);

    if (useGl <= 0)
    {
        Mat img = _img.getMat();
        CvMat c_img = cvMat(img);
        cvShowImage(winname.c_str(), &c_img);
    }
    else
    {
        const double autoSize = getWindowProperty(winname, WND_PROP_AUTOSIZE);

        if (autoSize > 0)
        {
            resizeWindow(winname, size.width, size.height);
        }

        setOpenGlContext(winname);

        cv::ogl::Texture2D& tex = ownWndTexs[winname];

        if (_img.kind() == _InputArray::CUDA_GPU_MAT)
        {
            cv::ogl::Buffer& buf = ownWndBufs[winname];
            buf.copyFrom(_img);
            buf.setAutoRelease(false);

            tex.copyFrom(buf);
            tex.setAutoRelease(false);
        }
        else
        {
            tex.copyFrom(_img);
        }

        tex.setAutoRelease(false);

        setOpenGlDrawCallback(winname, glDrawTextureCallback, &tex);

        updateWindow(winname);
    }
#endif
}
开发者ID:JoeHowse,项目名称:opencv,代码行数:56,代码来源:window.cpp


示例19: MusicQueryTableWidget

MusicVideoTableWidget::MusicVideoTableWidget(QWidget *parent)
    : MusicQueryTableWidget(parent)
{
    setColumnCount(8);
    resizeWindow(1.0f);
    setTransparent(255);

    MusicTime::timeSRand();
    M_CONNECTION->setValue("MusicVideoTableWidget", this);
}
开发者ID:DchunWang,项目名称:TTKMusicplayer,代码行数:10,代码来源:musicvideotablewidget.cpp


示例20: MusicQueryTableWidget

MusicVideoTableWidget::MusicVideoTableWidget(QWidget *parent)
    : MusicQueryTableWidget(parent)
{
    setColumnCount(8);
    resizeWindow(1.0f);
    MusicUtils::UWidget::setTransparent(this, 255);

    MusicTime::timeSRand();
    M_CONNECTION_PTR->setValue(getClassName(), this);
}
开发者ID:getwingm,项目名称:TTKMusicplayer,代码行数:10,代码来源:musicvideotablewidget.cpp



注:本文中的resizeWindow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ resize_image函数代码示例发布时间:2022-05-30
下一篇:
C++ resizeString函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap