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


C++ QT_TR_NOOP函数代码示例

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


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

示例1: UNUSED_ARG

/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap_old                          (GtkWidget       *widget,
                                        const gchar     *filename)
{
  gchar *pathname = NULL;
  GtkWidget *pixmap;

  UNUSED_ARG( widget );

  if (!filename || !filename[0])
      return gtk_image_new ();

  pathname = find_pixmap_file (filename);

  if (!pathname)
    {
      g_warning (QT_TR_NOOP("Couldn't find pixmap file: %s"), filename);
      return gtk_image_new ();
    }

  pixmap = gtk_image_new_from_file (pathname);
  g_free (pathname);
  return pixmap;
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:25,代码来源:ADM_icons.cpp

示例2: PX

uint8_t ADMVideoForcedPP::configure( AVDMGenericVideoStream *instream)
{
	_in=instream;
        
        #define PX(x) &(_param->x)
  
        
    diaElemUInteger   postProcStrength(PX(postProcStrength),QT_TR_NOOP("_Filter strength:"),0,5);
    diaElemUInteger   quant(PX(forcedQuant),QT_TR_NOOP("_Quantizer:"),1,31);
    //diaElemToggle     swapuv(PX(swapuv),QT_TR_NOOP("Swap U&V"));
    
    uint32_t hzd,vzd,dring;
    
#define DOME(x,y) if(_param->postProcType & x) y=1;else y=0;
    
    DOME(1,hzd);
    DOME(2,vzd);
    DOME(4,dring);
    
     diaElemToggle     fhzd(&hzd,QT_TR_NOOP("_Horizontal deblocking"));
     diaElemToggle     fvzd(&vzd,QT_TR_NOOP("_Vertical deblocking"));
     diaElemToggle     fdring(&dring,QT_TR_NOOP("_Deringing"));
    
    
    
      diaElem *elems[5]={&postProcStrength,&quant,&fhzd
                        ,&fvzd,&fdring};

   if(diaFactoryRun(QT_TR_NOOP("Forced Postprocessing"),5,elems))
  {
#undef DOME
#define DOME(x,y) if(y) _param->postProcType |=x;
    _param->postProcType =0;
    DOME(1,hzd);
    DOME(2,vzd);
    DOME(4,dring);
    updatePostProc(&_postproc );	
    return 1;
  }
  return 0;	
 	
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:42,代码来源:ADM_vidForcedPP.cpp

示例3: QT_TR_NOOP

void WizardStartPage::setupTexts()
{
    static const char* s_title = QT_TR_NOOP("Welcome to the %1 Setup Wizard");
    static const char* s_desc1 = QT_TR_NOOP("This wizard will guide you through the setup of %1.");
    static const char* s_desc2 = QT_TR_NOOP("You should have already received a username and password or a configuration file from your cluster administrator.");
    static const char* s_desc3 = QT_TR_NOOP("You can learn more about %1 at %2");
    static const char* s_language  = QT_TR_NOOP("Language");
    static const char* s_version  = QT_TR_NOOP("Version");

    ui->label_31->setText("<html><head/><body><p>" + tr(s_title).arg(sxWizard()->applicationName()) + "</p></body></html>");
    ui->label_32->setText(QString("<html><head/><body>"
                           "<p>"+tr(s_desc1).arg(sxWizard()->applicationName())+"</p>"
                           "<p>"+tr(s_desc2)+"</p>"
                           "<p>"+tr(s_desc3)+"</p>"
                           "</body></html>")
                          .arg(sxWizard()->applicationName())
                          .arg(QString("<a href=\"%1\"><span style=\" text-decoration: underline; color:#0000ff;\">%1</span></a>")
                               .arg(sxWizard()->wwwDocs())));

    ui->label->setText(tr(s_language));
    ui->versionLabel0->setText(tr(s_version));
}
开发者ID:rleo79,项目名称:sx-desktop-clients,代码行数:22,代码来源:wizardstartpage.cpp

示例4: lte_mac_statistics_init

// Stat command + args

static void
lte_mac_statistics_init(const char *args, void*) {
    QStringList args_l = QString(args).split(',');
    QByteArray filter;
    if (args_l.length() > 2) {
        filter = QStringList(args_l.mid(2)).join(",").toUtf8();
    }
    wsApp->emitStatCommandSignal("LteMacStatistics", filter.constData(), NULL);
}

static stat_tap_ui lte_mac_statistics_ui = {
    REGISTER_STAT_GROUP_TELEPHONY_LTE,
    QT_TR_NOOP("MAC Statistics"),
    "mac-lte,stat",
    lte_mac_statistics_init,
    0,
    NULL
};

extern "C" {
void
    register_tap_listener_qt_lte_mac_statistics(void)
    {
        register_stat_tap_ui(&lte_mac_statistics_ui, NULL);
    }
}

/*
开发者ID:acaceres2176,项目名称:wireshark,代码行数:30,代码来源:lte_mac_statistics_dialog.cpp

示例5: QLatin1String

 * END_COMMON_COPYRIGHT_HEADER */


#include "lxqtsysstatconfiguration.h"
#include "ui_lxqtsysstatconfiguration.h"
#include "lxqtsysstatutils.h"
#include "lxqtsysstatcolours.h"

#include <SysStat/CpuStat>
#include <SysStat/MemStat>
#include <SysStat/NetStat>

//Note: strings can't actually be translated here (in static initialization time)
//      the QT_TR_NOOP here is just for qt translate tools to get the strings for translation
const QStringList LXQtSysStatConfiguration::msStatTypes = {
    QLatin1String(QT_TR_NOOP("CPU"))
    , QLatin1String(QT_TR_NOOP("Memory"))
    , QLatin1String(QT_TR_NOOP("Network"))
};

namespace
{
    //Note: workaround for making source strings translatable
    //  (no need to ever call this function)
    void localizationWorkaround();
    auto t = localizationWorkaround;//avoid unused function warning
    void localizationWorkaround()
    {
        static_cast<void>(QT_TRANSLATE_NOOP("LXQtSysStatConfiguration", "cpu"));
        static_cast<void>(QT_TRANSLATE_NOOP("LXQtSysStatConfiguration", "cpu0"));
        static_cast<void>(QT_TRANSLATE_NOOP("LXQtSysStatConfiguration", "cpu1"));
开发者ID:lxde,项目名称:lxqt-panel,代码行数:31,代码来源:lxqtsysstatconfiguration.cpp

示例6: REGISTERX

#include "ADM_videoFilterDynamic.h"
#include "ADM_vidChromaShift.h"
#undef QT_TR_NOOP
#include "ADM_plugin_translate.h"

static FILTER_PARAM cshiftParam={2,{"u","v"}};
/*
REGISTERX(VF_COLORS, "chromashift",QT_TR_NOOP("Chroma shift")
    ,QT_TR_NOOP("Shift chroma U/V to fix badly synced luma/chroma."),VF_CHROMASHIFT,1,create_chromashift,chromashift_script);

SCRIPT_CREATE(chromashift_script,ADMVideoChromaShift,cshiftParam);
BUILD_CREATE(create_chromashift,ADMVideoChromaShift);
*/
VF_DEFINE_FILTER_UI(ADMVideoChromaShift,cshiftParam,
    chromashift,
                QT_TR_NOOP("Chroma shift"),
                1,
                VF_COLORS,
                QT_TR_NOOP("Shift chroma U/V to fix badly synced luma/chroma."));
char *ADMVideoChromaShift::printConf( void )
{
 	ADM_FILTER_DECLARE_CONF(" Chroma shift U:%d  V:%d",
            _param->u,_param->v);
        
}

ADMVideoChromaShift::ADMVideoChromaShift(  AVDMGenericVideoStream *in,CONFcouple *couples)
{

 	_in=in;		
   	memcpy(&_info,_in->getInfo(),sizeof(_info));  		
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:31,代码来源:ADM_vidChromaShift.cpp

示例7: create_threshold_dialog

GtkWidget*
create_threshold_dialog (void)
{
  GtkWidget *threshold_dialog;
  GtkWidget *dialogVbox;
  GtkWidget *allButButtonsVbox;
  GtkWidget *settingsOuterHbox;
  GtkWidget *settingsOuterVbox;
  GtkWidget *minValueVbox;
  GtkWidget *minValueLabel;
  GtkWidget *minValueHbox;
  GtkWidget *minValueSlider;
  GtkObject *minValueSpinner_adj;
  GtkWidget *minValueSpinner;
  GtkWidget *maxValueVbox;
  GtkWidget *maxValueLabel;
  GtkWidget *maxValueHbox;
  GtkWidget *maxValueSlider;
  GtkObject *maxValueSpinner_adj;
  GtkWidget *maxValueSpinner;
  GtkWidget *outputValuesHbox;
  GtkWidget *outputValuesLabel;
  GtkWidget *outputValuesMenu;
  GtkWidget *debugHbox;
  GtkWidget *debugLabel;
  GtkObject *debugSpinButton_adj;
  GtkWidget *debugSpinButton;
  GtkWidget *previewFrame;
  GtkWidget *previewAlignment;
  GtkWidget *previewVbox;
  GtkWidget *previewControlHbox;
  GtkWidget *previewOutputMenu;
  GtkWidget *previewSlider;
  GtkWidget *previewVideo;
  GtkWidget *previewLabel;
  GtkWidget *dialogButtonBox;
  GtkWidget *cancelButton;
  GtkWidget *okButton;

  threshold_dialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (threshold_dialog), QT_TR_NOOP("Threshold"));
  gtk_window_set_type_hint (GTK_WINDOW (threshold_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialogVbox = GTK_DIALOG (threshold_dialog)->vbox;
  gtk_widget_show (dialogVbox);

  allButButtonsVbox = gtk_vbox_new (FALSE, 12);
  gtk_widget_show (allButButtonsVbox);
  gtk_box_pack_start (GTK_BOX (dialogVbox), allButButtonsVbox, TRUE, TRUE, 0);

  settingsOuterHbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (settingsOuterHbox);
  gtk_box_pack_start (GTK_BOX (allButButtonsVbox), settingsOuterHbox, FALSE, TRUE, 0);

  settingsOuterVbox = gtk_vbox_new (FALSE, 12);
  gtk_widget_show (settingsOuterVbox);
  gtk_box_pack_start (GTK_BOX (settingsOuterHbox), settingsOuterVbox, TRUE, TRUE, 0);

  minValueVbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (minValueVbox);
  gtk_box_pack_start (GTK_BOX (settingsOuterVbox), minValueVbox, FALSE, FALSE, 0);

  minValueLabel = gtk_label_new (QT_TR_NOOP("Minimum value to be in-range:"));
  gtk_widget_show (minValueLabel);
  gtk_box_pack_start (GTK_BOX (minValueVbox), minValueLabel, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (minValueLabel), 0.5, 1);
  gtk_misc_set_padding (GTK_MISC (minValueLabel), 0, 8);

  minValueHbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (minValueHbox);
  gtk_box_pack_start (GTK_BOX (minValueVbox), minValueHbox, TRUE, TRUE, 0);

#ifdef ORIGINAL_CODE_GENERATED_BY_GLADE
  minValueSlider = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 255, 1, 1, 0)));
#else
  minValueSpinner_adj = gtk_adjustment_new (0, 0, 255, 1, 1, 0);
  minValueSlider = gtk_hscale_new (GTK_ADJUSTMENT (minValueSpinner_adj));
#endif
  gtk_widget_show (minValueSlider);
  gtk_box_pack_start (GTK_BOX (minValueHbox), minValueSlider, TRUE, TRUE, 0);
  gtk_scale_set_draw_value (GTK_SCALE (minValueSlider), FALSE);
  gtk_scale_set_value_pos (GTK_SCALE (minValueSlider), GTK_POS_LEFT);
  gtk_scale_set_digits (GTK_SCALE (minValueSlider), 0);

#ifdef ORIGINAL_CODE_GENERATED_BY_GLADE
  minValueSpinner_adj = gtk_adjustment_new (0, 0, 255, 1, 10, 10);
#endif
  minValueSpinner = gtk_spin_button_new (GTK_ADJUSTMENT (minValueSpinner_adj), 1, 0);
  gtk_widget_show (minValueSpinner);
  gtk_box_pack_start (GTK_BOX (minValueHbox), minValueSpinner, FALSE, TRUE, 0);

  maxValueVbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (maxValueVbox);
  gtk_box_pack_start (GTK_BOX (settingsOuterVbox), maxValueVbox, FALSE, FALSE, 0);

  maxValueLabel = gtk_label_new (QT_TR_NOOP("Maximum value to be in-range:"));
  gtk_widget_show (maxValueLabel);
  gtk_box_pack_start (GTK_BOX (maxValueVbox), maxValueLabel, FALSE, FALSE, 0);

  maxValueHbox = gtk_hbox_new (FALSE, 5);
//.........这里部分代码省略.........
开发者ID:TotalCaesar659,项目名称:avidemux2,代码行数:101,代码来源:DIA_threshold.cpp

示例8: printf

//______________________________________
//
// Open and get the headears/index built
// along way
//______________________________________
uint8_t    OpenDMLHeader::open(const char *name)
{
uint8_t badAvi=0;
uint32_t rd;

	printf("** opening OpenDML files **");	
        
	_fd=fopen(name,"rb");
	if(!_fd)
	{
		printf("\n cannot open %s \n",name);
		return 0;
	}
        myName=ADM_strdup(name);
#define CLR(x)              memset(& x,0,sizeof(  x));

              CLR( _videostream);
              CLR( _mainaviheader);
	      _isvideopresent=1;
	      _isaudiopresent=0;    	     	      	 	      
	      
		_nbTrack=0;
		riffParser *parser=new riffParser(name);
		
		if(MKFCC('R','I','F','F')!=(rd=parser->read32()))
			{
				printf("Not riff\n");badAvi=1;
				printf("%lx != %lx\n",rd,MKFCC('R','I','F','F'));
			}
		parser->read32();
		if(MKFCC('A','V','I',' ')!=parser->read32())
			{
				printf("Not Avi\n");badAvi=1;
			}
		
		if(!badAvi)
			{
				walk(parser);	
			
			}					
		delete parser;
		aprintf("Found %d tracks\n:-----------\n",_nbTrack);
		// check if it looks like a correct avi
		if(!_nbTrack) badAvi=1;
		
		// if we are up to here -> good avi :)
		if(badAvi)
		{
			printf("FAIL\n");
			return 0;
		}
		// now read up each parts...
		//____________________________
		
#ifdef __WIN32
                
#define DUMP_TRACK(i) aprintf(" at %I64u (%I64x) size : %I64u (%I64x)\n", \
                                _Tracks[i].strh.offset,\
                                _Tracks[i].strh.offset,\
                                _Tracks[i].strh.size,\
                                _Tracks[i].strh.size);

#else
                
#define DUMP_TRACK(i) aprintf(" at %llu (%llx) size : %llu (%llx)\n", \
				_Tracks[i].strh.offset,\
				_Tracks[i].strh.offset,\
				_Tracks[i].strh.size,\
				_Tracks[i].strh.size);
#endif								
		for(uint32_t i=0;i<_nbTrack;i++)
		{
			DUMP_TRACK(i);		
		}		
		
		uint32_t vidTrack=0xff;
		// search wich track is the video one
		// and load it to _videoheader
		
		for(uint32_t i=0;i<_nbTrack;i++)
		{
			fseeko(_fd,_Tracks[i].strh.offset,SEEK_SET);
			if(_Tracks[i].strh.size!=sizeof(_videostream))
			{
				printf("Mmm(1) we have a bogey here, size mismatch : %"LLU"\n",_Tracks[i].strh.size);
				printf("expected %d\n",sizeof(_videostream));
				if(_Tracks[i].strh.size<sizeof(_videostream)-8) // RECT is not mandatory
				{
                                  GUI_Error_HIG(QT_TR_NOOP("Malformed header"), NULL);
					return 0;
				}		
				printf("Trying to continue anyway\n");			
			}
			fread(&_videostream,sizeof(_videostream),1,_fd);
#ifdef ADM_BIG_ENDIAN
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:ADM_openDML.cpp

示例9: create_ChromaShift

GtkWidget*
create_ChromaShift (void)
{
  GtkWidget *ChromaShift;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox1;
  GtkWidget *table1;
  GtkWidget *label1;
  GtkWidget *label2;
  GtkObject *spinbutton_U_adj;
  GtkWidget *spinbutton_U;
  GtkObject *spinbutton_V_adj;
  GtkWidget *spinbutton_V;
  GtkWidget *hscale;
  GtkWidget *frame1;
  GtkWidget *alignment1;
  GtkWidget *drawingarea1;
  GtkWidget *label3;
  GtkWidget *dialog_action_area1;
  GtkWidget *cancelbutton1;
  GtkWidget *applybutton1;
  GtkWidget *okbutton1;

  ChromaShift = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (ChromaShift), QT_TR_NOOP("ChromaShift"));
  gtk_window_set_type_hint (GTK_WINDOW (ChromaShift), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (ChromaShift)->vbox;
  gtk_widget_show (dialog_vbox1);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);

  table1 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (vbox1), table1, FALSE, FALSE, 0);

  label1 = gtk_label_new (QT_TR_NOOP("U Shift :"));
  gtk_widget_show (label1);
  gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);

  label2 = gtk_label_new (QT_TR_NOOP("V Shift :"));
  gtk_widget_show (label2);
  gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);

  spinbutton_U_adj = gtk_adjustment_new (0, -32, 32, 1, 10, 0);
  spinbutton_U = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_U_adj), 1, 0);
  gtk_widget_show (spinbutton_U);
  gtk_table_attach (GTK_TABLE (table1), spinbutton_U, 1, 2, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_U), TRUE);

  spinbutton_V_adj = gtk_adjustment_new (0, -32, 32, 1, 10, 0);
  spinbutton_V = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_V_adj), 1, 0);
  gtk_widget_show (spinbutton_V);
  gtk_table_attach (GTK_TABLE (table1), spinbutton_V, 1, 2, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_V), TRUE);

  hscale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 1, 0)));
  gtk_widget_show (hscale);
  gtk_box_pack_start (GTK_BOX (vbox1), hscale, FALSE, FALSE, 0);
  gtk_scale_set_digits (GTK_SCALE (hscale), 0);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE);

  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);

  drawingarea1 = gtk_drawing_area_new ();
  gtk_widget_show (drawingarea1);
  gtk_container_add (GTK_CONTAINER (alignment1), drawingarea1);

  label3 = gtk_label_new (QT_TR_NOOP("<b>Preview</b>"));
  gtk_widget_show (label3);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label3);
  gtk_label_set_use_markup (GTK_LABEL (label3), TRUE);

  dialog_action_area1 = GTK_DIALOG (ChromaShift)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (ChromaShift), cancelbutton1, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:DIA_chromaShift.cpp

示例10: QT_TR_NOOP

    bool DeppointCardPage::populateFromWidgets()
    {      
      static const char* fullNameTitle = QT_TR_NOOP("Full name");
      static const char* shortNameTitle = QT_TR_NOOP("Short name");
      static const char* remarkTitle = QT_TR_NOOP("Remarks");      

      static const char* messageTitle = QT_TR_NOOP("Invalid data input");
      static const char* notEmpty = QT_TR_NOOP("Field \"%1\" can\'t be empty.");
      static const char* tooLongText = QT_TR_NOOP("Field \"%1\" can\'t exceed %2 characters.");      

      int contentsTabIndex = ui_.tabWidget->indexOf(ui_.contentsTab);
      bool validated;
      // Get full name
      QString fullName = ui_.fullNameEdit->text().trimmed();
      if (fullName.isEmpty())
      {
        validated = false;
        QMessageBox::warning(this, tr(messageTitle), tr(notEmpty).arg(tr(fullNameTitle)));
      } 
      else if (fullName.length() > model::Deppoint::fullNameMaxLen)
      {
        validated = false;
        QMessageBox::warning(this, tr(messageTitle), tr(tooLongText).arg(tr(fullNameTitle)).arg(model::Deppoint::fullNameMaxLen));
      }
      else
      {
        validated = true;
      }
      if (!validated)
      {
        ui_.tabWidget->setCurrentIndex(contentsTabIndex);
        ui_.fullNameEdit->setFocus(Qt::TabFocusReason);
        ui_.fullNameEdit->selectAll();
        return false;
      }
      // Get short name
      QString shortName = ui_.shortNameEdit->text().trimmed();
      if (shortName.isEmpty())
      {
        validated = false;
        QMessageBox::warning(this, tr(messageTitle), tr(notEmpty).arg(tr(shortNameTitle)));
      } 
      else if (shortName.length() > model::Deppoint::shortNameMaxLen)
      {
        validated = false;
        QMessageBox::warning(this, tr(messageTitle), tr(tooLongText).arg(tr(shortNameTitle)).arg(model::Deppoint::shortNameMaxLen));
      }
      else
      {
        validated = true;
      }
      if (!validated)
      {
        ui_.tabWidget->setCurrentIndex(contentsTabIndex);
        ui_.shortNameEdit->setFocus(Qt::TabFocusReason);
        ui_.shortNameEdit->selectAll();
        return false;
      }
      // Get remarks
      QString remark = ui_.remarksText->toPlainText().trimmed();      
      if (remark.length() > model::Deppoint::remarkMaxLen)
      {
        validated = false;
        QMessageBox::warning(this, tr(messageTitle), tr(tooLongText).arg(tr(remarkTitle)).arg(model::Deppoint::remarkMaxLen));                
      }
      else
      {
        validated = true;
      }
      if (!validated)
      {
        ui_.tabWidget->setCurrentIndex(contentsTabIndex);
        ui_.remarksText->setFocus(Qt::TabFocusReason);
        ui_.remarksText->selectAll();
        return false;
      }      
      entityData_.fullName  = fullName;
      entityData_.shortName = shortName;
      entityData_.remark    = remark.isEmpty() ? OptionalQString() : remark;
      return true;
    }
开发者ID:mabrarov,项目名称:chrono,代码行数:81,代码来源:deppointcardpage.cpp

示例11: create_dialog1

GtkWidget*
create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox1;
  GtkWidget *drawingarea1;
  GtkWidget *gui_scale;
  GtkWidget *hbox1;
  GtkWidget *curve1;
  GtkWidget *vbox2;
  GtkWidget *drawingarea_histin;
  GtkWidget *drawingarea_histout;
  GtkWidget *dialog_action_area1;
  GtkWidget *button1;
  GtkWidget *button2;
  GtkWidget *button3;
  GtkWidget *button4;

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), QT_TR_NOOP("Equalizer"));
  gtk_window_set_type_hint (GTK_WINDOW (dialog1), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);

  drawingarea1 = gtk_drawing_area_new ();
  gtk_widget_show (drawingarea1);
  gtk_box_pack_start (GTK_BOX (vbox1), drawingarea1, TRUE, TRUE, 0);

  gui_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 10, 10)));
  gtk_widget_show (gui_scale);
  gtk_box_pack_start (GTK_BOX (vbox1), gui_scale, TRUE, TRUE, 0);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);

  curve1 = gtk_curve_new ();
  gtk_widget_show (curve1);
  gtk_box_pack_start (GTK_BOX (hbox1), curve1, TRUE, TRUE, 0);
  gtk_curve_set_range (GTK_CURVE (curve1), 0, 1, 0, 1);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox2);
  gtk_box_pack_start (GTK_BOX (hbox1), vbox2, TRUE, TRUE, 0);

  drawingarea_histin = gtk_drawing_area_new ();
  gtk_widget_show (drawingarea_histin);
  gtk_box_pack_start (GTK_BOX (vbox2), drawingarea_histin, TRUE, TRUE, 0);

  drawingarea_histout = gtk_drawing_area_new ();
  gtk_widget_show (drawingarea_histout);
  gtk_box_pack_start (GTK_BOX (vbox2), drawingarea_histout, TRUE, TRUE, 0);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  button1 = gtk_button_new_from_stock ("gtk-clear");
  gtk_widget_show (button1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), button1, A_RESET);
  GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);

  button2 = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (button2);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), button2, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT);

  button3 = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (button3);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), button3, GTK_RESPONSE_APPLY);
  GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);

  button4 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (button4);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), button4, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, drawingarea1, "drawingarea1");
  GLADE_HOOKUP_OBJECT (dialog1, gui_scale, "gui_scale");
  GLADE_HOOKUP_OBJECT (dialog1, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (dialog1, curve1, "curve1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (dialog1, drawingarea_histin, "drawingarea_histin");
  GLADE_HOOKUP_OBJECT (dialog1, drawingarea_histout, "drawingarea_histout");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialog1, button1, "button1");
  GLADE_HOOKUP_OBJECT (dialog1, button2, "button2");
  GLADE_HOOKUP_OBJECT (dialog1, button3, "button3");
  GLADE_HOOKUP_OBJECT (dialog1, button4, "button4");

//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:DIA_equalizer.cpp

示例12: ADM_vob2vobsub

//**********************************************
uint8_t ADM_vob2vobsub(char *nameVob, char *nameVobSub, char *nameIfo)
{
   dmx_demuxerPS *demuxer=NULL;
   DIA_working *working=NULL;
   MPEG_TRACK track;
   FILE *indexFile=NULL;
   FILE *indexSub=NULL;
   uint32_t palette[16],width,height;
   uint64_t abs,rel,size,pts;
   int blockSize;
   uint8_t *data,stream;
   char *subname;
   double percent;
   uint32_t packetLen,usedLen,read;
   OneTrack allIndex[MAX_LANGUAGE];
   char language[MAX_LANGUAGE*4];
#ifdef  TEST_V2V  
   nameIfo="d:/Crime/VTS_01_0.IFO";
   nameVobSub="toto.idx";
#endif
   
        printf("v2v: Ifo:%s Vob:%s Vsub:%s\n",nameIfo,nameVob,nameVobSub);

   memset(language,0,sizeof(language));
   memset(palette,0,sizeof(uint32_t)*16);
   if(!vobsub_parse_ifo(nameIfo,palette,&width,&height,language))
   {
     GUI_Error_HIG(QT_TR_NOOP("Ifo error"),QT_TR_NOOP("Error reading ifo file, aborting."));   
        return 0;
   } 
   printf("Ifo: %d x %d\n",width,height);                 
   
   indexFile=fopen(nameVobSub,"wt");
   if(!indexFile)
   {
     GUI_Error_HIG(QT_TR_NOOP("Cannot write .idx"),NULL);              
        return 0;
    }
   subname=ADM_strdup(nameVobSub);
   size=strlen(subname);
   subname[size-3]='s';
   subname[size-2]='u';
   subname[size-1]='b';
   indexSub=fopen(subname,"wb");
   ADM_dealloc(subname);
    if(!indexSub)
    {
        fclose(indexFile);
        GUI_Error_HIG(QT_TR_NOOP("Cannot write .sub"),NULL);
        return 0;
    }
   for(int i=0;i<MAX_LANGUAGE;i++)
   {
         allIndex[i].setLang(language+i*3);  
   }
   track.pes=0x20;
   track.pid=track.pes;
   demuxer=new  dmx_demuxerPS(1,&track,1);
   if(!demuxer->open(nameVob))
   {
     GUI_Error_HIG(QT_TR_NOOP("Problem opening the mpeg files"),NULL);
        delete demuxer;
        fclose(indexFile);
        fclose(indexSub);
        return 0;   
   }
   
   
   size=demuxer->getSize();
   
    int display=0;
    
   dumpHeader(indexFile,0,width,height,palette);
   working=new DIA_working(QT_TR_NOOP("Generating VobSub file"));
   
   //*** Main Loop ***
   uint32_t startPts=0,lastPts=0;
   uint16_t hh,mm,ss,ms;
   uint32_t timestamp;
   while(1)
   {
       if(!demuxer->forceRefill(&stream)) goto _abt;
       demuxer->getPos(&abs,&rel);
       display++;
       if(display>20)
       {
        working->update(abs>>10,size>>10);
        display=0;
       }
#ifdef TEST_V2V       
       //if(abs>200*1024*1024) break;
#endif       
       if(stream>=0x20 && stream<0x20+MAX_LANGUAGE)
       {
            demuxer->getPacketInfo(&data,&packetLen,&usedLen,&pts);
            if(pts!=ADM_NO_PTS)
            {
                        // Wrap around ?
                        if(lastPts)
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:101,代码来源:ADM_vob2vobsub.cpp

示例13: setMacIcon

	void TrayIcon::init()
	{
		MessageAlert_->hide();

		MainWindow_->setWindowIcon(*Base_);
        if (!platform::is_apple())
        {
            Icon_->setIcon(*TrayBase_);
        }
        else
        {
            setMacIcon();
        }
        
        onlineAction_ = dndAction_ = invAction_ = NULL;
        
        
#ifdef __APPLE__
        
        onlineAction_ = Menu_->addAction(QIcon(":/resources/content_status_online_200.png"), QT_TR_NOOP("Online"), this, SLOT(menuStateOnline()));
        dndAction_ = Menu_->addAction(QIcon(":/resources/content_status_dnd_200.png"), QT_TR_NOOP("Do not disturb"), this, SLOT(menuStateDoNotDisturb()));
        invAction_ = Menu_->addAction(QIcon(":/resources/content_status_invisible_200.png"), QT_TR_NOOP("Invisible"), this, SLOT(menuStateInvisible()));
        
        updateStatus();
        
        Menu_->addSeparator();
        
//#ifdef UPDATES
//        Menu_->addAction(QIcon(), QT_TRANSLATE_NOOP("context_menu", "Check for updates..."), parent(), SLOT(checkForUpdates()));
//        Menu_->addSeparator();
//#endif
        Menu_->addAction(QT_TRANSLATE_NOOP("context_menu","Quit"), parent(), SLOT(exit()));
#else
        Menu_->addActionWithIcon(QIcon(Utils::parse_image_name(":/resources/dialog_quit_100.png")), QT_TRANSLATE_NOOP("context_menu","Quit"), parent(), SLOT(exit()));
#endif
        
		Icon_->setContextMenu(Menu_);
		connect(Icon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(activated(QSystemTrayIcon::ActivationReason)), Qt::QueuedConnection);
        Icon_->show();
	}
开发者ID:13W,项目名称:icq-desktop,代码行数:40,代码来源:TrayIcon.cpp

示例14: QT_TR_NOOP

const char *
EncoderRequant::getDisplayName (void)
{
  return QT_TR_NOOP("Requant");
}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:5,代码来源:adm_encRequant.cpp

示例15: QString

QString ProfileContext::typeName(ProfileContext::Type t)
{
    if (!_typeName) {
	_typeName = new QString [MaxType+1];
	QString* strs = _typeName;
	for(int i=0;i<=MaxType;i++)
	    strs[i] = QString("?");

	strs[InvalidType] = QT_TR_NOOP("Invalid Context");
	strs[UnknownType] = QT_TR_NOOP("Unknown Context");
	strs[PartLine] = QT_TR_NOOP("Part Source Line");
	strs[Line] = QT_TR_NOOP("Source Line");
	strs[PartLineCall] = QT_TR_NOOP("Part Line Call");
	strs[LineCall] = QT_TR_NOOP("Line Call");
	strs[PartLineJump] = QT_TR_NOOP("Part Jump");
	strs[LineJump] = QT_TR_NOOP("Jump");
	strs[PartInstr] = QT_TR_NOOP("Part Instruction");
	strs[Instr] = QT_TR_NOOP("Instruction");
	strs[PartInstrJump] = QT_TR_NOOP("Part Instruction Jump");
	strs[InstrJump] = QT_TR_NOOP("Instruction Jump");
	strs[PartInstrCall] = QT_TR_NOOP("Part Instruction Call");
	strs[InstrCall] = QT_TR_NOOP("Instruction Call");
	strs[PartCall] = QT_TR_NOOP("Part Call");
	strs[Call] = QT_TR_NOOP("Call");
	strs[PartFunction] = QT_TR_NOOP("Part Function");
	strs[FunctionSource] = QT_TR_NOOP("Function Source File");
	strs[Function] = QT_TR_NOOP("Function");
	strs[FunctionCycle] = QT_TR_NOOP("Function Cycle");
	strs[PartClass] = QT_TR_NOOP("Part Class");
	strs[Class] = QT_TR_NOOP("Class");
	strs[PartFile] = QT_TR_NOOP("Part Source File");
	strs[File] = QT_TR_NOOP("Source File");
	strs[PartObject] = QT_TR_NOOP("Part ELF Object");
	strs[Object] = QT_TR_NOOP("ELF Object");
	strs[Part] = QT_TR_NOOP("Profile Part");
	strs[Data] = QT_TR_NOOP("Program Trace");
    }
    if (t<0 || t> MaxType) t = MaxType;
    return _typeName[t];
}
开发者ID:Zekom,项目名称:kcachegrind,代码行数:40,代码来源:context.cpp


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