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

C++ I18N_NOOP函数代码示例

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

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



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

示例1: I18N_NOOP


#include "soundkonverterapp.h"
#include "soundkonverter.h"
#include "global.h"

#include <kdeui_export.h>
#include <KMainWindow>
#include <KUniqueApplication>
#include <KAboutData>
#include <KCmdLineArgs>
#include <KLocale>


static const char description[] =
    I18N_NOOP("soundKonverter is a frontend to various audio converters, Replay Gain tools and CD rippers.\n\nPlease file bug reports at https://github.com/dfaust/soundkonverter/issues");

static const char version[] = SOUNDKONVERTER_VERSION_STRING;

int main(int argc, char **argv)
{
    KAboutData about("soundkonverter", 0, ki18n("soundKonverter"), version, ki18n(description), KAboutData::License_GPL, ki18n("(C) 2005-2016 Daniel Faust"), KLocalizedString(), 0, "[email protected]");
    about.addAuthor( ki18n("Daniel Faust"), KLocalizedString(), "[email protected]" );
    about.addCredit( ki18n("David Vignoni"), ki18n("Nuvola icon theme"), 0, "http://www.icon-king.com" );
    about.addCredit( ki18n("Scott Wheeler"), ki18n("TagLib"), "[email protected]", "http://ktown.kde.org/~wheeler" );
    about.addCredit( ki18n("Marco Nelles"), ki18n("Audex"), 0, "http://opensource.maniatek.de/audex" );
    about.addCredit( ki18n("Amarok developers"), ki18n("Amarok"), 0, "http://amarok.kde.org" );
    about.addCredit( ki18n("All programmers of audio converters"), ki18n("Backends") );
    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
开发者ID:HessiJames,项目名称:soundkonverter,代码行数:29,代码来源:main.cpp


示例2: addStrategy

    addStrategy( new BarnDoorWipeStrategy( Vertical, "vertical", false ) );
    addStrategy( new BarnDoorWipeStrategy( VerticalReverse, "vertical", true ) );
    addStrategy( new BarnDoorWipeStrategy( Horizontal, "horizontal", false ) );
    addStrategy( new BarnDoorWipeStrategy( HorizontalReverse, "horizontal", true ) );
    addStrategy( new BarnDoorWipeStrategy( DiagonalBottomLeft, "diagonalBottomLeft", false ) );
    addStrategy( new BarnDoorWipeStrategy( DiagonalBottomLeftReverse, "diagonalBottomLeft", true ) );
    addStrategy( new BarnDoorWipeStrategy( DiagonalTopLeft, "diagonalTopLeft", false ) );
    addStrategy( new BarnDoorWipeStrategy( DiagonalTopLeftReverse, "diagonalTopLeft", true ) );
}

BarnDoorWipeEffectFactory::~BarnDoorWipeEffectFactory()
{
}

static const char* s_subTypes[] = {
    I18N_NOOP( "Vertical" ),
    I18N_NOOP( "Vertical Reverse" ),
    I18N_NOOP( "Horizontal" ),
    I18N_NOOP( "Horizontal Reverse" ),
    I18N_NOOP( "Diagonal Bottom Left" ),
    I18N_NOOP( "Diagonal Bottom Left Reverse" ),
    I18N_NOOP( "Diagonal Top Left" ),
    I18N_NOOP( "Diagonal Top Left Reverse" )
};

QString BarnDoorWipeEffectFactory::subTypeName(int subType) const
{
    if (subType >= 0 && (uint)subType < sizeof s_subTypes / sizeof s_subTypes[0]) {
        return i18n( s_subTypes[subType] );
    } else {
        return i18n( "Unknown subtype" );
开发者ID:KDE,项目名称:calligra-history,代码行数:31,代码来源:BarnDoorWipeEffectFactory.cpp


示例3: addStrategy

    shape.moveTo(0, -25);
    shape.lineTo(25, 0);
    shape.lineTo(0, 25);
    shape.lineTo(-25, 0);
    shape.closeSubpath();
    addStrategy(new SCIrisWipeEffectStrategyBase(shape, Diamond, "irisWipe", "diamond", false));

    //diamond reverse
    addStrategy(new SCIrisWipeEffectStrategyBase(shape, DiamondReverse, "irisWipe", "diamond", true));
}

SCIrisWipeEffectFactory::~SCIrisWipeEffectFactory()
{
}

static const char* s_subTypes[] = {
    I18N_NOOP("Rectangular"),
    I18N_NOOP("Rectangular Reverse"),
    I18N_NOOP("Diamond"),
    I18N_NOOP("Diamond Reverse")
};

QString SCIrisWipeEffectFactory::subTypeName(int subType) const
{
    if (subType >= 0 && (uint)subType < sizeof s_subTypes / sizeof s_subTypes[0]) {
        return i18n(s_subTypes[subType]);
    } else {
        return i18n("Unknown subtype");
    }
}
开发者ID:KDE,项目名称:koffice,代码行数:30,代码来源:SCIrisWipeEffectFactory.cpp


示例4: QPainterPath

    //horizontal
    shape = QPainterPath();
    shape.moveTo(-12, 0);
    shape.quadTo(0, 10, 12, 0);
    shape.quadTo(0, -10, -12, 0);
    addStrategy(new SCIrisWipeEffectStrategyBase(shape, Horizontal, "eyeWipe", "horizontal", false));

    //horizontal reverse
    addStrategy(new SCIrisWipeEffectStrategyBase(shape, HorizontalReverse, "eyeWipe", "horizontal", true));
}

SCEyeWipeEffectFactory::~SCEyeWipeEffectFactory()
{
}

static const char* s_subTypes[] = {
    I18N_NOOP("Vertical"),
    I18N_NOOP("Vertical Reverse"),
    I18N_NOOP("Horizontal"),
    I18N_NOOP("Horizontal Reverse"),
};

QString SCEyeWipeEffectFactory::subTypeName(int subType) const
{
    if (subType >= 0 && (uint)subType < sizeof s_subTypes / sizeof s_subTypes[0]) {
        return i18n(s_subTypes[subType]);
    } else {
        return i18n("Unknown subtype");
    }
}
开发者ID:KDE,项目名称:koffice,代码行数:30,代码来源:SCEyeWipeEffectFactory.cpp


示例5: I18N_NOOP

#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
#include "cameroa.h"

// Inclusions pour la camera
//
#include "Apogee.h"
#include "ApnCamera.h"
#include "SimulateurApogee.h"


// Declarations
//

static const char description[] = I18N_NOOP("A KDE KPart Application");
static const char version[] = "1.0";

// Liste des options supportees par la ligne de commande
//
enum ArgumentsApplication {
	CheminRepCamerOA,
	CheminFichCertCA_OA,
	CheminFichCertServCamerOA,
	CheminFichClePriveeServCamerOA,
	CheminFichParamDH,
	MdpClePriveeServeur,
	AdresseClientAutorise,
	PortCanalCommandes,
	PortCanalDonnees,
	ArretSysteme
开发者ID:maelvalais,项目名称:cameroa,代码行数:31,代码来源:main.cpp


示例6: main

// Fonction principale de l'application
//
int main(int argc, char **argv)
{
	int lancement=true;			// Drapeau pour savoir si on doit lancer l'application
	int ArretSystemeEnQuittant=false;	// Drapeau pour le lancement de l'arret du systeme en quittant l'application
	int retour=0;				// Valeur de retour de la fin de l'application
	
	// Renseignements KDE
	//
	KAboutData about("cameroa", I18N_NOOP("CamerOA"), version, description,KAboutData::License_GPL, "(C) 2006 David Romeuf", 0, 0, "[email protected]");
	about.addAuthor( "David Romeuf", 0, "[email protected]" );
	
	
	// Initialisation des options de la ligne de commande (avec les Qt et KDE specifiques)
	//
	KCmdLineArgs::init(argc, argv, &about);
	
	// Ajout des options possibles sur la ligne de commande supportees par l'application
	//
	KCmdLineArgs::addCmdLineOptions(options);
	
	// Acces aux arguments reconnus par l'application
	//
	KCmdLineArgs *arguments=KCmdLineArgs::parsedArgs();
	
	// On test la validite des arguments
	//
	if( !QDir(arguments->getOption(OptionsLC[CheminRepCamerOA])).exists() )
	{
		std::cerr << "CamerOA: ERREUR: Le repertoire " << arguments->getOption(OptionsLC[CheminRepCamerOA]) << " n'existe pas." << std::endl;
		lancement=false;
	}
	
	struct in_addr AdresseClient;
	
	if( !inet_aton(arguments->getOption(OptionsLC[AdresseClientAutorise]),&AdresseClient) )
	{
		std::cerr << "CamerOA: ERREUR: L'adresse du client autorise " << arguments->getOption(OptionsLC[AdresseClientAutorise]) << "est invalide." << std::endl;
		lancement=false;
	}
	AdresseClient.s_addr=ntohl(AdresseClient.s_addr);
	
	if( QString(arguments->getOption(OptionsLC[ArretSysteme])) == QString("o") ) ArretSystemeEnQuittant=true;
	
	
	if( lancement )
	{
		// Instanciation de l'objet camera :
		//
		// ApnCamera.cpp contient le code de la classe CApnCamera definit dans ApnCamera.h commun
		//  a toutes les versions d'interfaces peripheriques (USB, Ethernet). Aucun code n'est
		//  specialise USB/Linux.
		//
		// ApnCamera_USB.cpp contient le code de la classe CApnCamera definit dans ApnCamera.h
		//  specialise pour la version USB (par exemple la methode InitDriver() qui n'est pas
		//  codee dans ApnCamera.cpp).
		//
		// ApogeeUsbLinux.cpp contient toutes les fonctions de communication via USB pour Linux
		//  utilisees par l'objet CApnCamera (par exemple : ApnUsbOpen() qui recherche les
		//  peripheriques par Id vendeur, ApnUsbClose()).
		//
#ifndef _SIMULATEUR_APOGEE
		CameraCCD=new CApnCamera();
#else
		CameraCCD=new SimulateurApogeeUSB(false);
#endif

		// Initialisation du systeme de la camera et test de communication USB
		//
		// Le numero de camera est celui trouve par ordre d'Id vendeur Apogee en scannant tous
		//  les bus USB.
		//
		if( !CameraCCD->InitDriver(NumeroCamera,0,0) )
		{
			std::cout << "CamerOA: ERREUR: Impossible d'initialiser le systeme de la camera." << std::endl;
			exit(EXIT_FAILURE);
		}

		// Reinitialisation complete du systeme de la camera et permission du flushing (vidage)
		//  FPGA_BIT_CMD_FLUSH
		//
		if( !CameraCCD->ResetSystem() )
		{
			std::cout << "CamerOA: ERREUR: Impossible de reinitialiser le systeme de la camera." << std::endl;
			exit(EXIT_FAILURE);
		}

		// Recuperation des informations de la camera (version Linux speciale dans
		//  ApnCamera_Linux.cpp)
		//
		CameraCCD->sensorInfo();

		// Mode de fonctionnement de la camera
		//
		CameraCCD->write_CameraMode(Apn_CameraMode_Normal);

		// Parametrage du mode des diodes LED sur la camera
		//
		//  Apn_LedMode_DisableAll, Apn_LedMode_DisableWhileExpose, Apn_LedMode_EnableAll
//.........这里部分代码省略.........
开发者ID:maelvalais,项目名称:cameroa,代码行数:101,代码来源:main.cpp


示例7: I18N_NOOP

namespace KStdAccel {

struct KStdAccelInfo
{
    StdAccel id;
    const char *psName;
    const char *psDesc;
    int cutDefault, cutDefault4, cutDefault3B, cutDefault4B;
    KShortcut cut;
    bool bInitialized;
};

/** Array of predefined KStdAccelInfo objects, which cover all
    the "standard" accelerators. Each enum value from StdAccel
    should appear in this table.
*/
static KStdAccelInfo g_infoStdAccel[] = {
    {AccelNone, "Group:File", I18N_NOOP("File"), 0, 0, 0, 0, KShortcut(), false},
    {Open, I18N_NOOP("Open"), 0, Qt::CTRL + Qt::Key_O, 0, 0, 0, KShortcut(), false},
    {New, I18N_NOOP("New"), 0, Qt::CTRL + Qt::Key_N, 0, 0, 0, KShortcut(), false},
    {Close, I18N_NOOP("Close"), 0, Qt::CTRL + Qt::Key_W, Qt::CTRL + Qt::Key_Escape, 0, Qt::CTRL + Qt::Key_W, KShortcut(), false},
    {Save, I18N_NOOP("Save"), 0, Qt::CTRL + Qt::Key_S, 0, 0, 0, KShortcut(), false},
    {Print, I18N_NOOP("Print"), 0, Qt::CTRL + Qt::Key_P, 0, 0, 0, KShortcut(), false},
    {Quit, I18N_NOOP("Quit"), 0, Qt::CTRL + Qt::Key_Q, 0, 0, 0, KShortcut(), false},
    {AccelNone, "Group:Edit", I18N_NOOP("Edit"), 0, 0, 0, 0, KShortcut(), false},
    {Undo, I18N_NOOP("Undo"), 0, Qt::CTRL + Qt::Key_Z, 0, 0, 0, KShortcut(), false},
    {Redo, I18N_NOOP("Redo"), 0, Qt::CTRL + Qt::SHIFT + Qt::Key_Z, 0, 0, 0, KShortcut(), false},
    {Cut, I18N_NOOP("Cut"), 0, Qt::CTRL + Qt::Key_X, 0, Qt::SHIFT + Qt::Key_Delete, 0, KShortcut(), false},
    {Copy, I18N_NOOP("Copy"), 0, Qt::CTRL + Qt::Key_C, 0, Qt::CTRL + Qt::Key_Insert, 0, KShortcut(), false},
    {Paste, I18N_NOOP("Paste"), 0, Qt::CTRL + Qt::Key_V, 0, Qt::SHIFT + Qt::Key_Insert, 0, KShortcut(), false},
    {PasteSelection, I18N_NOOP("Paste Selection"), 0, 0, 0, Qt::CTRL + Qt::SHIFT + Qt::Key_Insert, 0, KShortcut(), false},
    {SelectAll, "SelectAll", I18N_NOOP("Select All"), Qt::CTRL + Qt::Key_A, 0, 0, 0, KShortcut(), false},
    {Deselect, I18N_NOOP("Deselect"), 0, Qt::CTRL + Qt::SHIFT + Qt::Key_A, 0, 0, 0, KShortcut(), false},
    {DeleteWordBack, "DeleteWordBack", I18N_NOOP("Delete Word Backwards"), Qt::CTRL + Qt::Key_Backspace, 0, 0, 0, KShortcut(), false},
    {DeleteWordForward, "DeleteWordForward", I18N_NOOP("Delete Word Forward"), Qt::CTRL + Qt::Key_Delete, 0, 0, 0, KShortcut(), false},
    {Find, I18N_NOOP("Find"), 0, Qt::CTRL + Qt::Key_F, 0, 0, 0, KShortcut(), false},
    {FindNext, "FindNext", I18N_NOOP("Find Next"), Qt::Key_F3, 0, 0, 0, KShortcut(), false},
    {FindPrev, "FindPrev", I18N_NOOP("Find Prev"), Qt::SHIFT + Qt::Key_F3, 0, 0, 0, KShortcut(), false},
    {Replace, I18N_NOOP("Replace"), 0, Qt::CTRL + Qt::Key_R, 0, 0, 0, KShortcut(), false},
    {AccelNone, "Group:Navigation", I18N_NOOP("Navigation"), 0, 0, 0, 0, KShortcut(), false},
    {Home, I18N_NOOP2("Opposite to End", "Home"), 0, Qt::CTRL + Qt::Key_Home, 0, Qt::Key_HomePage, 0, KShortcut(), false},
    {End, I18N_NOOP("End"), 0, Qt::CTRL + Qt::Key_End, 0, 0, 0, KShortcut(), false},
    {BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, KShortcut(), false},
    {EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, KShortcut(), false},
    {Prior, I18N_NOOP("Prior"), 0, Qt::Key_Prior, 0, 0, 0, KShortcut(), false},
    {Next, I18N_NOOP2("Opposite to Prior", "Next"), 0, Qt::Key_Next, 0, 0, 0, KShortcut(), false},
    {GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL + Qt::Key_G, 0, 0, 0, KShortcut(), false},
    {AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL + Qt::Key_B, 0, 0, 0, KShortcut(), false},
    {ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL + Qt::Key_Plus, 0, 0, 0, KShortcut(), false},
    {ZoomOut, "ZoomOut", I18N_NOOP("Zoom Out"), Qt::CTRL + Qt::Key_Minus, 0, 0, 0, KShortcut(), false},
    {Up, I18N_NOOP("Up"), 0, Qt::ALT + Qt::Key_Up, 0, 0, 0, KShortcut(), false},
    {Back, I18N_NOOP("Back"), 0, Qt::ALT + Qt::Key_Left, 0, Qt::Key_Back, 0, KShortcut(), false},
    {Forward, I18N_NOOP("Forward"), 0, Qt::ALT + Qt::Key_Right, 0, Qt::Key_Forward, 0, KShortcut(), false},
    {Reload, I18N_NOOP("Reload"), 0, Qt::Key_F5, 0, Qt::Key_Refresh, 0, KShortcut(), false},
    {PopupMenuContext, "PopupMenuContext", I18N_NOOP("Popup Menu Context"), Qt::Key_Menu, 0, 0, 0, KShortcut(), false},
    {ShowMenubar, "ShowMenubar", I18N_NOOP("Show Menu Bar"), Qt::CTRL + Qt::Key_M, 0, 0, 0, KShortcut(), false},
    {BackwardWord, "BackwardWord", I18N_NOOP("Backward Word"), Qt::CTRL + Qt::Key_Left, 0, 0, 0, KShortcut(), false},
    {ForwardWord, "ForwardWord", I18N_NOOP("Forward Word"), Qt::CTRL + Qt::Key_Right, 0, 0, 0, KShortcut(), false},
    {TabNext, I18N_NOOP("Activate Next Tab"), 0, Qt::CTRL + Qt::Key_Period, 0, Qt::CTRL + Qt::Key_BracketRight, 0, KShortcut(), false},
    {TabPrev, I18N_NOOP("Activate Previous Tab"), 0, Qt::CTRL + Qt::Key_Comma, 0, Qt::CTRL + Qt::Key_BracketLeft, 0, KShortcut(), false},
    {FullScreen, "FullScreen", I18N_NOOP("Full Screen Mode"), Qt::CTRL + Qt::SHIFT + Qt::Key_F, 0, 0, 0, KShortcut(), false},
    {AccelNone, "Group:Help", I18N_NOOP("Help"), 0, 0, 0, 0, KShortcut(), false},
    {Help, I18N_NOOP("Help"), 0, Qt::Key_F1, 0, 0, 0, KShortcut(), false},
    {WhatsThis, "WhatsThis", I18N_NOOP("What's This"), Qt::SHIFT + Qt::Key_F1, 0, 0, 0, KShortcut(), false},
    {AccelNone, "Group:TextCompletion", I18N_NOOP("Text Completion"), 0, 0, 0, 0, KShortcut(), false},
    {TextCompletion, "TextCompletion", I18N_NOOP("Text Completion"), Qt::CTRL + Qt::Key_E, 0, 0, 0, KShortcut(), false},
    {PrevCompletion, "PrevCompletion", I18N_NOOP("Previous Completion Match"), Qt::CTRL + Qt::Key_Up, 0, 0, 0, KShortcut(), false},
    {NextCompletion, "NextCompletion", I18N_NOOP("Next Completion Match"), Qt::CTRL + Qt::Key_Down, 0, 0, 0, KShortcut(), false},
    {SubstringCompletion, "SubstringCompletion", I18N_NOOP("Substring Completion"), Qt::CTRL + Qt::Key_T, 0, 0, 0, KShortcut(), false},
    {RotateUp, "RotateUp", I18N_NOOP("Previous Item in List"), Qt::Key_Up, 0, 0, 0, KShortcut(), false},
    {RotateDown, "RotateDown", I18N_NOOP("Next Item in List"), Qt::Key_Down, 0, 0, 0, KShortcut(), false},
    {AccelNone, 0, 0, 0, 0, 0, 0, KShortcut(), false}};

/** Search for the KStdAccelInfo object associated with the given @p id. */
static KStdAccelInfo *infoPtr(StdAccel id)
{
    if(id != AccelNone)
    {
        // Linear search. Changing the data structure doesn't seem possible
        // (since we need groups for the config stuff), but maybe a little
        // additional hashtable wouldn't hurt.
        for(uint i = 0; g_infoStdAccel[i].psName != 0; i++)
        {
            if(g_infoStdAccel[i].id == id)
                return &g_infoStdAccel[i];
        }
    }
    return 0;
}

/** Initialize the accelerator @p id by checking if it is overridden
    in the configuration file (and if it isn't, use the default).
*/
static void initialize(StdAccel id)
{
    KConfigGroupSaver saver(KGlobal::config(), "Shortcuts");
    KStdAccelInfo *pInfo = infoPtr(id);

    if(!pInfo)
    {
//.........这里部分代码省略.........
开发者ID:serghei,项目名称:kde3-kdelibs,代码行数:101,代码来源:kstdaccel.cpp


示例8: I18N_NOOP

 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include "kupdaemon.h"

#include <KStartupInfo>
#include <KUniqueApplication>
#include <KAboutData>
#include <KCmdLineArgs>

#include <QDebug>

static const char description[] = I18N_NOOP("Kup is a flexible backup solution using the backup storage system 'bup'. "
                                            "This allows it to quickly perform incremental backups, only saving the "
                                            "parts of files that has actually changed since last backup was taken.");

static const char version[] = "0.3";

int main(int argc, char **argv) {
	KupDaemon *lDaemon = new KupDaemon();
	if(!lDaemon->shouldStart()) {
		qWarning() <<ki18n("Kup is not enabled, enable it from the system settings module.").toString();
		return 0;
	}
	KAboutData lAbout("kupdaemon", "kup", ki18nc("@title", "Kup Daemon"), version, ki18n(description),
	                  KAboutData::License_GPL, ki18n("Copyright (C) 2011 Simon Persson"),
	                  KLocalizedString(), 0, "[email protected]");
	lAbout.addAuthor(ki18n("Simon Persson"), KLocalizedString(), "[email protected]");
	KCmdLineArgs::init(argc, argv, &lAbout);
开发者ID:kcroot,项目名称:Kup,代码行数:31,代码来源:main.cpp


示例9: I18N_NOOP

namespace Kst {

const QString EventMonitorEntry::staticTypeString = I18N_NOOP("Event Monitor");
const QString EventMonitorEntry::staticTypeTag = I18N_NOOP("eventmonitor");

namespace {
  const int EventMonitorEventType = int(QEvent::User) + 2931;
  class EventMonitorEvent : public QEvent {
    public:
      EventMonitorEvent(const QString& msg) : QEvent(QEvent::Type(EventMonitorEventType)), logMessage(msg) {}
      QString logMessage;
  };
}

//extern "C" int yyparse();
//extern "C" void *ParsedEquation;
//extern "C" struct yy_buffer_state *yy_scan_string(const char*);

const QString EventMonitorEntry::OUTXVECTOR('X');
const QString EventMonitorEntry::OUTYVECTOR('Y');

EventMonitorEntry::EventMonitorEntry(ObjectStore *store) : DataObject(store) {
  _level = Debug::Warning;
  _logDebug = true;
  _logEMail = false;
  _logELOG = false;

  const int NS = 1;

  _numDone = 0;
  _isValid = false;
  _pExpression = 0L;

  _typeString = staticTypeString;
  _type = "Event";
  _initializeShortName();

  VectorPtr xv = store->createObject<Vector>();
  xv->resize(NS);
  xv->setProvider(this);
  _xVector = _outputVectors.insert(OUTXVECTOR, xv);

  VectorPtr yv = store->createObject<Vector>();
  yv->resize(NS);
  yv->setProvider(this);
  _yVector = _outputVectors.insert(OUTYVECTOR, yv);
}

void EventMonitorEntry::_initializeShortName() {
}

bool EventMonitorEntry::reparse() {
  _isValid = false;
  if (!_event.isEmpty()) {
    Equations::mutex().lock();
    yy_scan_string(_event.toLatin1());
    int rc = yyparse(store());
    if (rc == 0) {
      _pExpression = static_cast<Equations::Node*>(ParsedEquation);
      Equations::Context ctx;
      Equations::FoldVisitor vis(&ctx, &_pExpression);
      StringMap stm;
      _pExpression->collectObjects(_vectorsUsed, _inputScalars, stm);

      for (ScalarMap::ConstIterator i = _inputScalars.begin(); i != _inputScalars.end(); ++i) {
        if ((*i)->myLockStatus() == KstRWLock::UNLOCKED) {
          (*i)->readLock();
        }
      }
      Equations::mutex().unlock();
      _isValid = true;
    } else {
      delete (Equations::Node*)ParsedEquation;
      Equations::mutex().unlock();
    }
    ParsedEquation = 0L;
  }
  return _isValid;
}


void EventMonitorEntry::save(QXmlStreamWriter &xml) {
  xml.writeStartElement(staticTypeTag);
  xml.writeAttribute("equation", _event);
  xml.writeAttribute("description", _description);
  xml.writeAttribute("logdebug", QVariant(_logDebug).toString());
  xml.writeAttribute("loglevel", QVariant(_level).toString());
  xml.writeAttribute("logemail", QVariant(_logEMail).toString());
  xml.writeAttribute("logelog", QVariant(_logELOG).toString());
  xml.writeAttribute("emailrecipients", _eMailRecipients);
  xml.writeAttribute("script", _script);
  xml.writeEndElement();
}


EventMonitorEntry::~EventMonitorEntry() {
  logImmediately(false);

  delete _pExpression;
  _pExpression = 0L;
//.........这里部分代码省略.........
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:101,代码来源:eventmonitorentry.cpp


示例10: AutoAwayPlugin

#include <X11/Xutil.h>
#include <X11/Xlibint.h>
#include <X11/extensions/scrnsaver.h>
#endif

const unsigned AUTOAWAY_TIME	= 10000;

Plugin *createAutoAwayPlugin(unsigned base, bool, Buffer *config)
{
    Plugin *plugin = new AutoAwayPlugin(base, config);
    return plugin;
}

static PluginInfo info =
    {
        I18N_NOOP("AutoAway"),
        I18N_NOOP("Plugin provides set away and N/A status after some idle time"),
        VERSION,
        createAutoAwayPlugin,
        PLUGIN_DEFAULT
    };

EXPORT_PROC PluginInfo* GetPluginInfo()
{
    return &info;
}

#if defined(HAVE_CARBON_CARBON_H) && !defined(HAVE_X)

static unsigned mSecondsIdle = 0;
static EventLoopTimerRef mTimerRef;
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:31,代码来源:autoaway.cpp


示例11: I18N_NOOP

 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#include <kapplication.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>

#include "ktimer.h"

static const char description[] =
        I18N_NOOP("KDE Timer");

static const char version[] = "v0.1";

int main( int argc, char **argv )
{
    KAboutData aboutData( "ktimer", I18N_NOOP("KTimer"),
                          version, description, KAboutData::License_GPL,
                          "(c) 2001, Stefan Schimanski");
    aboutData.addAuthor("Stefan Schimanski",0, "[email protected]");
    KCmdLineArgs::init( argc, argv, &aboutData );

    KApplication app;

    KTimerPref *timer = new KTimerPref;
    app.setMainWidget( timer );
开发者ID:serghei,项目名称:kde3-kdeutils,代码行数:31,代码来源:main.cpp


示例12: I18N_NOOP

    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, see http://www.gnu.org/licenses/

*/

#include "mainwindow.h"
#include "choqokbehaviorsettings.h"
#include "choqokapplication.h"
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <KDE/KLocale>

static const char description[] =
    I18N_NOOP( "KDE Micro-Blogging Client." );

static const char version[] = "1.3.1";

int main( int argc, char **argv )
{
    qDebug()<<"Choqok "<<version;
    KAboutData about( "choqok", 0, ki18n( "Choqok" ), version, ki18n( description ),
                      KAboutData::License_GPL_V3, ki18n( "(C) 2008-2010 Mehrdad Momeny\n(C) 2011-2012 Choqok Developers" ),
                      KLocalizedString(), 0  );
    about.addAuthor( ki18n( "Mehrdad Momeny" ), ki18n( "Author and Core Developer" ),
                     "[email protected]", "http://identi.ca/mtux" );
    about.addAuthor( ki18n( "Andrey Esin" ), ki18n( "Developer" ),
                     "[email protected]", "http://twitter.com/la_stik" );
    about.addCredit( ki18n( "Roozbeh Shafiee" ), ki18n( "Artworks" ), "[email protected]" );
    about.addCredit( ki18n( "Shahrzad Shojaei" ), ki18n( "Artworks" ), "[email protected]" );
开发者ID:xrg,项目名称:choqok,代码行数:31,代码来源:main.cpp


示例13: SMSClient

{
}

SMSProtocol::~SMSProtocol()
{
}

Client *SMSProtocol::createClient(Buffer *cfg)
{
    return new SMSClient(this, cfg);
}

static CommandDef sms_descr =
    {
        0,
        I18N_NOOP("SMS"),
        "SMS",
        NULL,
        NULL,
        0,
        0,
        0,
        0,
        0,
        PROTOCOL_NOPROXY | PROTOCOL_TEMP_DATA | PROTOCOL_NODATA | PROTOCOL_NO_AUTH,
        NULL,
        NULL
    };

const CommandDef *SMSProtocol::description()
{
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:31,代码来源:sms.cpp


示例14: error_state

void SMSClient::ta_error()
{
    error_state(I18N_NOOP("Port error"), 0);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:4,代码来源:sms.cpp


示例15: I18N_NOOP

 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

//#include "protoeditor.h"
#include "mainwindow.h"
#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>

static const char description[] =
  I18N_NOOP("A little KDE PHP Debugger client");

static const char version[] = "0.5";

static KCmdLineOptions options[] =
  {
    { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
    KCmdLineLastOption
  };


int main(int argc, char **argv)
{
  KAboutData about("protoeditor", I18N_NOOP("Protoeditor"), version, description,
                   KAboutData::License_GPL, "(C) 2004 Thiago Silva", 0, 0, "[email protected]");
  about.addAuthor( "Thiago Silva", 0, "[email protected]" );
开发者ID:thiago-silva,项目名称:protoeditor,代码行数:31,代码来源:protoeditor.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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