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

C++ saveImage函数代码示例

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

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



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

示例1: SLOT

void ImageWidget::contextMenuEvent(QContextMenuEvent *event)
{
    QMenu menu;

    if (mType == Photo) {
        if (!mReadOnly) {
            menu.addAction(i18n("Change photo..."), this, SLOT(changeImage()));
            menu.addAction(i18n("Change URL..."), this, SLOT(changeUrl()));
        }

        if (mHasImage) {
            menu.addAction(i18n("Save photo..."), this, SLOT(saveImage()));

            if (!mReadOnly) {
                menu.addAction(i18n("Remove photo"), this, SLOT(deleteImage()));
            }
        }
    } else {
        if (!mReadOnly) {
            menu.addAction(i18n("Change logo..."), this, SLOT(changeImage()));
            menu.addAction(i18n("Change URL..."), this, SLOT(changeUrl()));
        }

        if (mHasImage) {
            menu.addAction(i18n("Save logo..."), this, SLOT(saveImage()));

            if (!mReadOnly) {
                menu.addAction(i18n("Remove logo"), this, SLOT(deleteImage()));
            }
        }
    }

    menu.exec(event->globalPos());
}
开发者ID:quazgar,项目名称:kdepimlibs,代码行数:34,代码来源:imagewidget.cpp


示例2: QMainWindow

skeletonVisualization::skeletonVisualization(QWidget *parent, Qt::WFlags flags)
	: QMainWindow(parent, flags)
{
	ui.setupUi(this);

	ui.centralWidget->setContentsMargins(6, 6, 6, 6);
	ui.centralWidget->setLayout(ui.horizontalLayout);

    connect(ui.buttonOpen, SIGNAL(clicked()),
            this, SLOT(openImage()));
    connect(ui.actionOpen, SIGNAL(activated()),
            this, SLOT(openImage()));

    connect(ui.buttonRefresh, SIGNAL(clicked()),
            this, SLOT(updateSkeleton()));
    connect(ui.actionRefresh, SIGNAL(activated()),
            this, SLOT(updateSkeleton()));

    connect(ui.buttonSave, SIGNAL(clicked()),
            this, SLOT(saveImage()));
    connect(ui.actionSave, SIGNAL(activated()),
            this, SLOT(saveImage()));

    connect(ui.buttonConnect, SIGNAL(clicked()),
            this, SLOT(breaksConnector()));
    connect(ui.actionConnect, SIGNAL(activated()),
            this, SLOT(breaksConnector()));

    connect(ui.buttonQuit, SIGNAL(clicked()),
            this, SLOT(exitMethod()));
    connect(ui.actionQuit, SIGNAL(activated()),
            this, SLOT(exitMethod()));

    connect(ui.sliderScale, SIGNAL(valueChanged(int)),
            this, SLOT(setScaleValue(int)));
    connect(ui.checkBoxCircles, SIGNAL(stateChanged(int)),
            this, SLOT(checkBoxesChanged(int)));
    connect(ui.checkBoxBones, SIGNAL(stateChanged(int)),
            this, SLOT(checkBoxesChanged(int)));
    connect(ui.checkBoxContours, SIGNAL(stateChanged(int)),
            this, SLOT(checkBoxesChanged(int)));
    connect(ui.checkBoxImage, SIGNAL(stateChanged(int)),
            this, SLOT(checkBoxesChanged(int)));

    connect(ui.actionOn, SIGNAL(activated()), this, SLOT(scaleOn()));
    connect(ui.actionOff, SIGNAL(activated()), this, SLOT(scaleOff()));
    connect(ui.actionOriginal, SIGNAL(activated()), this, SLOT(scaleOrig()));
    connect(ui.actionInternal, SIGNAL(activated()), this, SLOT(internal()));
    connect(ui.actionExternal, SIGNAL(activated()), this, SLOT(external()));

    scene = 0;
    drawCircles = ready = 0;
    drawBones = drawImage = drawContours = skeletonView = 1;
    scale = 1.0;
}
开发者ID:OLEGator30,项目名称:SPaV,代码行数:55,代码来源:skeletonvisualization.cpp


示例3: saveAs

void saveAs(int fileType) {
	if (fileType == PNG) 
		printf("Saving as .png (Rendering %d pixels)\n", mVar->png_h * mVar->png_w);
	else
		printf("Saving as .ppm (Rendering %d pixels)\n", mVar->png_h * mVar->png_w);
	//Create arrays to load pixels into
	int i;
	rgb_t **tex;
	int **texIter;
	char filename[20] = {0};

	tex = (rgb_t**)malloc(sizeof(rgb_t*) * mVar->png_h);
	texIter = (int**)malloc(sizeof(int*) * mVar->png_h);
	for(i=0; i < mVar->png_h; i++) {
		tex[i] = (rgb_t*)malloc(sizeof(rgb_t) * mVar->png_w);
		texIter[i] = (int*)malloc(sizeof(int) * mVar->png_w);
	}

	switch (mVar->function) {
		case MANDEL_AND_JULIA:
			i = 0; // This statement does nothing but prevents a silly error
			// Adjust zoom so that the saved image will be approximately the
			// same as the displayed image, but of the corrext resolution.
			double tempZoomM = mVar->zoomM;
			double tempZoomJ = mVar->zoomJ;
			mVar->zoomM *= mVar->width / (double)mVar->png_w;
			mVar->zoomJ *= mVar->width / (double)mVar->png_w;
			calcComplexFunction(mVar->png_w, mVar->png_h, tex, texIter, WHOLE_SCREEN, MANDELBROT);
			sprintf(filename, "mandelbrot%i", mVar->imgCount);
			saveImage(mVar->png_w, mVar->png_h, tex, filename, fileType);
			printf("Image Saved as %s\n", filename);
			calcComplexFunction(mVar->png_w, mVar->png_h, tex, texIter, WHOLE_SCREEN, JULIA);
			sprintf(filename, "julia%i", mVar->imgCount);
			saveImage(mVar->png_w, mVar->png_h, tex, filename, fileType);
			mVar->zoomM = tempZoomM;
			mVar->zoomJ = tempZoomJ;
			printf("Image Saved as %s\n", filename);
			mVar->imgCount++;
			break;
		default:
			calcComplexFunction(mVar->png_w, mVar->png_h, tex, texIter, WHOLE_SCREEN, mVar->function);
			sprintf(filename, "complexfunction%i", mVar->imgCount);
			saveImage(mVar->png_w, mVar->png_h, tex, filename, fileType);
			printf("Image Saved as %s\n", filename);
			mVar->imgCount++;
	}

	for(i=0; i < mVar->png_h; i++) {
		free(tex[i]);
		free(texIter[i]);
	}
	free(tex);
	free(texIter);
}
开发者ID:JoshVorick,项目名称:VisualizingComplexFunctions,代码行数:54,代码来源:main.c


示例4: setContextMenuPolicy

void MathDisplay::buildActions()
{
	setContextMenuPolicy(Qt::ActionsContextMenu);

	act_copyText = new QAction(tr("Copy text"), this);
	connect(act_copyText, SIGNAL(triggered()), this, SLOT(copyText()));
	this->addAction(act_copyText);

	act_copyLatex = new QAction(tr("Copy LaTeX code"), this);
	connect(act_copyLatex, SIGNAL(triggered()), this, SLOT(copyLatex()));
	this->addAction(act_copyLatex);

	act_copyMml = new QAction(tr("Copy MathML code"), this);
	connect(act_copyMml, SIGNAL(triggered()), this, SLOT(copyMml()));
	this->addAction(act_copyMml);

	act_copyImage = new QAction(tr("Copy image"), this);
	connect(act_copyImage, SIGNAL(triggered()), this, SLOT(copyImage()));
	act_copyImage->setEnabled(false);
	this->addAction(act_copyImage);

	act_saveImage = new QAction(tr("Save image"), this);
	connect(act_saveImage, SIGNAL(triggered()), this, SLOT(saveImage()));
	act_saveImage->setEnabled(false);
	this->addAction(act_saveImage);
}
开发者ID:tobast,项目名称:QGiac,代码行数:26,代码来源:MathDisplay.cpp


示例5: saveImage

void MyQGraphicsView::mouseReleaseEvent(QMouseEvent * e)
{
//    emit viewClicked();
    if (e->button() == Qt::RightButton) {
       saveImage();
    }
}
开发者ID:gibbogle,项目名称:monolayer-abm,代码行数:7,代码来源:myqgraphicsview.cpp


示例6: main

int main()
{
    int w = 400, h = 300;
    cout << "Input image's width,height:" << endl;
    cin >> w >> h;
    assert(w > 0 && h > 0);

    std::vector<char> buf;
    buf.resize(w * h * 4);

    setupScene();
    {
        clock_t c = clock();
        onDrawBuffer(&buf[0], w, h, w * 4);
        cout << "cost time : " << (clock() - c) / 1000.f << endl;
    }
    cleanupScene();

    saveImage("scene.png", &buf[0], w, h, w * 4);
    
    {
        cout << "Press any key to continue..." << endl;
        char buf[32];
        cin.getline(buf, sizeof(buf));
        cin.getline(buf, sizeof(buf));
    }
}
开发者ID:GHScan,项目名称:DailyProjects,代码行数:27,代码来源:ImageRenderer.cpp


示例7: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    connect(ui->horizontalSlider, SIGNAL(valueChanged(int)), ui->widget, SLOT(setPosX(int)));
    connect(ui->horizontalSlider_2, SIGNAL(valueChanged(int)), ui->widget, SLOT(setPosY(int)));
    connect(ui->horizontalSlider_3, SIGNAL(valueChanged(int)), ui->widget, SLOT(setR(int)));

    connect(ui->actionLoad_config, SIGNAL(triggered()), this, SLOT(openConfig()));
    connect(ui->actionSave_config, SIGNAL(triggered()), this, SLOT(saveConfig()));
    connect(ui->actionSave_image, SIGNAL(triggered()), this, SLOT(saveImage()));

    ui->horizontalSlider->setValue(0);
    ui->horizontalSlider->setMinimum(-10000);
    ui->horizontalSlider->setMaximum(10000);
    ui->spinBox->setValue(0);
    ui->spinBox->setMinimum(-10000);
    ui->spinBox->setMaximum(10000);

    ui->horizontalSlider_2->setValue(0);
    ui->horizontalSlider_2->setMinimum(-10000);
    ui->horizontalSlider_2->setMaximum(10000);
    ui->spinBox_2->setValue(0);
    ui->spinBox_2->setMinimum(-10000);
    ui->spinBox_2->setMaximum(10000);

    ui->horizontalSlider_3->setValue(20);
    ui->horizontalSlider_3->setMinimum(0);
    ui->horizontalSlider_3->setMaximum(10000);
    ui->spinBox_3->setValue(20);
    ui->spinBox_3->setMinimum(0);
    ui->spinBox_3->setMaximum(10000);
}
开发者ID:npsavin,项目名称:NSU_Graphics,代码行数:35,代码来源:mainwindow.cpp


示例8: saveDialog

BOOL saveDialog(HWND hWnd, Image &img)
{
	WCHAR *pszFileName;
	BOOL bReturn = FALSE;
	OPENFILENAME ofn = { sizeof(OPENFILENAME) };

	pszFileName = (WCHAR *)calloc(4096, sizeof(WCHAR));

	ofn.hwndOwner = hWnd;
	ofn.lpstrFilter = L"Portable Network Graphic (*.PNG)\0*.png\0";
	ofn.lpstrFile = pszFileName;
	ofn.lpstrDefExt = L"png";
	ofn.nMaxFile = 4096;
	ofn.lpstrTitle = L"Save Image";
	ofn.Flags = OFN_DONTADDTORECENT | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST;

	if (GetSaveFileName(&ofn))
	{
		if ((ofn.Flags & OFN_EXTENSIONDIFFERENT) == OFN_EXTENSIONDIFFERENT)
			wcscat_s(pszFileName, 4096, L".png");

		saveImage(img, pszFileName);

		bReturn = TRUE;
	}

	free(pszFileName);

	return bReturn;
}
开发者ID:weimingtom,项目名称:AokanaCGExtractor,代码行数:30,代码来源:Main.cpp


示例9: callbackWithoutCameraInfo

  void callbackWithoutCameraInfo(const sensor_msgs::ImageConstPtr& image_msg)
  {
    if (is_first_image_) {
      is_first_image_ = false;

      // Wait a tiny bit to see whether callbackWithCameraInfo is called
      ros::Duration(0.001).sleep();
    }

    if (has_camera_info_)
      return;

    // saving flag priority:
    //  1. request by service.
    //  2. request by topic about start and end.
    //  3. flag 'save_all_image'.
    if (!save_image_service && request_start_end) {
      if (start_time_ == ros::Time(0))
        return;
      else if (start_time_ > image_msg->header.stamp)
        return;  // wait for message which comes after start_time
      else if ((end_time_ != ros::Time(0)) && (end_time_ < image_msg->header.stamp))
        return;  // skip message which comes after end_time
    }

    // save the image
    std::string filename;
    if (!saveImage(image_msg, filename))
      return;

    count_++;
  }
开发者ID:Octanis1,项目名称:Octanis1-ROS,代码行数:32,代码来源:image_saver.cpp


示例10: getNextFileName

    void HeatMapSaver::saveHeatMaps(const std::vector<Array<float>>& heatMaps, const std::string& fileName) const
    {
        try
        {
            // Record cv::mat
            if (!heatMaps.empty())
            {
                // File path (no extension)
                const auto fileNameNoExtension = getNextFileName(fileName) + "_heatmaps";

                // Get names for each heatMap
                std::vector<std::string> fileNames(heatMaps.size());
                for (auto i = 0; i < fileNames.size(); i++)
                    fileNames[i] = {fileNameNoExtension + (i != 0 ? "_" + std::to_string(i) : "") + "." + mImageFormat};

                // heatMaps -> cvOutputDatas
                std::vector<cv::Mat> cvOutputDatas(heatMaps.size());
                for (auto i = 0; i < cvOutputDatas.size(); i++)
                    unrollArrayToUCharCvMat(cvOutputDatas[i], heatMaps[i]);

                // Save each heatMap
                for (auto i = 0; i < cvOutputDatas.size(); i++)
                    saveImage(cvOutputDatas[i], fileNames[i]);
            }
        }
        catch (const std::exception& e)
        {
            error(e.what(), __LINE__, __FUNCTION__, __FILE__);
        }
    }
开发者ID:zgsxwsdxg,项目名称:openpose,代码行数:30,代码来源:heatMapSaver.cpp


示例11: saveImage

void OmniFEMMainFrame::createTopToolBar()
{
    wxStandardPaths path = wxStandardPaths::Get();
	wxImage::AddHandler(new wxPNGHandler);
	std::string resourcesDirectory = path.GetAppDocumentsDir().ToStdString() + std::string("/GitHub/Omni-FEM/src/UI/MainFrame/resources/");// equilivant to ~ in command line. This is for the path for the source code of the resources
    
    mainFrameToolBar->Create(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_TOP | wxNO_BORDER);

	/* This section will need to load the images into memory */
	wxImage saveImage(resourcesDirectory + "save.png", wxBITMAP_TYPE_PNG);
	wxImage openImage(resourcesDirectory + "Open.png", wxBITMAP_TYPE_PNG);
	wxImage newFileImage(resourcesDirectory + "new_file.png", wxBITMAP_TYPE_PNG);
	
	/* This section will convert the images into bitmaps */
	wxBitmap saveBitmap(saveImage);
	wxBitmap openImageBitmap(openImage);
	wxBitmap newFileBitmap(newFileImage);
	
	/* This section will add the tool to the toolbar */
	mainFrameToolBar->AddTool(toolbarID::ID_ToolBarNew, newFileBitmap, "New File");
	mainFrameToolBar->AddTool(toolbarID::ID_ToolBarOpen, openImageBitmap, "Open");
	mainFrameToolBar->AddTool(toolbarID::ID_ToolBarSave, saveBitmap, "Save");
	
	/* Enable the tooolbar and associate it with the main frame */
	mainFrameToolBar->Realize();
	this->SetToolBar(mainFrameToolBar);
}
开发者ID:OmniFEM,项目名称:Omni-FEM,代码行数:27,代码来源:mainOmniFEMUI.cpp


示例12: SIGNAL

void Interface::connection(void)
{
	QObject::connect(clearButton, SIGNAL(clicked()), this, SLOT(clearImage()));
	QObject::connect(saveButton, SIGNAL(clicked()), this, SLOT(saveImage()));
	QObject::connect(evaluateButton, SIGNAL(clicked()), this, SLOT(evaluateImage()));
	QObject::connect(penWidthSlider, SIGNAL(sliderReleased()), this, SLOT(penWidthChanged()));
}
开发者ID:SatoshiShimada,项目名称:mnist,代码行数:7,代码来源:interface.cpp


示例13: updateGraphView

void
Viewer::graphContextMenu(const QPoint& pos)
{
    QPoint globalPos = this->ui.scrollArea->mapToGlobal(pos);

    QAction* selectedItem = graphMenu.exec(globalPos);
    if (selectedItem) {
        if (selectedItem->iconText() == GRAPH_UPDATE_ACTION)
        {
            updateGraphView();
        }
        else if (selectedItem->iconText() == GRAPH_OPTIONS_ACTION)
        {
            showGraphOptions();
        }
        else if (selectedItem->iconText() == GRAPH_VIEW_TO_FILE)
        {
            if (graphView != 0) {
                saveImage(graphView->pixmap());
            }
            else {
                this->ui.statusbar->showMessage( tr("No image to save."));
            }
        }
    }
}
开发者ID:AndroidDev77,项目名称:OpenDDS,代码行数:26,代码来源:Viewer.cpp


示例14: connect

/**
 * Activates all action buttons.
 */
void FotoLab::activateActions()
{
	connect(ui.actionClose, SIGNAL(triggered()), qApp, SLOT(quit()));
	connect(ui.actionOpen, SIGNAL(triggered()), this, SLOT(openImage()));
	connect(ui.actionReload, SIGNAL(triggered()), this, SLOT(reloadImageData()));
	connect(ui.actionSaveAs, SIGNAL(triggered()), this, SLOT(saveImage()));
	connect(ui.actionAreaColor, SIGNAL(triggered()), this, SLOT(showColorDialog()));

	connect(ui.actionFillArea, SIGNAL(triggered()), ui.graphicsView, SLOT(fillArea()));
	connect(ui.actionCut, SIGNAL(triggered()), this, SLOT(cutArea()));
	connect(ui.actionEdges, SIGNAL(triggered()), this, SLOT(proposeEdges()));
	connect(ui.actionLines, SIGNAL(triggered()), this, SLOT(proposeLines()));

	connect(ui.actionDrawArea, SIGNAL(triggered()), ui.graphicsView, SLOT(switchDrawing()));

	//	connect(ui.actionProcess, SIGNAL(triggered()), ui.graphicsView, SLOT(processErase()));
	connect(ui.actionProcess, SIGNAL(triggered()), ui.graphicsView, SLOT(processShowEdges()));
	connect(ui.actionProperties, SIGNAL(triggered()), this, SLOT(showProperties()));

	connect(ui.actionHelpAbout, SIGNAL(triggered()), this, SLOT(showHelpAbout()));
	//	processShowEdges

	connect(ui.actionZoomIn, SIGNAL(triggered()), ui.graphicsView, SLOT(zoomIn()));
	connect(ui.actionZoomOut, SIGNAL(triggered()), ui.graphicsView, SLOT(zoomOut()));
	connect(ui.actionZoomNormal, SIGNAL(triggered()), ui.graphicsView, SLOT(zoomNormal()));

	connect(ui.actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));

	connect(&tlowSpin, SIGNAL(valueChanged(double)), this, SLOT(validateLowTreshold(double)));
	connect(&thighSpin, SIGNAL(valueChanged(double)), this, SLOT(validateHighTreshold(double)));
}
开发者ID:rduga,项目名称:fotolab,代码行数:34,代码来源:fotolab.cpp


示例15: LoadString

LRESULT CMainWindow::OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
    if (!imageModel.IsImageSaved())
    {
        TCHAR programname[20];
        TCHAR saveprompttext[100];
        TCHAR temptext[500];
        LoadString(hProgInstance, IDS_PROGRAMNAME, programname, SIZEOF(programname));
        LoadString(hProgInstance, IDS_SAVEPROMPTTEXT, saveprompttext, SIZEOF(saveprompttext));
        _stprintf(temptext, saveprompttext, filename);
        switch (MessageBox(temptext, programname, MB_YESNOCANCEL | MB_ICONQUESTION))
        {
            case IDNO:
                DestroyWindow();
                break;
            case IDYES:
                saveImage(FALSE);
                if (imageModel.IsImageSaved())
                    DestroyWindow();
                break;
        }
    }
    else
    {
        DestroyWindow();
    }
    return 0;
}
开发者ID:GYGit,项目名称:reactos,代码行数:28,代码来源:winproc.cpp


示例16: callbackWithCameraInfo

  void callbackWithCameraInfo(const sensor_msgs::ImageConstPtr& image_msg, const sensor_msgs::CameraInfoConstPtr& info)
  {
    has_camera_info_ = true;

    if (!save_image_service && request_start_end) {
      if (start_time_ == ros::Time(0))
        return;
      else if (start_time_ > image_msg->header.stamp)
        return;  // wait for message which comes after start_time
      else if ((end_time_ != ros::Time(0)) && (end_time_ < image_msg->header.stamp))
        return;  // skip message which comes after end_time
    }

    // save the image
    std::string filename;
    if (!saveImage(image_msg, filename))
      return;

    // save the CameraInfo
    if (info) {
      filename = filename.replace(filename.rfind("."), filename.length(), ".ini");
      camera_calibration_parsers::writeCalibration(filename, "camera", *info);
    }

    count_++;
  }
开发者ID:Octanis1,项目名称:Octanis1-ROS,代码行数:26,代码来源:image_saver.cpp


示例17: QMainWindow

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent),
      ui(new Ui::MainWindow)
{
    currLayerNumber = 0;

    ui->setupUi(this);

    ui->qwtPlot->setTitle("Error");
    ui->qwtPlot->setAxisTitle(ui->qwtPlot->xBottom, "Epoch");
    ui->qwtPlot->setAxisTitle(ui->qwtPlot->yLeft,"Error");

    QPen pen = QPen(Qt::red);
    curve = new QwtPlotCurve;
    curve->setRenderHint(QwtPlotItem::RenderAntialiased);
    curve->setPen(pen);
    curve->attach(ui->qwtPlot);

    Preprocessor p;
    Dataset d = p.readFile("1.dat");
    showResults(d);

    connect(ui->saveImageButton,SIGNAL(clicked()),this,SLOT(saveImage()));
    connect(ui->numberOfLayers,SIGNAL(valueChanged(int)),this,SLOT(changeLayers(int)));
}
开发者ID:Abbath,项目名称:ECOHT,代码行数:25,代码来源:mainwindow.cpp


示例18: safe_sprintf

    void ResAtlasGeneric::applyAtlas(atlas_data& ad, bool linear, bool clamp2edge)
    {
        if (!ad.texture)
            return;

        spMemoryTexture mt = new MemoryTexture;
        Rect bounds = ad.atlas.getBounds();

        //int w = nextPOT(bounds.getRight());
        //int h = nextPOT(bounds.getBottom());
        int w = bounds.getRight();
        int h = bounds.getBottom();

        mt->init(ad.mt.lock().getRect(Rect(0, 0, w, h)));
#if 0
        static int n = 0;
        n++;
        char name[255];
        safe_sprintf(name, "test%d.tga", n);
        saveImage(image_data, name);
#endif

        CreateTextureTask task;
        task.linearFilter = linear;
        task.clamp2edge = clamp2edge;
        task.src = mt;
        task.dest = ad.texture;
        LoadResourcesContext::get()->createTexture(task);
    }
开发者ID:Wasabi2007,项目名称:oxygine-framework,代码行数:29,代码来源:ResAtlasGeneric.cpp


示例19: tr

void TGLFunWidget::showContextMenu(const QPoint &pos)
{
    QPoint globalPos;
    QAction* selectedItem;
    QString fileName;

    if (sender()->inherits("QAbstractScrollArea"))
        globalPos = ((QAbstractScrollArea*)sender())->viewport()->mapToGlobal(pos);
    else
        globalPos = ((QWidget*)sender())->mapToGlobal(pos);

    if ((selectedItem = menu.exec(globalPos)))
    {
        if (selectedItem == action1)
        {
            bool isOk;
            QString exp = QInputDialog::getText(this, tr("Selection condition nodes"),tr("Predicate:"), QLineEdit::Normal, predicate,&isOk);

            if (isOk && exp.length())
            {
                predicate = exp;
                processPredicate();
            }
        }
        else if (selectedItem == action2)
        {
            fileName = QFileDialog::getSaveFileName(this,tr("Saving the image"),fileName,tr("Image files (*.png)"));

            if (!fileName.isEmpty())
                saveImage(fileName);
        }
    }
}
开发者ID:SeregaGomen,项目名称:QFEM,代码行数:33,代码来源:glfun.cpp


示例20: saveImage

void MaskStriple::saveImage()
{
    QString filename = QFileDialog::getSaveFileName(this, "Имя картинки", "", "Images (*.jpg)");
    if(filename.isEmpty())
        return;
    saveImage(filename);
}
开发者ID:RazorNd,项目名称:Trafaret-maker,代码行数:7,代码来源:maskstriple.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ savePath函数代码示例发布时间:2022-05-30
下一篇:
C++ saveGeometry函数代码示例发布时间: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