⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filtregradient.h

📁 une tres bonne fenetre
💻 H
字号:
#include "fene1.h"
#include "image.cpp"

//les action de filtres
				/*median*/
void fene::median()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		if(avecmodmed->isChecked())RImage::median(image);
		else RImage::mediansans(image);
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour appliquer le filtres M閐ian"));
}
			/*passehaut*/
void fene::passehaut()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		RImage::passehaut(image);
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour appliquer le filtres Passe Haut"));
}
			/*gaussien*/
void fene::gaussien()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		if(avecmodgauss->isChecked())	RImage::gaussien(image);
		else RImage::gaussiensans(image);
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour appliquer le filtres Gaussien"));
}
			/*Repoussage*/
void fene::repoussage()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		RImage::repoussage(image);
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour la conversion au Niveaux de gris"));
}
			//fin des action de filtres



					//les gradiens
				/*simple gradien*/
void fene::gradien()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		RImage::gradien(image);
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour appliquer le simple gradient "));
}
			/*gradien am閘iorer*/
void fene::gradien1()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		RImage::gradienami(image,spinbox->value());
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour appliquer le gradient am閘iorer"));
}
				/*soble*/
void fene::soble()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		RImage::Niveau_Gris(image);
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour appliquer le gradient de Soble"));
}
				/*perwit*/
void fene::perwit()
{
	if(!pixmap->isNull())
	{
		charger(pixmap);
		image=new QImage(pixmap->toImage());
		RImage::perwit(image);
		*pixmap=pixmap->fromImage(*image);
		tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
	}
	else QMessageBox::warning(this,tr("avertissement"),tr("il y'a pas d'image pour appliquer le gradient de Perwit"));
}
		//***************fin des gardiens
void fene::setpixmap(QPixmap pixap)
{
	*pixmap=pixap;
	tablabel[tabwidget->currentIndex()-1]->setPixmap(*pixmap);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -