当前位置: 首页>>代码示例>>C++>>正文


C++ QT_TRANSLATE_NOOP函数代码示例

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


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

示例1: __attribute__

#include <QtGlobal>

// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *diamond_strings[] = {
QT_TRANSLATE_NOOP("diamond-core", ""
"%s, you must set a rpcpassword in the configuration file:\n"
"%s\n"
"It is recommended you use the following random password:\n"
"rpcuser=diamondrpc\n"
"rpcpassword=%s\n"
"(you do not need to remember this password)\n"
"The username and password MUST NOT be the same.\n"
"If the file does not exist, create it with owner-readable-only file "
"permissions.\n"
"It is also recommended to set alertnotify so you are notified of problems;\n"
"for example: alertnotify=echo %%s | mail -s \"Diamond Alert\" [email protected]\n"),
QT_TRANSLATE_NOOP("diamond-core", ""
"(default: 1, 1 = keep tx meta data e.g. account owner and payment request "
"information, 2 = drop tx meta data)"),
QT_TRANSLATE_NOOP("diamond-core", ""
"Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!"
"3DES:@STRENGTH)"),
QT_TRANSLATE_NOOP("diamond-core", ""
"Allow JSON-RPC connections from specified source. Valid for <ip> are a "
"single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or "
"a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"),
开发者ID:TGDiamond,项目名称:Diamond,代码行数:31,代码来源:diamondstrings.cpp

示例2: DECLARE_VIDEO_FILTER_PARTIALIZABLE

 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "ADM_vidConvolution.hxx"
#include "convolution_desc.cpp"



DECLARE_VIDEO_FILTER_PARTIALIZABLE(   AVDMFastVideoMedian,   // Class
                        1,0,0,              // Version
                        ADM_UI_ALL,         // UI
                        VF_NOISE,            // Category
                        "Median",            // internal name (must be uniq!)
                        QT_TRANSLATE_NOOP("median","Median convolution."),            // Display name
                        QT_TRANSLATE_NOOP("median","3x3 convolution filter :median.") // Description
                    );
/**
    \fn getConfiguration
*/

const char 							*AVDMFastVideoMedian::getConfiguration(void)
{
		static char str[]="Median(fast)";
		return (char *)str;
	
}
/**
    \fn doLine
*/
开发者ID:TotalCaesar659,项目名称:avidemux2,代码行数:31,代码来源:Median.cpp

示例3: QT_TRANSLATE_NOOP

namespace Ms {

//---------------------------------------------------------
//   JumpTypeTable
//---------------------------------------------------------

const JumpTypeTable jumpTypeTable[] = {
      { Jump::Type::DC,         TextStyleType::REPEAT_RIGHT, "D.C.",         "start", "end",  "",      QT_TRANSLATE_NOOP("jumpType", "Da Capo")        },
      { Jump::Type::DC_AL_FINE, TextStyleType::REPEAT_RIGHT, "D.C. al Fine", "start", "fine", "" ,     QT_TRANSLATE_NOOP("jumpType", "Da Capo al Fine")},
      { Jump::Type::DC_AL_CODA, TextStyleType::REPEAT_RIGHT, "D.C. al Coda", "start", "coda", "codab", QT_TRANSLATE_NOOP("jumpType", "Da Capo al Coda")},
      { Jump::Type::DS_AL_CODA, TextStyleType::REPEAT_RIGHT, "D.S. al Coda", "segno", "coda", "codab", QT_TRANSLATE_NOOP("jumpType", "D.S. al Coda")   },
      { Jump::Type::DS_AL_FINE, TextStyleType::REPEAT_RIGHT, "D.S. al Fine", "segno", "fine", "",      QT_TRANSLATE_NOOP("jumpType", "D.S. al Fine")   },
      { Jump::Type::DS,         TextStyleType::REPEAT_RIGHT, "D.S.",         "segno", "end",  "",      QT_TRANSLATE_NOOP("jumpType", "D.S.")           }
      };

int jumpTypeTableSize()
      {
      return sizeof(jumpTypeTable)/sizeof(JumpTypeTable);
      }

//---------------------------------------------------------
//   Jump
//---------------------------------------------------------

Jump::Jump(Score* s)
   : Text(s)
      {
      setFlags(ElementFlag::MOVABLE | ElementFlag::SELECTABLE);
      setTextStyleType(TextStyleType::REPEAT_RIGHT);
      setLayoutToParentWidth(true);
      }

//---------------------------------------------------------
//   setJumpType
//---------------------------------------------------------

void Jump::setJumpType(Type t)
      {
      for (const JumpTypeTable& p : jumpTypeTable) {
            if (p.type == t) {
                  setXmlText(p.text);
                  setJumpTo(p.jumpTo);
                  setPlayUntil(p.playUntil);
                  setContinueAt(p.continueAt);
                  setTextStyleType(p.textStyleType);
                  break;
                  }
            }
      }

//---------------------------------------------------------
//   jumpType
//---------------------------------------------------------

Jump::Type Jump::jumpType() const
      {
      for (const JumpTypeTable& t : jumpTypeTable) {
            if (_jumpTo == t.jumpTo && _playUntil == t.playUntil && _continueAt == t.continueAt)
                  return t.type;
            }
      return Type::USER;
      }

QString Jump::jumpTypeUserName() const
      {
      int idx = static_cast<int>(this->jumpType());
      if(idx < jumpTypeTableSize())
            return qApp->translate("jumpType", jumpTypeTable[idx].userText.toUtf8().constData());
      return QString("Custom");
      }

//---------------------------------------------------------
//   read
//---------------------------------------------------------

void Jump::read(XmlReader& e)
      {
      while (e.readNextStartElement()) {
            const QStringRef& tag(e.name());
            if (tag == "jumpTo")
                  _jumpTo = e.readElementText();
            else if (tag == "playUntil")
                  _playUntil = e.readElementText();
            else if (tag == "continueAt")
                  _continueAt = e.readElementText();
            else if (!Text::readProperties(e))
                  e.unknown();
            }
//      setTextStyleType(TextStyleType::REPEAT_RIGHT);    // do not reset text style!
      }

//---------------------------------------------------------
//   write
//---------------------------------------------------------

void Jump::write(Xml& xml) const
      {
      xml.stag(name());
      Text::writeProperties(xml);
      xml.tag("jumpTo", _jumpTo);
//.........这里部分代码省略.........
开发者ID:alexndrejoly,项目名称:MuseScore,代码行数:101,代码来源:jump.cpp

示例4: msgStartFailed

namespace Internal {

// Figure out the Qt4 project used by the file if any
static Qt4Project *qt4ProjectFor(const QString &fileName)
{
    ProjectExplorer::ProjectExplorerPlugin *pe = ProjectExplorer::ProjectExplorerPlugin::instance();
    if (ProjectExplorer::Project *baseProject = pe->session()->projectForFile(fileName))
        if (Qt4Project *project = qobject_cast<Qt4Project*>(baseProject))
            return project;
    return 0;
}

// ------------ Messages
static inline QString msgStartFailed(const QString &binary, QStringList arguments)
{
    arguments.push_front(binary);
    return ExternalQtEditor::tr("Unable to start \"%1\"").arg(arguments.join(QString(QLatin1Char(' '))));
}

static inline QString msgAppNotFound(const QString &id)
{
    return ExternalQtEditor::tr("The application \"%1\" could not be found.").arg(id);
}

// -- Commands and helpers
static QString linguistBinary()
{
    return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Linguist" : "linguist");
}

static QString designerBinary()
{
    return QLatin1String(Utils::HostOsInfo::isMacHost() ? "Designer" : "designer");
}

// Mac: Change the call 'Foo.app/Contents/MacOS/Foo <filelist>' to
// 'open -a Foo.app <filelist>'. doesn't support generic command line arguments
static void createMacOpenCommand(QString *binary, QStringList *arguments)
{
    const int appFolderIndex = binary->lastIndexOf(QLatin1String("/Contents/MacOS/"));
    if (appFolderIndex != -1) {
        binary->truncate(appFolderIndex);
        arguments->push_front(*binary);
        arguments->push_front(QLatin1String("-a"));
        *binary = QLatin1String("open");
    }
}

static const char designerIdC[] = "Qt.Designer";
static const char linguistIdC[] = "Qt.Linguist";

static const char designerDisplayName[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "Qt Designer");
static const char linguistDisplayName[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "Qt Linguist");

// -------------- ExternalQtEditor
ExternalQtEditor::ExternalQtEditor(Core::Id id,
                                   const QString &displayName,
                                   const QString &mimetype,
                                   QObject *parent) :
    Core::IExternalEditor(parent),
    m_mimeTypes(mimetype),
    m_id(id),
    m_displayName(displayName)
{
}

QStringList ExternalQtEditor::mimeTypes() const
{
    return m_mimeTypes;
}

Core::Id ExternalQtEditor::id() const
{
    return m_id;
}

QString ExternalQtEditor::displayName() const
{
    return m_displayName;
}

bool ExternalQtEditor::getEditorLaunchData(const QString &fileName,
                                           QtVersionCommandAccessor commandAccessor,
                                           const QString &fallbackBinary,
                                           const QStringList &additionalArguments,
                                           bool useMacOpenCommand,
                                           EditorLaunchData *data,
                                           QString *errorMessage) const
{
    // Get the binary either from the current Qt version of the project or Path
    if (const Qt4Project *project = qt4ProjectFor(fileName)) {
        if (const ProjectExplorer::Target *target = project->activeTarget()) {
            if (const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target->kit())) {
                data->binary = (qtVersion->*commandAccessor)();
                data->workingDirectory = project->projectDirectory();
            }
        }
    }
    if (data->binary.isEmpty()) {
        data->workingDirectory.clear();
//.........这里部分代码省略.........
开发者ID:aizaimenghuangu,项目名称:QtTestor,代码行数:101,代码来源:externaleditors.cpp

示例5: STRINGIFY

#include "VstEffect.h"
#include "Song.h"
#include "TextFloat.h"
#include "VstSubPluginFeatures.h"

#include "embed.cpp"


extern "C"
{

Plugin::Descriptor PLUGIN_EXPORT vsteffect_plugin_descriptor =
{
	STRINGIFY( PLUGIN_NAME ),
	"VST",
	QT_TRANSLATE_NOOP( "pluginBrowser",
				"plugin for using arbitrary VST effects inside LMMS." ),
	"Tobias Doerffel <tobydox/at/users.sf.net>",
	0x0200,
	Plugin::Effect,
	new PluginPixmapLoader( "logo" ),
	NULL,
	new VstSubPluginFeatures( Plugin::Effect )
} ;

}


VstEffect::VstEffect( Model * _parent,
			const Descriptor::SubPluginFeatures::Key * _key ) :
	Effect( &vsteffect_plugin_descriptor, _parent, _key ),
	m_plugin( NULL ),
开发者ID:uro5h,项目名称:lmms,代码行数:32,代码来源:VstEffect.cpp

示例6: close

/*!
    Opens the QtIOCompressor in \a mode. Only ReadOnly and WriteOnly is supported.
    This function will return false if you try to open in other modes.

    If the underlying device is not opened, this function will open it in a suitable mode. If this happens
    the device will also be closed when close() is called.

    If the underlying device is already opened, its openmode must be compatible with \a mode.

    Returns true on success, false on error.

    \sa close()
*/
bool QtIOCompressor::open(OpenMode mode)
{
    Q_D(QtIOCompressor);
    if (isOpen()) {
        qWarning("QtIOCompressor::open: device already open");
        return false;
    }

    // Check for correct mode: ReadOnly xor WriteOnly
    const bool read = (mode & ReadOnly);
    const bool write = (mode & WriteOnly);
    const bool both = (read && write);
    const bool neither = !(read || write);
    if (both || neither) {
        qWarning("QtIOCompressor::open: QtIOCompressor can only be opened in the ReadOnly or WriteOnly modes");
        return false;
    }

    // If the underlying device is open, check that is it opened in a compatible mode.
    if (d->device->isOpen()) {
        d->manageDevice = false;
        const OpenMode deviceMode = d->device->openMode();
        if (read && !(deviceMode & ReadOnly)) {
            qWarning("QtIOCompressor::open: underlying device must be open in one of the ReadOnly or WriteOnly modes");
            return false;
        } else if (write && !(deviceMode & WriteOnly)) {
            qWarning("QtIOCompressor::open: underlying device must be open in one of the ReadOnly or WriteOnly modes");
            return false;
        }

    // If the underlying device is closed, open it.
    } else {
        d->manageDevice = true;
        if (d->device->open(mode) == false) {
            setErrorString(QT_TRANSLATE_NOOP("QtIOCompressor", "Error opening underlying device: ") + d->device->errorString());
            return false;
        }
    }

    // Initialize zlib for deflating or inflating.

    // The second argument to inflate/deflateInit2 is the windowBits parameter,
    // which also controls what kind of compression stream headers to use.
    // The default value for this is 15. Passing a value greater than 15
    // enables gzip headers and then subtracts 16 form the windowBits value.
    // (So passing 31 gives gzip headers and 15 windowBits). Passing a negative
    // value selects no headers hand then negates the windowBits argument.
    int windowBits;
    switch (d->streamFormat) {
    case QtIOCompressor::GzipFormat:
        windowBits = 31;
        break;
    case QtIOCompressor::RawZipFormat:
        windowBits = -15;
        break;
    default:
        windowBits = 15;
    }

    int status;
    if (read) {
        d->state = QtIOCompressorPrivate::NotReadFirstByte;
        d->zlibStream.avail_in = 0;
        d->zlibStream.next_in = 0;
        if (d->streamFormat == QtIOCompressor::ZlibFormat) {
            status = inflateInit(&d->zlibStream);
        } else {
            if (checkGzipSupport(zlibVersion()) == false) {
                setErrorString(QT_TRANSLATE_NOOP("QtIOCompressor::open", "The gzip format not supported in this version of zlib."));
                return false;
            }

            status = inflateInit2(&d->zlibStream, windowBits);
        }
    } else {
        d->state = QtIOCompressorPrivate::NoBytesWritten;
        if (d->streamFormat == QtIOCompressor::ZlibFormat)
            status = deflateInit(&d->zlibStream, d->compressionLevel);
        else
            status = deflateInit2(&d->zlibStream, d->compressionLevel, Z_DEFLATED, windowBits, 8, Z_DEFAULT_STRATEGY);
    }

    // Handle error.
    if (status != Z_OK) {
        d->setZlibError(QT_TRANSLATE_NOOP("QtIOCompressor::open", "Internal zlib error: "), status);
        return false;
    }
//.........这里部分代码省略.........
开发者ID:Amazeus-Mozart,项目名称:keepassx,代码行数:101,代码来源:qtiocompressor.cpp

示例7: qMakePair

namespace Actions
{
	ActionTools::StringListPair MessageBoxInstance::icons = qMakePair(
			QStringList() << "none" << "information" << "question" << "warning" << "error",
			QStringList()
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::icons", "None")
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::icons", "Information")
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::icons", "Question")
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::icons", "Warning")
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::icons", "Error"));

	ActionTools::StringListPair MessageBoxInstance::buttons = qMakePair(
			QStringList() << "ok" << "yesno",
			QStringList()
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::buttons", "Ok")
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::buttons", "Yes-No"));

	ActionTools::StringListPair MessageBoxInstance::textmodes = qMakePair(
			QStringList() << "automatic" << "html" << "text",
			QStringList()
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::textmodes", "Automatic")
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::textmodes", "HTML")
			<< QT_TRANSLATE_NOOP("MessageBoxInstance::textmodes", "Plain text"));

	MessageBoxInstance::MessageBoxInstance(const ActionTools::ActionDefinition *definition, QObject *parent)
		: ActionTools::ActionInstance(definition, parent),
		mMessageBox(0)
	{
	}

	void MessageBoxInstance::startExecution()
	{
		bool ok = true;

		QString message = evaluateString(ok, "message");
		QString title = evaluateString(ok, "title");
		Icon icon = evaluateListElement<Icon>(ok, icons, "icon");
		TextMode textMode = evaluateListElement<TextMode>(ok, textmodes, "textMode");
		Buttons button = evaluateListElement<Buttons>(ok, buttons, "type");
        QImage customIcon = evaluateImage(ok, "customIcon");
        QImage windowIcon = evaluateImage(ok, "windowIcon");
		mIfYes = evaluateIfAction(ok, "ifYes");
		mIfNo = evaluateIfAction(ok, "ifNo");

		mMessageBox = 0;

		if(!ok)
			return;

		mMessageBox = new QMessageBox();

		mMessageBox->setIcon(messageBoxIcon(icon));
		mMessageBox->setWindowModality(Qt::NonModal);
		mMessageBox->setText(message);
		mMessageBox->setWindowTitle(title);
        mMessageBox->setWindowFlags(mMessageBox->windowFlags() | Qt::WindowContextHelpButtonHint);

		switch(textMode)
		{
		case HtmlTextMode:
			mMessageBox->setTextFormat(Qt::RichText);
			break;
		case PlainTextMode:
			mMessageBox->setTextFormat(Qt::PlainText);
			break;
		case AutoTextMode:
		default:
			mMessageBox->setTextFormat(Qt::AutoText);
			break;
		}

        if(!customIcon.isNull())
            mMessageBox->setIconPixmap(QPixmap::fromImage(customIcon));

        if(!windowIcon.isNull())
            mMessageBox->setWindowIcon(QPixmap::fromImage(windowIcon));

		switch(button)
		{
		case OkButton:
			mMessageBox->setStandardButtons(QMessageBox::Ok);
			break;
		case YesNoButtons:
			mMessageBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No);
			break;
		}

		mMessageBox->adjustSize();
		QRect screenGeometry = QApplication::desktop()->availableGeometry();
		mMessageBox->move(screenGeometry.center());
		mMessageBox->move(mMessageBox->pos().x() - mMessageBox->width()/2, mMessageBox->pos().y() - mMessageBox->height()/2);

		mMessageBox->open(this, SLOT(buttonClicked()));
	}

	void MessageBoxInstance::stopExecution()
	{
		closeAndDelete();
	}

//.........这里部分代码省略.........
开发者ID:Danielweber7624,项目名称:actiona,代码行数:101,代码来源:messageboxinstance.cpp

示例8: qMakePair

namespace Actions
{
	ActionTools::StringListPair WindowConditionInstance::conditions = qMakePair(
			QStringList() << "exists" << "dontexists",
			QStringList()
			<< QT_TRANSLATE_NOOP("WindowConditionInstance::conditions", "Exists")
			<< QT_TRANSLATE_NOOP("WindowConditionInstance::conditions", "Don't exists"));

	WindowConditionInstance::WindowConditionInstance(const ActionTools::ActionDefinition *definition, QObject *parent)
		: ActionTools::ActionInstance(definition, parent), mCondition(Exists)
	{
	}

	void WindowConditionInstance::startExecution()
	{
		bool ok = true;

		QString title = evaluateString(ok, "title");
		mCondition = evaluateListElement<Condition>(ok, conditions, "condition");
		mIfTrue = evaluateIfAction(ok, "ifTrue");
		ActionTools::IfActionValue ifFalse = evaluateIfAction(ok, "ifFalse");
		mPosition = evaluateVariable(ok, "position");
		mSize = evaluateVariable(ok, "size");
		mXCoordinate = evaluateVariable(ok, "xCoordinate");
		mYCoordinate = evaluateVariable(ok, "yCoordinate");
		mWidth = evaluateVariable(ok, "width");
		mHeight = evaluateVariable(ok, "height");
		mProcessId = evaluateVariable(ok, "processId");

		if(!ok)
			return;

		mTitleRegExp = QRegExp(title, Qt::CaseSensitive, QRegExp::WildcardUnix);

		ActionTools::WindowHandle foundWindow = findWindow();
		if((foundWindow.isValid() && mCondition == Exists) ||
		   (!foundWindow.isValid() && mCondition == DontExists))
		{
			QString line = evaluateSubParameter(ok, mIfTrue.actionParameter());

			if(!ok)
				return;

			if(mIfTrue.action() == ActionTools::IfActionValue::GOTO)
				setNextLine(line);
			else if(mIfTrue.action() == ActionTools::IfActionValue::CALLPROCEDURE)
			{
				if(!callProcedure(line))
					return;
			}

			emit executionEnded();
		}
		else
		{
			QString line = evaluateSubParameter(ok, ifFalse.actionParameter());

			if(!ok)
				return;

			if(ifFalse.action() == ActionTools::IfActionValue::GOTO)
			{
				setNextLine(line);

				emit executionEnded();
			}
			else if(ifFalse.action() == ActionTools::IfActionValue::CALLPROCEDURE)
			{
				if(!callProcedure(line))
					return;

				emit executionEnded();
			}
			else if(ifFalse.action() == ActionTools::IfActionValue::WAIT)
			{
				connect(&mTimer, SIGNAL(timeout()), this, SLOT(checkWindow()));
				mTimer.setInterval(100);
				mTimer.start();
			}
			else
				emit executionEnded();
		}
	}

	void WindowConditionInstance::stopExecution()
	{
		mTimer.stop();
	}

	void WindowConditionInstance::checkWindow()
	{
		ActionTools::WindowHandle foundWindow = findWindow();
		if((foundWindow.isValid() && mCondition == Exists) ||
		   (!foundWindow.isValid() && mCondition == DontExists))
		{
			bool ok = true;

			QString line = evaluateSubParameter(ok, mIfTrue.actionParameter());
			if(!ok)
				return;
//.........这里部分代码省略.........
开发者ID:WeDo30,项目名称:actiona,代码行数:101,代码来源:windowconditioninstance.cpp

示例9: getNextFrame

                removePlane  config;
        virtual const char   *getConfiguration(void);                   /// Return  current configuration as a human readable string
        virtual bool         getNextFrame(uint32_t *fn,ADMImage *image);    /// Return the next image
	 //  virtual FilterInfo  *getInfo(void);                             /// Return picture parameters after this filter
        virtual bool         getCoupledConf(CONFcouple **couples) ;   /// Return the current filter configuration
		virtual void setCoupledConf(CONFcouple *couples);
        virtual bool         configure(void) ;             /// Start graphical user interface
};

// Add the hook to make it valid plugin
DECLARE_VIDEO_FILTER(   removePlaneFilter,   // Class
                        1,0,0,              // Version
                        ADM_UI_ALL,         // UI
                        VF_COLORS,            // Category
                        "rplane",            // internal name (must be uniq!)
                        QT_TRANSLATE_NOOP("removeplane","Remove  Plane"),            // Display name
                        QT_TRANSLATE_NOOP("removeplane","Remove Y,U or V plane (used mainly to debug other filters).") // Description
                    );

// Now implements the interesting parts
/**
    \fn removePlaneFilter
    \brief constructor
*/
removePlaneFilter::removePlaneFilter(  ADM_coreVideoFilter *in,CONFcouple *setup) : ADM_coreVideoFilter(in,setup)
{
    if(!setup || !ADM_paramLoad(setup,removePlane_param,&config))
    {
        // Default value
        config.keepY=true;
        config.keepU=true;
开发者ID:JanGruuthuse,项目名称:avidemux2,代码行数:31,代码来源:removePlane.cpp

示例10: STRINGIFY

#include "Engine.h"
#include "gui_templates.h"
#include "GuiApplication.h"
#include "InstrumentTrack.h"

#include "embed.cpp"


extern "C"
{

Plugin::Descriptor PLUGIN_EXPORT malletsstk_plugin_descriptor =
{
	STRINGIFY( PLUGIN_NAME ),
	"Mallets",
	QT_TRANSLATE_NOOP( "pluginBrowser",
				"Tuneful things to bang on" ),
	"Danny McRae <khjklujn/at/users.sf.net>",
	0x0100,
	Plugin::Instrument,
	new PluginPixmapLoader( "logo" ),
	NULL,
	NULL
} ;

}


malletsInstrument::malletsInstrument( InstrumentTrack * _instrument_track ):
	Instrument( _instrument_track, &malletsstk_plugin_descriptor ),
	m_hardnessModel(64.0f, 0.0f, 128.0f, 0.1f, this, tr( "Hardness" )),
	m_positionModel(64.0f, 0.0f, 64.0f, 0.1f, this, tr( "Position" )),
开发者ID:Kamtron,项目名称:lmms,代码行数:32,代码来源:mallets.cpp

示例11: QT_TRANSLATE_NOOP

namespace Ms {

//---------------------------------------------------------
//   jumpStyle
//---------------------------------------------------------

static const ElementStyle jumpStyle {
      { Sid::repeatRightPlacement,               Pid::PLACEMENT              },
      };

//---------------------------------------------------------
//   JumpTypeTable
//---------------------------------------------------------

const JumpTypeTable jumpTypeTable[] = {
      { Jump::Type::DC,         "D.C.",         "start", "end",  "",      QT_TRANSLATE_NOOP("jumpType", "Da Capo")        },
      { Jump::Type::DC_AL_FINE, "D.C. al Fine", "start", "fine", "" ,     QT_TRANSLATE_NOOP("jumpType", "Da Capo al Fine")},
      { Jump::Type::DC_AL_CODA, "D.C. al Coda", "start", "coda", "codab", QT_TRANSLATE_NOOP("jumpType", "Da Capo al Coda")},
      { Jump::Type::DS_AL_CODA, "D.S. al Coda", "segno", "coda", "codab", QT_TRANSLATE_NOOP("jumpType", "D.S. al Coda")   },
      { Jump::Type::DS_AL_FINE, "D.S. al Fine", "segno", "fine", "",      QT_TRANSLATE_NOOP("jumpType", "D.S. al Fine")   },
      { Jump::Type::DS,         "D.S.",         "segno", "end",  "",      QT_TRANSLATE_NOOP("jumpType", "D.S.")           }
      };

int jumpTypeTableSize()
      {
      return sizeof(jumpTypeTable)/sizeof(JumpTypeTable);
      }

//---------------------------------------------------------
//   Jump
//---------------------------------------------------------

Jump::Jump(Score* s)
   : TextBase(s, Tid::REPEAT_RIGHT, ElementFlag::MOVABLE | ElementFlag::SYSTEM)
      {
      initElementStyle(&jumpStyle);
      setLayoutToParentWidth(true);
      _playRepeats = false;
      }

//---------------------------------------------------------
//   setJumpType
//---------------------------------------------------------

void Jump::setJumpType(Type t)
      {
      for (const JumpTypeTable& p : jumpTypeTable) {
            if (p.type == t) {
                  setXmlText(p.text);
                  setJumpTo(p.jumpTo);
                  setPlayUntil(p.playUntil);
                  setContinueAt(p.continueAt);
                  initTid(Tid::REPEAT_RIGHT);
                  break;
                  }
            }
      }

//---------------------------------------------------------
//   jumpType
//---------------------------------------------------------

Jump::Type Jump::jumpType() const
      {
      for (const JumpTypeTable& t : jumpTypeTable) {
            if (_jumpTo == t.jumpTo && _playUntil == t.playUntil && _continueAt == t.continueAt)
                  return t.type;
            }
      return Type::USER;
      }

QString Jump::jumpTypeUserName() const
      {
      int idx = static_cast<int>(this->jumpType());
      if (idx < jumpTypeTableSize())
            return qApp->translate("jumpType", jumpTypeTable[idx].userText.toUtf8().constData());
      return QObject::tr("Custom");
      }

//---------------------------------------------------------
//   layout
//---------------------------------------------------------

void Jump::layout()
      {
      setPos(QPointF(0.0, score()->styleP(Sid::jumpPosAbove)));
      TextBase::layout1();

      if (parent() && autoplace()) {
            setUserOff(QPointF());
#if 0
            int si             = staffIdx();
            qreal minDistance  = 0.5 * spatium(); // score()->styleP(Sid::tempoMinDistance);
            Shape& s1          = measure()->staffShape(si);
            Shape s2           = shape().translated(pos());
            if (placeAbove()) {
                  qreal d = s2.minVerticalDistance(s1);
                  if (d > -minDistance) {
                        qreal yd       = -d - minDistance;
                        rUserYoffset() = yd;
//.........这里部分代码省略.........
开发者ID:frankvanbever,项目名称:MuseScore,代码行数:101,代码来源:jump.cpp

示例12: QWidget


//.........这里部分代码省略.........
        verticalLayout_8->setObjectName(QStringLiteral("verticalLayout_8"));
        verticalLayout_8->setContentsMargins(0, 0, 0, 0);
        next_page_link_ = new QPushButton(next_button_widget);
        next_page_link_->setObjectName(QStringLiteral("next_page_link"));
        next_page_link_->setCursor(QCursor(Qt::PointingHandCursor));
        next_page_link_->setAutoDefault(true);
        next_page_link_->setDefault(false);
		Utils::ApplyStyle(next_page_link_, main_button_style);
        Testing::setAccessibleName(next_page_link_, "StartWindowLoginButton");
        
        verticalLayout_8->addWidget(next_page_link_);
        
        controls_layout->addWidget(next_button_widget);
		controls_layout->setAlignment(next_button_widget, Qt::AlignHCenter);

        QWidget* widget = new QWidget(controls_widget);
        widget->setObjectName(QStringLiteral("widget"));
        widget->setProperty("ErrorWIdget", QVariant(true));
        QVBoxLayout* verticalLayout_7 = new QVBoxLayout(widget);
        verticalLayout_7->setSpacing(0);
        verticalLayout_7->setObjectName(QStringLiteral("verticalLayout_7"));
        verticalLayout_7->setContentsMargins(0, 0, 0, 0);
        error_label_ = new QLabel(widget);
        error_label_->setObjectName(QStringLiteral("error_label"));
        error_label_->setAlignment(Qt::AlignCenter);
        error_label_->setProperty("ErrorLabel", QVariant(true));
        
        verticalLayout_7->addWidget(error_label_);
        
        controls_layout->addWidget(widget);
        
        main_layout->addWidget(controls_widget);
        
        QSpacerItem* horizontalSpacer_7 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        main_layout->addItem(horizontalSpacer_7);
        
        verticalLayout->addWidget(main_widget);
        
        QSpacerItem* verticalSpacer_2 = new QSpacerItem(0, 3, QSizePolicy::Minimum, QSizePolicy::Expanding);
        
        verticalLayout->addItem(verticalSpacer_2);
        
        QWidget* switch_login_widget = new QWidget(this);
        switch_login_widget->setObjectName(QStringLiteral("switch_login_widget"));
        switch_login_widget->setProperty("LoginButtonWidget", QVariant(true));
        QHBoxLayout* switch_login_layout = new QHBoxLayout(switch_login_widget);
        switch_login_layout->setSpacing(0);
        switch_login_layout->setObjectName(QStringLiteral("switch_login_layout"));
        switch_login_layout->setContentsMargins(0, 0, 0, 0);
        QSpacerItem* horizontalSpacer = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        switch_login_layout->addItem(horizontalSpacer);
        
        switch_login_link_ = new QPushButton(switch_login_widget);
        switch_login_link_->setObjectName(QStringLiteral("switch_login_link"));
        sizePolicy1.setHeightForWidth(switch_login_link_->sizePolicy().hasHeightForWidth());
        switch_login_link_->setSizePolicy(sizePolicy1);
        switch_login_link_->setCursor(QCursor(Qt::PointingHandCursor));
        switch_login_link_->setProperty("SwitchLoginButton", QVariant(true));
        Testing::setAccessibleName(switch_login_link_, "StartWindowChangeLoginType");
        
        switch_login_layout->addWidget(switch_login_link_);
        
        QSpacerItem* horizontalSpacer_2 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        switch_login_layout->addItem(horizontalSpacer_2);
        
        verticalLayout->addWidget(switch_login_widget);
        
        login_staked_widget_->setCurrentIndex(2);
        
        QMetaObject::connectSlotsByName(this);
        
        //prev_page_link_->setText(QString());
        welcome_label->setText(QT_TRANSLATE_NOOP("login_page","Welcome to ICQ"));
        edit_phone_button_->setText(QT_TRANSLATE_NOOP("login_page","Edit"));
        code_edit_->setPlaceholderText(QT_TRANSLATE_NOOP("login_page","Your code"));
        uin_login_edit_->setPlaceholderText(QT_TRANSLATE_NOOP("login_page","UIN or Email"));
        uin_login_edit_->setAttribute(Qt::WA_MacShowFocusRect, false);
        uin_password_edit_->setPlaceholderText(QT_TRANSLATE_NOOP("login_page","Password"));
        uin_password_edit_->setAttribute(Qt::WA_MacShowFocusRect, false);
        
        keep_logged_->setText(QT_TRANSLATE_NOOP("login_page","Keep me signed in"));
        keep_logged_->setChecked(get_gui_settings()->get_value(settings_keep_logged_in, true));
        connect(keep_logged_, &QCheckBox::toggled, [](bool v)
        {
            if (get_gui_settings()->get_value(settings_keep_logged_in, true) != v)
                get_gui_settings()->set_value(settings_keep_logged_in, v);
        });
        
        next_page_link_->setText(QT_TRANSLATE_NOOP("login_page","Continue"));
        Q_UNUSED(this);
        
        login_staked_widget_->setCurrentIndex(2);
        next_page_link_->setDefault(false);
        
        QMetaObject::connectSlotsByName(this);
		init();
	}
开发者ID:4ynyky,项目名称:icqdesktop,代码行数:101,代码来源:LoginPage.cpp

示例13: tabAt

void TabBarWidget::contextMenuEvent(QContextMenuEvent *event)
{
	if (event->reason() == QContextMenuEvent::Mouse)
	{
		event->accept();

		return;
	}

	m_clickedTab = tabAt(event->pos());

	hidePreview();

	MainWindow *mainWindow = MainWindow::findMainWindow(this);
	QVariantMap parameters;
	QMenu menu(this);
	menu.addAction(ActionsManager::getAction(ActionsManager::NewTabAction, this));
	menu.addAction(ActionsManager::getAction(ActionsManager::NewTabPrivateAction, this));

	if (m_clickedTab >= 0)
	{
		Window *window = getWindow(m_clickedTab);

		if (window)
		{
			parameters[QLatin1String("window")] = window->getIdentifier();
		}

		const int amount = (count() - getPinnedTabsAmount());
		const bool isPinned = getTabProperty(m_clickedTab, QLatin1String("isPinned"), false).toBool();
		Action *cloneTabAction = new Action(ActionsManager::CloneTabAction, &menu);
		cloneTabAction->setEnabled(getTabProperty(m_clickedTab, QLatin1String("canClone"), false).toBool());
		cloneTabAction->setData(parameters);

		Action *pinTabAction = new Action(ActionsManager::PinTabAction, &menu);
		pinTabAction->setOverrideText(isPinned ? QT_TRANSLATE_NOOP("actions", "Unpin Tab") : QT_TRANSLATE_NOOP("actions", "Pin Tab"));
		pinTabAction->setData(parameters);

		Action *detachTabAction = new Action(ActionsManager::DetachTabAction, &menu);
		detachTabAction->setEnabled(count() > 1);
		detachTabAction->setData(parameters);

		Action *closeTabAction = new Action(ActionsManager::CloseTabAction, &menu);
		closeTabAction->setEnabled(!isPinned);
		closeTabAction->setData(parameters);

		Action *closeOtherTabsAction = new Action(ActionsManager::CloseOtherTabsAction, &menu);
		closeOtherTabsAction->setEnabled(amount > 0 && !(amount == 1 && !isPinned));
		closeOtherTabsAction->setData(parameters);

		menu.addAction(cloneTabAction);
		menu.addAction(pinTabAction);
		menu.addSeparator();
		menu.addAction(detachTabAction);
		menu.addSeparator();
		menu.addAction(closeTabAction);
		menu.addAction(closeOtherTabsAction);
		menu.addAction(ActionsManager::getAction(ActionsManager::ClosePrivateTabsAction, this));

		connect(cloneTabAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
		connect(pinTabAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
		connect(detachTabAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
		connect(closeTabAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
		connect(closeOtherTabsAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
	}

	menu.addSeparator();

	QMenu *arrangeMenu = menu.addMenu(tr("Arrange"));
	Action *restoreTabAction = new Action(ActionsManager::RestoreTabAction, &menu);
	restoreTabAction->setEnabled(m_clickedTab >= 0);
	restoreTabAction->setData(parameters);

	Action *minimizeTabAction = new Action(ActionsManager::MinimizeTabAction, &menu);
	minimizeTabAction->setEnabled(m_clickedTab >= 0);
	minimizeTabAction->setData(parameters);

	Action *maximizeTabAction = new Action(ActionsManager::MaximizeTabAction, &menu);
	maximizeTabAction->setEnabled(m_clickedTab >= 0);
	maximizeTabAction->setData(parameters);

	arrangeMenu->addAction(restoreTabAction);
	arrangeMenu->addAction(minimizeTabAction);
	arrangeMenu->addAction(maximizeTabAction);
	arrangeMenu->addSeparator();
	arrangeMenu->addAction(ActionsManager::getAction(ActionsManager::RestoreAllAction, this));
	arrangeMenu->addAction(ActionsManager::getAction(ActionsManager::MaximizeAllAction, this));
	arrangeMenu->addAction(ActionsManager::getAction(ActionsManager::MinimizeAllAction, this));
	arrangeMenu->addSeparator();
	arrangeMenu->addAction(ActionsManager::getAction(ActionsManager::CascadeAllAction, this));
	arrangeMenu->addAction(ActionsManager::getAction(ActionsManager::TileAllAction, this));

	QAction *cycleAction = new QAction(tr("Switch tabs using the mouse wheel"), this);
	cycleAction->setCheckable(true);
	cycleAction->setChecked(!SettingsManager::getValue(QLatin1String("TabBar/RequireModifierToSwitchTabOnScroll")).toBool());

	connect(cycleAction, SIGNAL(toggled(bool)), this, SLOT(setCycle(bool)));
	connect(restoreTabAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
	connect(minimizeTabAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
	connect(maximizeTabAction, SIGNAL(triggered()), mainWindow, SLOT(triggerAction()));
//.........这里部分代码省略.........
开发者ID:insionng,项目名称:otter-browser,代码行数:101,代码来源:TabBarWidget.cpp

示例14: getNextFrame

       virtual bool         getNextFrame(uint32_t *fn,ADMImage *image);    /// Return the next image
	   virtual bool         getCoupledConf(CONFcouple **couples) ;   /// Return the current filter configuration
	   virtual void setCoupledConf(CONFcouple *couples);
       virtual bool         configure(void) ;                 /// Start graphical user interface        

}     ;



// Add the hook to make it valid plugin
DECLARE_VIDEO_FILTER(   ADMVideoHue,   // Class
                        1,0,0,              // Version
                        ADM_UI_TYPE_BUILD,         // UI
                        VF_COLORS,            // Category
                        "hue",            // internal name (must be uniq!)
                        QT_TRANSLATE_NOOP("hue","Mplayer Hue"),            // Display name
                        QT_TRANSLATE_NOOP("hue","Adjust hue and saturation.") // Description
                    );
/**
    \fn HueProcess_C
*/
void HueProcess_C(uint8_t *udst, uint8_t *vdst, uint8_t *usrc, uint8_t *vsrc, int dststride, int srcstride,
		    int w, int h, float hue, float sat)
{
	int i;
	const int s= (int)rint(sin(hue) * (1<<16) * sat);
	const int c= (int)rint(cos(hue) * (1<<16) * sat);

	while (h--) {
		for (i = 0; i<w; i++)
		{
开发者ID:TotalCaesar659,项目名称:avidemux2,代码行数:31,代码来源:ADM_vidHue.cpp

示例15: QLatin1String

/*!
 * Returns the last error message.
 * \sa unsetError(), error()
 */
QString Archive::errorString() const
{
	return _errorString.isEmpty()
			? QLatin1String(QT_TRANSLATE_NOOP(Archive, ("Unknown error")))
			: _errorString;
}
开发者ID:TurBoss,项目名称:makoureactor,代码行数:10,代码来源:Archive.cpp


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