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


C++ DEBUG_MAKE_INDENT函数代码示例

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


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

示例1: DEBUG_MSG

GMap<GUTF8String, GUTF8String>
DjVuANT::get_metadata(GLParser & parser)
{
  DEBUG_MSG("DjVuANT::get_map_areas(): forming and returning back list of map areas\n");
  DEBUG_MAKE_INDENT(3);
  
  GMap<GUTF8String, GUTF8String> mdata;
  
  GPList<GLObject> list=parser.get_list();
  for(GPosition pos=list;pos;++pos)
    {
      GLObject & obj=*list[pos];
      if (obj.get_type()==GLObject::LIST && obj.get_name()==METADATA_TAG)  
        { 
          G_TRY 
            {
              for(int obj_num=0;obj_num<obj.get_list().size();obj_num++)
                {
                  GLObject & el=*obj[obj_num];
                  const int type = el.get_type();
                  if (type == GLObject::LIST)
                    { 
                      const GUTF8String & name=el.get_name();  
                      mdata[name]=(el[0])->get_string();
                    }
                }
            } 
          G_CATCH_ALL { } G_ENDCATCH;
        }
    }
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:30,代码来源:DjVuAnno.cpp

示例2: DEBUG_MSG

void
GIFFChunk::set_name(GUTF8String name)
{
  DEBUG_MSG("GIFFChunk::set_name(): name='" << name << "'\n");
  DEBUG_MAKE_INDENT(3);

  const int colon=name.search(':');
  if(colon>=0)
  {
    type=name.substr(0,colon);
    name=name.substr(colon+1,(unsigned int)-1);
    if(name.search(':')>=0)
      G_THROW( ERR_MSG("GIFFManager.one_colon") );
  }

  DEBUG_MSG("auto-setting type to '" << type << "'\n");

  if (name.contains(".[]")>=0)
    G_THROW( ERR_MSG("GIFFManager.bad_char") );

  strncpy(GIFFChunk::name, (const char *)name, 4);
  GIFFChunk::name[4]=0;
  for(int i=strlen(GIFFChunk::name);i<4;i++)
    GIFFChunk::name[i]=' ';
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:25,代码来源:GIFFManager.cpp

示例3: DEBUG_MSG

void
QDBase::createCursors(void)
{
   DEBUG_MSG("QDBase::createCursors(): loading cursors...\n");
   DEBUG_MAKE_INDENT(3);
#ifdef UNIX
   QSize wait_size(wait_width, wait_height);
   cur_wait=new QCursor(QBitmap(wait_size, (u_char *) wait_bits, TRUE),
		    QBitmap(wait_size, (u_char *) wait_mask_bits, TRUE),
		    wait_x, wait_y);

   QSize hand1_size(hand1_width, hand1_height);
   cur_hand1=new QCursor(QBitmap(hand1_size, (u_char *) hand1_bits, TRUE),
		     QBitmap(hand1_size, (u_char *) hand1_mask_bits, TRUE),
		     hand1_x, hand1_y);

   QSize hand2_size(hand2_width, hand2_height);
   cur_hand2=new QCursor(QBitmap(hand2_size, (u_char *) hand2_bits, TRUE),
		     QBitmap(hand2_size, (u_char *) hand2_mask_bits, TRUE),
		     hand2_x, hand2_y);

   QSize zoom_select_size(zoom_select_width, zoom_select_height);
   cur_zoom_select=new QCursor(QBitmap(zoom_select_size, 
                                       (u_char *) zoom_select_bits, TRUE),
                               QBitmap(zoom_select_size, 
                                       (u_char *) zoom_select_mask_bits, TRUE),
		     zoom_select_x, zoom_select_y);

   cur_hand_hl=new QCursor(ArrowCursor);	// TODO: get X11 cursor instead
   cur_ptr=new QCursor(ArrowCursor);
   cur_blank=new QCursor(BlankCursor);
#endif
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:33,代码来源:qd_base.cpp

示例4: DEBUG_MSG

void
DjVuFileCache::add_file(const GP<DjVuFile> & file)
{
   DEBUG_MSG("DjVuFileCache::add_file(): trying to add a new item\n");
   DEBUG_MAKE_INDENT(3);

   GCriticalSectionLock lock(&class_lock);

      // See if the file is already cached
   GPosition pos;
   for(pos=list;pos;++pos)
      if (list[pos]->get_file()==file) break;
   
   if (pos) list[pos]->refresh();	// Refresh the timestamp
   else
   {
	 // Doesn't exist in the list yet
      int _max_size=enabled ? max_size : 0;
      if (max_size<0) _max_size=max_size;

      int add_size=file->get_memory_usage();
   
      if (_max_size>=0 && add_size>_max_size)
      {
	 DEBUG_MSG("but this item is way too large => doing nothing\n");
	 return;
      }

      if (_max_size>=0) clear_to_size(_max_size-add_size);

      list.append(new Item(file));
      cur_size+=add_size;
      file_added(file);
   }
}
开发者ID:smyts,项目名称:tengwa-djvu,代码行数:35,代码来源:DjVuFileCache.cpp

示例5: DEBUG_MSG

void
DjVuViewer::attach(QWidget * parent)
{
   DEBUG_MSG("DjVuViewer::attach(): attaching to parent=" << parent << "\n");
   DEBUG_MAKE_INDENT(3);

   qeApp->killWidget(viewer); viewer=0;
   
   if (!doc_pool)
   {
	 // Postpone attachment until the data is known.
      attach_postpone=true;
      attach_parent=parent;
   } else
   {
      viewer=new QDViewer(in_netscape, plugin_data, parent, "qd_viewer");
      connect(viewer, SIGNAL(destroyed(void)), this, SLOT(slotViewerDestroyed(void)));
      connect(viewer, SIGNAL(sigShowStatus(const QString &)),
	      this, SIGNAL(sigShowStatus(const QString &)));
      connect(viewer, SIGNAL(sigGetURL(const GURL &, const GUTF8String &)),
	      this, SIGNAL(sigGetURL(const GURL &, const GUTF8String &)));

      viewer->resize(parent->size());
      viewer->show();
      parent->installEventFilter(this);

	 // What if we're being reattached by Netscape? Set DjVuImage immediately.
      if (document)
        viewer->setDjVuDocument(document, plugin_data.page_id);
   }
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:31,代码来源:djvu_viewer.cpp

示例6: QObject

DjVuViewer::DjVuViewer(int _in_netscape, const QDViewer::PluginData & _plugin_data) :
      QObject(0, "djvu_viewer"), plugin_data(_plugin_data), in_netscape(_in_netscape)
{
   DEBUG_MSG("DjVuViewer::DjVuViewer(): initializing class...\n");
   DEBUG_MAKE_INDENT(3);

   request_data_cb=0;
   request_data_cl_data=0;

   attach_postpone=false;
   
   port=new DjVuViewerPort(this);
   
   viewer=0;

#if THREADMODEL==COTHREADS
   if (!QDThrYielder::isInitialized()) QDThrYielder::initialize();
#endif

   messenger.setLookAhead(1);
   
      // Connect signals of the QDMessenger
   connect(&messenger, SIGNAL(sigGetURL(const GURL &, const GUTF8String &)),
	   this, SIGNAL(sigGetURL(const GURL &, const GUTF8String &)));
   connect(&messenger, SIGNAL(sigShowError(const GUTF8String &, const GUTF8String &)),
	   this, SLOT(slotShowError(const GUTF8String &, const GUTF8String &)));
   connect(&messenger, SIGNAL(sigShowStatus(const QString &)),
	   this, SIGNAL(sigShowStatus(const QString &)));
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:29,代码来源:djvu_viewer.cpp

示例7: DEBUG_MSG

void
QDBase::decodeAnno(bool allow_redraw)
      // Will create DjVuAnno and call processAnno()
{
   DEBUG_MSG("QDBase::decodeAnno(): decoding...\n");
   DEBUG_MAKE_INDENT(3);
   
   if ( !dimg ) return;
   G_TRY {
      bool anno_processed=false;
      anno=dimg->get_decoded_anno();
      
      if (anno && anno->ant)
      {
	 processAnno(allow_redraw);
	 anno_processed=true;
      }
      if (!anno_processed)
      {
	 // If we didn't find anything to process, clean annotations
	 // from the previous (if any) page.
	 cleanAnno(allow_redraw);
      }
   } G_CATCH(exc) {
      anno=0;
      showError(this, exc);
   } G_ENDCATCH;
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:28,代码来源:qd_base_ant.cpp

示例8: DEBUG_MSG

void
MapArea::attachWindow(QWidget * _pane, GRectMapper * _mapper)
{
   DEBUG_MSG("MapArea::attachWindow(): attaching the window...\n");
   DEBUG_MAKE_INDENT(3);

   pane=_pane; mapper=_mapper;
   
   initBorder();
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:10,代码来源:MapAreas.cpp

示例9: QeDialog

QDViewerPrefs::QDViewerPrefs(DjVuPrefs * _prefs, QWidget * parent,
			     const char * name, bool modal) :
      QeDialog(parent, name, modal), cache_disabled(false), prefs(_prefs)
{
   DEBUG_MSG("QDViewerPrefs::QDViewerPrefs(): Creating Viewer Prefs dialog...\n");
   DEBUG_MAKE_INDENT(3);

   setCaption(tr("DjVu: Viewer Preferences"));
   QWidget *start = startWidget();
   QVBoxLayout * top_vlay=new QVBoxLayout(start, 10, 5, "top_vlay");
   QTabWidget *tabwidget = new QTabWidget(start, "tabwidget");
   top_vlay->addWidget(tabwidget);
   
      // *** Tabs
   gamma_prefs = new QDGammaPrefs(_prefs, tabwidget, "gamma_prefs");
   tabwidget->addTab(gamma_prefs, tr("Gamma"));
   tbar_prefs=new QDTbarPrefs(_prefs, tabwidget, "tbar_prefs");
   tabwidget->addTab(tbar_prefs, tr("Toolbar"));
   hlink_prefs=new QDHlinkPrefs(_prefs, tabwidget, "hlink_prefs");
   tabwidget->addTab(hlink_prefs, tr("Links"));
   lens_prefs=new QDLensPrefs(_prefs, tabwidget, "lens_prefs");
   tabwidget->addTab(lens_prefs, tr("Lens"));
   cache_prefs=new QDCachePrefs(_prefs, true, tabwidget, "cache_prefs");
   tabwidget->addTab(cache_prefs, tr("Cache"));
   optim_prefs=new QDOptimPrefs(_prefs, tabwidget, "optim_prefs");
   tabwidget->addTab(optim_prefs, tr("Optimization"));

      // ** Bottom Row
   QHBoxLayout * butt_lay=new QHBoxLayout(top_vlay, 2);
   global_butt=new QCheckBox(tr("Save preferences."), start, "global_butt");
   global_butt->setChecked(TRUE);
   butt_lay->addWidget(global_butt);
   butt_lay->addStretch(1);
#ifndef QT1
   QPushButton * help_butt=new QPushButton(tr("Help"), start, "ok_butt");
   butt_lay->addWidget(help_butt);
#endif
   QPushButton * ok_butt=new QPushButton(tr("&OK"), start, "ok_butt");
   ok_butt->setDefault(TRUE);
   butt_lay->addWidget(ok_butt);
   QPushButton * cancel_butt=new QPushButton(tr("&Cancel"), start, "cancel_butt");
   butt_lay->addWidget(cancel_butt);

      // Connecting signals and slots
#ifndef QT1
   connect(help_butt, SIGNAL(clicked(void)), this, SLOT(slotHelp(void)));
#endif
   connect(ok_butt, SIGNAL(clicked(void)), this, SLOT(accept(void)));
   connect(cancel_butt, SIGNAL(clicked(void)), this, SLOT(reject(void)));
   connect(global_butt, SIGNAL(toggled(bool)), this, SLOT(slotGlobalToggled(bool)));
   connect(hlink_prefs, SIGNAL(sigHotKeyChanged(DjVuPrefs::HLButtType)),
	   lens_prefs, SLOT(slotHlHotKeyChanged(DjVuPrefs::HLButtType)));
   connect(lens_prefs, SIGNAL(sigHotKeyChanged(DjVuPrefs::MagButtType)),
	   hlink_prefs, SLOT(slotMagHotKeyChanged(DjVuPrefs::MagButtType)));
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:55,代码来源:qd_viewer_prefs.cpp

示例10: DEBUG_MSG

void
QDViewerPrefs::done(int rc)
{
   DEBUG_MSG("QDViewerPrefs::done() called\n");
   DEBUG_MAKE_INDENT(3);
   
   if (rc==Accepted)
   {
      DEBUG_MSG("OK pressed. Updating preferences structure\n");

      DjVuPrefs disk_prefs;
      disk_prefs.dScreenGamma=prefs->dScreenGamma
        =gamma_prefs->displGamma();
      disk_prefs.dPrinterGamma=prefs->dPrinterGamma
        = ((gamma_prefs->match()) ? 0 : gamma_prefs->printGamma());
      disk_prefs.fastZoom=prefs->fastZoom
        =optim_prefs->fastZoom();
      disk_prefs.fastThumb=prefs->fastThumb
        =optim_prefs->fastThumb();
      disk_prefs.optimizeLCD=prefs->optimizeLCD
        =optim_prefs->optimizeLCD();
      disk_prefs.hlinksPopup=prefs->hlinksPopup
        =!hlink_prefs->disablePopup();
      disk_prefs.hlinksBorder=prefs->hlinksBorder
        =hlink_prefs->simpleBorder();
      disk_prefs.hlb_num=prefs->hlb_num
        =hlink_prefs->hlinkKey();
      disk_prefs.magnifierSize=prefs->magnifierSize
        =lens_prefs->size();
      disk_prefs.magnifierScale=prefs->magnifierScale
        =lens_prefs->scale();
      disk_prefs.magnifierHotKey=prefs->magnifierHotKey
        =lens_prefs->hotKey();
      disk_prefs.mcacheSize=prefs->mcacheSize
        =cache_prefs->mcacheSize();
      disk_prefs.pcacheSize=prefs->pcacheSize
        =cache_prefs->pcacheSize();
      disk_prefs.toolBarOn=prefs->toolBarOn
        =tbar_prefs->enabled();
      disk_prefs.toolBarAlwaysVisible=prefs->toolBarAlwaysVisible
        =tbar_prefs->visible();
      disk_prefs.toolBarDelay=prefs->toolBarDelay
        =tbar_prefs->delay();

      if (global_butt->isChecked()) disk_prefs.save();
   } else
   {
      DEBUG_MSG("Cancel pressed.\n");
   }
   QeDialog::done(rc);
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:51,代码来源:qd_viewer_prefs.cpp

示例11: QWidget

QDHlinkPrefs::QDHlinkPrefs(DjVuPrefs * prefs, QWidget * parent, const char * name) :
      QWidget(parent, name)
{
   DEBUG_MSG("QDHlinkPrefs::QDHlinkOptimPrefs(): ...\n");
   DEBUG_MAKE_INDENT(3);

   QVBoxLayout * vlay=new QVBoxLayout(this, 10, 5, "hlink_vlay");
   vlay->addSpacing(fontMetrics().height());
   vlay->addStretch(1);
   popup_butt=new QCheckBox(tr("Disable hyperlink popup messages."),
			     this, "popup_butt");
   popup_butt->setChecked(!prefs->hlinksPopup);
   vlay->addWidget(popup_butt);
   
   border_butt=new QCheckBox(tr("Draw hyperlinks using simple border."), 
			      this, "border_butt");
   border_butt->setChecked(prefs->hlinksBorder);
   vlay->addWidget(border_butt);
   vlay->addStretch(1);
   QHBoxLayout * hlay=new QHBoxLayout(vlay, 5);
   QLabel * key_label=new QLabel(tr("\"Show all hyperlinks\" key:"), this);
   hlay->addWidget(key_label);
   key_menu=new QComboBox(this, "key_menu");
   for(int i=0;i<DjVuPrefs::HLB_ITEMS;i++)
      key_menu->insertItem(DjVuPrefs::hlb_names[i], i);
   key_menu->setCurrentItem(prefs->hlb_num);
   hlay->addWidget(key_menu);
   vlay->addStretch(2);

   connect(key_menu, SIGNAL(activated(int)),
	   this, SLOT(slotHotKeyChanged(int)));

#ifndef QT1
   QWhatsThis::add(this,
                   tr("<b>Hyperlinks:</b><ul>"
                      "<li>Hyperlinks are hilited when the mouse hovers"
                      " above the hyperlink region or when the"
                      " the key combination specified"
                      " in the <i>show all hyperlinks</i> box"
                      " is depressed.</li>"
                      "<li>The <i>disable hyperlink popups</i> option"
                      " hides the popup messages optionally associated with"
                      " the hyperlinks.</li>"
                      "<li>The <i>draw using simple border</i> option"
                      " selects simpler hiliting effects.</li>"
                      "</ul>"));
#endif

}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:49,代码来源:qd_viewer_prefs.cpp

示例12: DEBUG_MSG

GP<DjVuImage>
QDDecoder::getPageImage(int page_num)
{
    DEBUG_MSG("QDDecoder::getPageImage(): page_num=" << page_num << "\n");
    DEBUG_MAKE_INDENT(3);

    last_done=0;
    if (progress_dlg) progress_dlg->setProgress(0);

    image=document->get_page(page_num, false, port.getPort());
    waitTillDecodingEnds();

    if (image->get_djvu_file()->is_decode_ok()) return image;
    else return 0;
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-djvulibre,代码行数:15,代码来源:qd_decoder.cpp


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