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

C++ setAutoDelete函数代码示例

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

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



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

示例1: setAutoDelete

void
GeoImageList::clear()
{
  setAutoDelete(TRUE);
  QDict < GeoImage >::clear();
  list_.clear();
  setAutoDelete(FALSE);
  minMaxResUptodate_ = false;
}
开发者ID:BackupTheBerlios,项目名称:geoaida-svn,代码行数:9,代码来源:geoimagelist.cpp


示例2: setAutoDelete

void TreeLeaf::setInitialSettings(int i_parent_id, const QString &str_name, int i_tree_id)
{
    setAutoDelete(false); //do not delete instance of the object after the "run" execution
    setItemColor();
    //
    m_iParentID = i_parent_id;  // id of the parent node (id_parent_node). For the trop-levels node it is 0
    //
    m_iDBTreeID = i_tree_id;
    //
    this->setText(0, str_name);
    //
    m_strDatabaseNodeName = str_name;
    //
    //if (0 == m_iParentID)
        this->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable|Qt::ItemIsEditable);
    //else
    //    this->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable|Qt::ItemIsEditable/*|Qt::ItemIsDropEnabled|Qt::ItemIsDragEnabled*/);
    //
    //no attachments requested yet.
    //
    m_bIsAttachmentRequestedAlready = false;
    //
    //force delete is disabled
    //
    m_bForceDelete = false;
}
开发者ID:AlexanderMironov,项目名称:pdb,代码行数:26,代码来源:treeleaf.cpp


示例3: setAutoDelete

TreeDiagram::TreeDiagram(ClassDef *root,bool doBases)
{
  setAutoDelete(TRUE); 
  DiagramRow *row=new DiagramRow(this,0);
  append(row);
  row->insertClass(0,root,doBases,Public,Normal,0);
}
开发者ID:dnjsflagh1,项目名称:code,代码行数:7,代码来源:diagram.cpp


示例4: plugins

bool qtractorInsertPluginCommand::undo (void)
{
	qtractorPlugin *pPlugin = plugins().first();
	if (pPlugin == NULL)
		return false;

	qtractorSession *pSession = qtractorSession::getInstance();
	if (pSession == NULL)
		return false;

	// Save the previous track alright...
	qtractorPluginList *pPluginList = pPlugin->list();
	if (pPluginList == NULL)
		return false;

//	pSession->lock();

	qtractorPlugin *pNextPlugin = pPlugin->next();

	// Insert it...
	pPluginList->removePlugin(pPlugin);

	// Swap it nice, finally.
	m_pNextPlugin = pNextPlugin;

	// Whether to allow the disposal of the plugin reference.
	setAutoDelete(true);

//	pSession->unlock();

	return true;
}
开发者ID:rncbc,项目名称:qtractor,代码行数:32,代码来源:qtractorPluginCommand.cpp


示例5: context

ScatterPlot::ScatterPlot(Context *context) : context(context)
{
    setAutoDelete(false); // no don't delete on detach !
    curve = NULL;
    curve2 = NULL;
    hover = NULL;
    hover2 = NULL;
    grid = NULL;
    ride = NULL;
    static_cast<QwtPlotCanvas*>(canvas())->setFrameStyle(QFrame::NoFrame);

    setAxisMaxMinor(xBottom, 0);
    setAxisMaxMinor(yLeft, 0);

    QwtScaleDraw *sd = new QwtScaleDraw;
    sd->setTickLength(QwtScaleDiv::MajorTick, 3);
    setAxisScaleDraw(QwtPlot::xBottom, sd);

    sd = new QwtScaleDraw;
    sd->setTickLength(QwtScaleDiv::MajorTick, 3);
    sd->enableComponent(QwtScaleDraw::Ticks, false);
    sd->enableComponent(QwtScaleDraw::Backbone, false);
    setAxisScaleDraw(QwtPlot::yLeft, sd);

    connect(context, SIGNAL(configChanged(qint32)), this, SLOT(configChanged(qint32)));
    connect(context, SIGNAL(intervalHover(IntervalItem*)), this, SLOT(intervalHover(IntervalItem*)));

    // lets watch the mouse move...
    new mouseTracker(this);

    configChanged(CONFIG_APPEARANCE | CONFIG_GENERAL); // use latest wheelsize/cranklength and colors
}
开发者ID:27sparks,项目名称:GoldenCheetah,代码行数:32,代码来源:ScatterPlot.cpp


示例6: QRunnable

Generic_Extractor::Generic_Extractor(void* z_context, const std::string& z_output_uri, const QString& file_path) : QRunnable()
{
	error.calling_method = "Generic_Extractor::Generic_Extractor";

	if ( z_context == NULL ) {
		error.msg = "z_context is NULL";

		throw error;;
	}

	if ( z_output_uri.empty() == true) {
		error.msg = "z_output_uri is empty";
		throw error;
	}

	if ( file_path.isEmpty() == true ) {
		error.msg = "file_path is empty";
		throw error;
	}

	zmq_context	= (zmq::context_t*) z_context;
	zmq_output_uri = z_output_uri;
	file = file_path;

	setAutoDelete(true);

	if ( autoDelete() == false ) {
		error.msg = "Cannot set autoDelete option";
		throw error;
	}
}
开发者ID:pombredanne,项目名称:forensics-data-extractor,代码行数:31,代码来源:generic_extractor.cpp


示例7: setAutoDelete

CoreAttributesList::~CoreAttributesList()
{
    if (autoDelete())
    {
        /* We need to make sure that the CoreAttributes are first removed from
         * the list and then deleted. */
        setAutoDelete(false);
        while (!isEmpty())
        {
            CoreAttributes* tp = getFirst();
            removeRef(tp);
            delete tp;
        }
        setAutoDelete(true);
    }
}
开发者ID:taskjuggler,项目名称:TaskJuggler2,代码行数:16,代码来源:CoreAttributesList.cpp


示例8: setObjectName

void DUChainControlFlowJob::init(const QString &jobName)
{
    setObjectName(i18n("Generating control flow graph for %1", jobName));
    setCapabilities(Killable);    
    setAutoDelete(false);
    ICore::self()->uiController()->registerStatus(this);
}
开发者ID:KDE,项目名称:kdev-control-flow-graph,代码行数:7,代码来源:duchaincontrolflowjob.cpp


示例9: masterRef

/*!
 * \brief SimulationManager::SimulationManager
 */
SimulationManager::SimulationManager() :
    masterRef( Master::getInstance() ),
    slaveRef( Slave::getInstance() ),
    environmentRef( Environment::getInstance() )
{
    setAutoDelete( false );
}
开发者ID:AlexLeSang,项目名称:EWNET-Bluetooth,代码行数:10,代码来源:SimulationManager.cpp


示例10: setAutoDelete

TPtrList::TPtrList(){
	setAutoDelete(true);
	first = 0;
	last = 0;
	current = 0;
	count = 0;
}
开发者ID:BackupTheBerlios,项目名称:apokalypse,代码行数:7,代码来源:tlist.cpp


示例11: m_opcode

EQPacketOPCode::EQPacketOPCode(uint16_t opcode, const QString& name)
  : m_opcode(opcode),
    m_implicitLen(0),
    m_name(name)
{
  setAutoDelete(true);
}
开发者ID:xbackupx,项目名称:showeqx,代码行数:7,代码来源:packetinfo.cpp


示例12: m_pScanner

ScannerTask::ScannerTask(LibraryScanner* pScanner,
                         const ScannerGlobalPointer scannerGlobal)
        : m_pScanner(pScanner),
          m_scannerGlobal(scannerGlobal),
          m_success(false) {
    setAutoDelete(true);
}
开发者ID:DJMaxergy,项目名称:mixxx,代码行数:7,代码来源:scannertask.cpp


示例13: RootItem

Feed::Feed(RootItem *parent)
  : RootItem(parent), m_url(QString()), m_status(Normal), m_autoUpdateType(DefaultAutoUpdate),
    m_autoUpdateInitialInterval(DEFAULT_AUTO_UPDATE_INTERVAL), m_autoUpdateRemainingInterval(DEFAULT_AUTO_UPDATE_INTERVAL),
    m_totalCount(0), m_unreadCount(0) {
  setKind(RootItemKind::Feed);
  setAutoDelete(false);
}
开发者ID:keinkurt,项目名称:rssguard,代码行数:7,代码来源:feed.cpp


示例14: it_attribute

/*!
  The constructor registers the QmvClass parent class, and populates itself
  with relevant QmvTupleAttribute objects.

  \param parent The parent class.
*/
QmvTuple::QmvTuple( QmvTuple * t )
{
    parent_class = t->parent_class;
    QDictIterator<QmvTupleAttribute> it_attribute(*t);
    while (it_attribute.current() )
    {
        QmvTupleAttribute * old_ta = it_attribute.current();
        QmvTupleAttribute * new_ta = new QmvTupleAttribute( this, old_ta->metaAttribute() );
            // do not copy unique indexes or system attributes
        if ( old_ta->accessMethod() != QmvAttribute::SystemAccess )
        {
                // Text primary keys can be munged, otherwise clear them
                // Non-key attributes are copied.
            if ( old_ta->attributeName() == parent_class->primaryKey() ||
                 old_ta->attributeName() == parent_class->userKey() )
                if ( old_ta->attributeType() == "text" )
                    new_ta->update( QString( "%1_COPY" ).arg(old_ta->currentValue()) );
                else
                    new_ta->update( QString( "" ) );
            else
                new_ta->update( old_ta->currentValue() );
        }
        insert( it_attribute.currentKey(), (QmvTupleAttribute *) new_ta);
        ++it_attribute;
    }
    setAutoDelete( TRUE );
    
}
开发者ID:py1668,项目名称:xpracman-qt2-final,代码行数:34,代码来源:qmvtuple.cpp


示例15: Q_D

bool KJob::exec()
{
    Q_D(KJob);
    // Usually this job would delete itself, via deleteLater() just after
    // emitting result() (unless configured otherwise). Since we use an event
    // loop below, that event loop will process the deletion event and we'll
    // have been deleted when exec() returns. This crashes, so temporarily
    // suspend autodeletion and manually do it afterwards.
    const bool wasAutoDelete = isAutoDelete();
    setAutoDelete( false );

    Q_ASSERT( ! d->eventLoop );

    QEventLoop loop( this );
    d->eventLoop = &loop;

    start();
    if( !d->isFinished ) {
        d->eventLoop->exec(QEventLoop::ExcludeUserInputEvents);
    }
    d->eventLoop = 0;

    if ( wasAutoDelete ) {
        deleteLater();
    }
    return ( d->error == NoError );
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:27,代码来源:kjob.cpp


示例16: QObject

AsyncTask::AsyncTask()
    : QObject(nullptr),
      QRunnable()
{
    setAutoDelete(false);
    running = false;
}
开发者ID:joydit,项目名称:cutter,代码行数:7,代码来源:AsyncTask.cpp


示例17: qDebug

// Track command methods.
bool qtractorTrackCommand::addTrack ( qtractorTrack *pAfterTrack )
{
#ifdef CONFIG_DEBUG
	qDebug("qtractorTrackCommand::addTrack(%p, %p)", m_pTrack, pAfterTrack);
#endif

	if (m_pTrack == NULL)
		return false;

	qtractorSession *pSession = m_pTrack->session();
	if (pSession == NULL)
		return false;

	qtractorMainForm *pMainForm = qtractorMainForm::getInstance();
	if (pMainForm == NULL)
		return false;

	qtractorTracks *pTracks = pMainForm->tracks();
	if (pTracks == NULL)
		return false;

	// Guess which item we're adding after...
	if (pAfterTrack == NULL)
		pAfterTrack = m_pTrack->prev();
	if (pAfterTrack == NULL)
		pAfterTrack = pSession->tracks().last();
	int iTrack = pSession->tracks().find(pAfterTrack) + 1;
	// Link the track into session...
	pSession->insertTrack(m_pTrack, pAfterTrack);
	// And the new track list view item too...
	qtractorTrackList *pTrackList = pTracks->trackList();
	iTrack = pTrackList->insertTrack(iTrack, m_pTrack);
	// Special MIDI track cases...
	if (m_pTrack->trackType() == qtractorTrack::Midi)
	    pTracks->updateMidiTrack(m_pTrack);

	// (Re)open all clips...
	qtractorClip *pClip = m_pTrack->clips().first();
	for ( ; pClip; pClip = pClip->next())
		pClip->open();

	// Mixer turn...
	qtractorMixer *pMixer = pMainForm->mixer();
	if (pMixer)
		pMixer->updateTracks(true);

	// Let the change get visible.
	pTrackList->setCurrentTrackRow(iTrack);

	// ATTN: MIDI controller map feedback.
	qtractorMidiControl *pMidiControl = qtractorMidiControl::getInstance();
	if (pMidiControl)
		pMidiControl->sendAllControllers(iTrack);

	// Avoid disposal of the track reference.
	setAutoDelete(false);

	return true;
}
开发者ID:EQ4,项目名称:qtractor,代码行数:60,代码来源:qtractorTrackCommand.cpp


示例18: m_dataEngine

SaveRunnable::SaveRunnable(Plasma::DataEngine *dataEngine, const QString &provider, const QString &path)
    : m_dataEngine(dataEngine),
      m_path(path)
{
    dataEngine->connectSource(provider, this);
    kDebug() << "saving to" << m_path;
    setAutoDelete(true);
}
开发者ID:fluxer,项目名称:kde-extraapps,代码行数:8,代码来源:potd.cpp


示例19: QObject

RenderThread::RenderThread(const QByteArray &contents, VectorShape::VectorType type,
                           const QSizeF &size, const QSize &boundingSize, qreal zoomX, qreal zoomY)
    : QObject(), QRunnable(),
      m_contents(contents), m_type(type),
      m_size(size), m_boundingSize(boundingSize), m_zoomX(zoomX), m_zoomY(zoomY)
{
    setAutoDelete(true);
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:8,代码来源:VectorShape.cpp


示例20: super

NZMQT_INLINE PollingZMQContext::PollingZMQContext(QObject* parent_, int io_threads_)
    : super(parent_, io_threads_)
    , m_pollItemsMutex(QMutex::Recursive)
    , m_interval(NZMQT_POLLINGZMQCONTEXT_DEFAULT_POLLINTERVAL)
    , m_stopped(false)
{
    setAutoDelete(false);
}
开发者ID:jonnydee,项目名称:nzmqt,代码行数:8,代码来源:impl.hpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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