本文整理汇总了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()));
}
示例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);
}
示例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();
}
示例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;
}
示例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;
}
示例6: doOpen
void
Interface::open(bool query)
{
doOpen();
if (query)
getFirmwareInfo();
}
示例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);
}
示例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);
}
示例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);
}
示例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()));
}
示例11: doOpen
bool File::open()
{
if (!isOpen())
{
m_opened = doOpen();
return m_opened;
}
return false;
}
示例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);
}
示例13: doOpen
void Socket::open()
{
doOpen(m_socket);
m_open = true;
int err = setCloseOnExec();
if(err < 0)
{
err = errno;
close();
throw OpenErr(err);
}
}
示例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);
}
示例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;
}