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


C++ doOpen函数代码示例

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


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

示例1: connect

/* 初始化相应的信号与槽 */
void TextEditer::initConnection()
{
	/* menuFile里的信号与槽 */
	connect(actNew, SIGNAL(triggered()), this, SLOT(doNew()));
	connect(actOpen, SIGNAL(triggered()), this, SLOT(doOpen()));
	connect(actClose, SIGNAL(triggered()), this, SLOT(doClose()));
	connect(actSave, SIGNAL(triggered()), this, SLOT(doSave()));
	connect(actASave, SIGNAL(triggered()), this, SLOT(doASave()));
	connect(actExit, SIGNAL(triggered()), this, SLOT(doExit()));

	/* menuEdit里的信号与槽 */
	connect(actUndo, SIGNAL(triggered()), this, SLOT(doUndo()));
	connect(actRedo, SIGNAL(triggered()), this, SLOT(doRedo()));
	connect(actCut, SIGNAL(triggered()), this, SLOT(doCut()));
	connect(actCopy, SIGNAL(triggered()), this, SLOT(doCopy()));
	connect(actPast, SIGNAL(triggered()), this, SLOT(doPast()));
	connect(actAll, SIGNAL(triggered()), this, SLOT(doSelectAll()));

	/* menuTool里的信号与槽 */
	connect(actFont, SIGNAL(triggered()), this, SLOT(setFontForText()));

	/* 当当前文本内容改变后, 自动调用doModified() */
	connect(textEdit->document(), SIGNAL(contentsChanged()),
				this, SLOT(doModified()));

	/* 当文档修改后, 刷新光标所在的位置 */
	connect(textEdit->document(), SIGNAL(contentsChanged()),
			this, SLOT(doCursorChanged()));
}
开发者ID:chenpoyang,项目名称:TextEditor,代码行数:30,代码来源:textediter.cpp

示例2: path

END_BP_SERVICE_DESC

void
OpenContainingFolder::open(const bplus::service::Transaction& tran, const bplus::Map& args) {
    // dig out args
    const bplus::Path* bpPath = dynamic_cast<const bplus::Path*>(args.value("file"));
    if (!bpPath) {
        throw std::string("required files parameter missing");
    }
    boost::filesystem::path path((bplus::tPathString)*bpPath);
    if (!bp::file::pathExists(path)) {
        std::string msg = bp::file::nativeUtf8String(path) + " does not exist";
        log(BP_ERROR, msg);
        tran.error("openError", msg.c_str());
        return;
    }
    std::string errMsg;
    if (!doOpen(path, errMsg)) {
        log(BP_ERROR, errMsg);
        tran.error("openError", errMsg.c_str());
        return;
    }
    // return massive success
    bplus::Map results;
    results.add("success", new bplus::Bool(true));
    tran.complete(results);
}
开发者ID:browserplus,项目名称:bp-opencontainingfolder,代码行数:27,代码来源:service.cpp

示例3: m_baud_rate

 InterfaceUART::InterfaceUART(const std::string& dev, unsigned baud_rate):
   m_baud_rate(baud_rate),
   m_dev(dev),
   m_handle(NULL)
 {
   doOpen();
 }
开发者ID:posilva,项目名称:dune,代码行数:7,代码来源:InterfaceUART.cpp

示例4: TEXT

BufferID Notepad_plus::openAllFilesInDirectory(NotepadFile notepadFile)
{
	vector<generic_string> fileNames;
	vector<generic_string> patterns;
	patterns.push_back(TEXT("*.*"));


	generic_string fileNameStr = notepadFile.getLongFileName();
	if (notepadFile.getLongFileName()[lstrlen(notepadFile.getLongFileName()) - 1] != '\\')
		fileNameStr += TEXT("\\");

	getMatchedFileNames(fileNameStr.c_str(), patterns, fileNames, true, false);
	size_t nbFiles2Open = fileNames.size();

	bool ok2Open = true;
	if (nbFiles2Open > 200) {
		int answer = _nativeLangSpeaker.messageBox("NbFileToOpenImportantWarning",
										getMainWindowHandle(),
										TEXT("$INT_REPLACE$ files are about to be opened.\rAre you sure to open them?"),
										TEXT("Amount of files to open is too large"),
										MB_YESNO|MB_APPLMODAL,
										nbFiles2Open);
		ok2Open = answer == IDYES;
	}

	if (ok2Open) {
		for (size_t i = 0 ; i < nbFiles2Open ; i++)
			doOpen(fileNames[i].c_str());
	}
	return BUFFER_INVALID;

}
开发者ID:basvodde,项目名称:notepad-plusplus-refactoring,代码行数:32,代码来源:NppIO.cpp

示例5: switch

int QTshotWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMAINWINDOW::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: doHelp(); break;
        case 1: doQuit(); break;
        case 2: doOpen(); break;
        case 3: doNew(); break;
        case 4: doSave(); break;
        case 5: doData(); break;
        case 6: doExport(); break;
        case 7: doExportOK(); break;
        case 8: doOptions(); break;
        case 9: doToggle(); break;
        case 10: doCollapse(); break;
        case 11: doPlan(); break;
        case 12: doExtended(); break;
        case 13: do3D(); break;
        case 14: doCrossSection((*reinterpret_cast< DBlock*(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2])),(*reinterpret_cast< bool(*)>(_a[3]))); break;
        case 15: doCrossSection((*reinterpret_cast< DBlock*(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break;
        case 16: value_changed((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 17: double_clicked((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< const QPoint(*)>(_a[4]))); break;
        }
        _id -= 18;
    }
    return _id;
}
开发者ID:quanth29,项目名称:topolinux,代码行数:30,代码来源:moc_QTshot.cpp

示例6: doOpen

 void
 Interface::open(bool query)
 {
   doOpen();
   if (query)
     getFirmwareInfo();
 }
开发者ID:retlaw84,项目名称:dune,代码行数:7,代码来源:Interface.cpp

示例7: MemoryOutputStreamBuffer

			MemoryOutputStreamBuffer(std::string const & fn, int64_t const rbuffersize)
			: 
			  fd(doOpen(fn)), 
			  buffersize((rbuffersize < 0) ? getDefaultBlockSize() : rbuffersize), 
			  buffer(buffersize,false)
			{
				setp(buffer.begin(),buffer.end()-1);
			}
开发者ID:dkj,项目名称:libmaus2,代码行数:8,代码来源:MemoryOutputStreamBuffer.hpp

示例8: LinuxStreamingPosixFdOutputStreamBuffer

			LinuxStreamingPosixFdOutputStreamBuffer(std::string const & fn, int64_t const rbuffersize)
			: fd(doOpen(fn)), closefd(true), 
			  optblocksize((rbuffersize < 0) ? getOptimalIOBlockSize(fd,std::string()) : rbuffersize),
			  buffersize(optblocksize),
			  buffer(buffersize,false), prevwrite(0,0)
			{
				setp(buffer.begin(),buffer.end()-1);
			}
开发者ID:jameslz,项目名称:libmaus2,代码行数:8,代码来源:LinuxStreamingPosixFdOutputStreamBuffer.hpp

示例9: pgpFileWriteOpen

/* Convert a FILE* to PGPFile* in Write Mode */
PGPFile *
pgpFileWriteOpen (PGPContextRef	cdkContext,
	FILE *file, PGPCFBContext *cfbp)
{
	(void)cfbp;		/* Avoid warning */
	pgpAssert (cfbp == NULL);
	return doOpen ( cdkContext, file, PGP_FILE_WRITE);
} 
开发者ID:ysangkok,项目名称:pgp-unix-6.5.8,代码行数:9,代码来源:pgpFile.c

示例10: connect

void QJDTextBrowser::initConnect()
{
    connect(ui->textEdit,SIGNAL(cursorPositionChanged()),this,SLOT(doCursorChanged()));
    connect(ui->action_Open,SIGNAL(triggered()),this,SLOT(doOpen()));
    connect(ui->action_Exit,SIGNAL(triggered()),this,SLOT(doQuit()));
    connect(ui->action_Copy,SIGNAL(triggered()),this,SLOT(doCopy()));
    connect(ui->action_All,SIGNAL(triggered()),this,SLOT(doAll()));
}
开发者ID:xtfllbl,项目名称:Flow2,代码行数:8,代码来源:qjdtextbrowser.cpp

示例11: doOpen

bool File::open()
{
  if (!isOpen())
  {
    m_opened = doOpen();
    return m_opened;
  }
  return false;
}
开发者ID:susu,项目名称:papyrus-war,代码行数:9,代码来源:File.cpp

示例12: pgpFileWriteOpenDontClose

/* Same as above, but don't close the FILE automatically */
PGPFile *
pgpFileWriteOpenDontClose (PGPContextRef context,
	FILE *file, PGPCFBContext *cfbp)
{
	(void)cfbp;		/* Avoid warning */
	pgpAssert (cfbp == NULL);
	return doOpen ( context,
			file, PGP_FILE_WRITE | FLAGS_DONTCLOSE);
} 
开发者ID:ysangkok,项目名称:pgp-unix-6.5.8,代码行数:10,代码来源:pgpFile.c

示例13: doOpen

void Socket::open()
{
	doOpen(m_socket);
	m_open = true;
	int err = setCloseOnExec();
	if(err < 0)
	{
		err = errno;
		close();
		throw OpenErr(err);
	}
}
开发者ID:RGB-RSL,项目名称:rgb,代码行数:12,代码来源:Socket.cpp

示例14: pgpFileReadOpen

/* Convert a FILE* to PGPFile* in Read Mode */
PGPFile *
pgpFileReadOpen ( PGPContextRef context,
	FILE *file, PGPUICb const *ui, void *ui_arg)
{
	(void)ui;
	(void)ui_arg;
	/*
	 * We still need to check the file for encryption and obtain
	 * the decryption key, somehow.
	 */

	return doOpen ( context, file, PGP_FILE_READ);
}
开发者ID:ysangkok,项目名称:pgp-unix-6.5.8,代码行数:14,代码来源:pgpFile.c

示例15: disconnect

/**
 * @brief EngineClient::~LocalServer
 *  Destructor
 */
EngineClient::~EngineClient()
{
    if(ipClient)
    {
        disconnect(this, SIGNAL(sendMessage(QString)), ipClient, SLOT(sendMessage(QString)));
        disconnect(ipClient, SIGNAL(messageIn(QString)), this, SLOT(slotOnData(QString)));
        disconnect(this, SIGNAL(closed()), ipClient, SLOT(doClose()));
        disconnect(this, SIGNAL(open()), ipClient, SLOT(doOpen()));
        disconnect(ipClient, SIGNAL(closeThread()), this, SLOT(connectionLost()));
        delete ipClient;
    }
    ipClient=NULL;
}
开发者ID:tcvicio,项目名称:PGE-Project,代码行数:17,代码来源:engine_client.cpp


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