BaseMainWindow::BaseMainWindow(QWidget *parent) : QMainWindow(parent) { connect(this, SIGNAL(sigCreate()), this, SLOT(slotCreate()), Qt::QueuedConnection); connect(this, SIGNAL(sigDestroy()), this, SLOT(slotDestroy()), Qt::QueuedConnection); m_nStatus=ESTATUS_UNKNOW; emit sigCreate(); }
//========================================= // Member call for handleNotificationEvent //----------------------------------------- bool Notify::sendSignal (int fd,int flag) { sigprocmask(SIG_BLOCK, &block_set,0); if ( mNotifyDirs[fd] ) { QString* pFolder = mNotifyDirs[fd]; QPoint* count = mNotifyCount[fd]; QStringList tokens = pFolder->split ( "/" ); QString folder = tokens.first(); QString dirname = tokens.last(); switch (flag) { case QBIFF_CREATE: printf ("________create %s %p\n",pFolder->toLatin1().data(),count); if (dirname == "new") { count -> rx()++; } else { count -> ry()++; } sigCreate ( &folder,count ); break; case QBIFF_DELETE: printf ("________delete %s %p\n",pFolder->toLatin1().data(),count); if (dirname == "new") { count -> rx()--; } else { count -> ry()--; } sigDelete ( &folder,count ); break; default: break; } sigNotify ( &folder,count ); sigprocmask(SIG_UNBLOCK, &block_set,0); return true; } sigprocmask(SIG_UNBLOCK, &block_set,0); return false; }
void ZooArch::create() { emit sigCreate( this, true, m_filename, Arch::Extract | Arch::Delete | Arch::Add | Arch::View); }