int CrFbDisplayWindowRootVr::EntryCreated(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry) { int rc = CrFbDisplayWindow::EntryCreated(pFb, hEntry); if (!RT_SUCCESS(rc)) { WARN(("err")); return rc; } Assert(!CrFbDDataEntryGet(hEntry, slotGet())); const VBOXVR_SCR_COMPOSITOR_ENTRY* pSrcEntry = CrFbEntryGetCompositorEntry(hEntry); VBOXVR_SCR_COMPOSITOR_ENTRY *pMyEntry = entryAlloc(); CrVrScrCompositorEntryInit(pMyEntry, CrVrScrCompositorEntryRectGet(pSrcEntry), CrVrScrCompositorEntryTexGet(pSrcEntry), NULL); CrVrScrCompositorEntryFlagsSet(pMyEntry, CrVrScrCompositorEntryFlagsGet(pSrcEntry)); rc = CrFbDDataEntryPut(hEntry, slotGet(), pMyEntry); if (!RT_SUCCESS(rc)) { WARN(("CrFbDDataEntryPut failed rc %d", rc)); entryFree(pMyEntry); return rc; } return VINF_SUCCESS; }
FileInfo::FileInfo(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f) { fileNameLabel = new QLabel(tr("文件名:")); fileNameLineEdit = new QLineEdit; fileBtn = new QPushButton(tr("文件")); sizeLabel = new QLabel(tr("创建时间:")); sizeLineEdit = new QLineEdit; createTimeLabel = new QLabel(tr("创建时间:")); createTimeLineEdit = new QLineEdit; lastModifiedLabel = new QLabel(tr("最后修改时间:")); lastModifiedLineEdit = new QLineEdit; lastReadLabel = new QLabel(tr("最后访问时间:")); lastReadLineEdit = new QLineEdit; propertyLabel = new QLabel(tr("属性:")); isDirCheckBox = new QCheckBox(tr("目录")); isFileCheckBox = new QCheckBox(tr("文件")); isSymLinkCheckBox = new QCheckBox(tr("符号连接")); isHiddenCheckBox = new QCheckBox(tr("隐藏")); isReadableCheckBox = new QCheckBox(tr("读")); isWritableCheckBox = new QCheckBox(tr("写")); isExecutableCheckBox = new QCheckBox(tr("执行")); getBtn = new QPushButton(tr("获得文件信息")); QGridLayout *gridLayout = new QGridLayout; gridLayout->addWidget(fileNameLabel, 0, 0); gridLayout->addWidget(fileNameLineEdit, 0, 1); gridLayout->addWidget(fileBtn, 0, 2); gridLayout->addWidget(sizeLabel, 1, 0); gridLayout->addWidget(sizeLineEdit, 1, 1, 1, 2); gridLayout->addWidget(createTimeLabel, 2, 0); gridLayout->addWidget(createTimeLineEdit, 2, 1, 1, 2); gridLayout->addWidget(lastModifiedLabel, 3, 0); gridLayout->addWidget(lastModifiedLineEdit, 3, 1, 1, 2); gridLayout->addWidget(lastReadLabel, 4, 0); gridLayout->addWidget(lastReadLineEdit, 4, 1, 1, 2); QHBoxLayout *layout2 = new QHBoxLayout; layout2->addWidget(propertyLabel); layout2->addStretch(); QHBoxLayout *layout3 = new QHBoxLayout; layout3->addWidget(isDirCheckBox); layout3->addWidget(isFileCheckBox); layout3->addWidget(isSymLinkCheckBox); layout3->addWidget(isHiddenCheckBox); layout3->addWidget(isReadableCheckBox); layout3->addWidget(isWritableCheckBox); layout3->addWidget(isExecutableCheckBox); QHBoxLayout *layout4 = new QHBoxLayout; layout4->addWidget(getBtn); QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->addLayout(gridLayout); mainLayout->addLayout(layout2); mainLayout->addLayout(layout3); mainLayout->addLayout(layout4); connect(fileBtn, SIGNAL(clicked()), this, SLOT(slotFile())); connect(getBtn, SIGNAL(clicked()), this, SLOT(slotGet())); }
int ParaRW::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotSave(); break; case 1: slotGet(); break; default: ; } _id -= 2; } return _id; }
int CrFbDisplayWindowRootVr::EntryTexChanged(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry) { int rc = CrFbDisplayWindow::EntryTexChanged(pFb, hEntry); if (!RT_SUCCESS(rc)) { WARN(("err")); return rc; } const VBOXVR_SCR_COMPOSITOR_ENTRY* pSrcEntry = CrFbEntryGetCompositorEntry(hEntry); VBOXVR_SCR_COMPOSITOR_ENTRY *pMyEntry = (VBOXVR_SCR_COMPOSITOR_ENTRY*)CrFbDDataEntryGet(hEntry, slotGet()); CrVrScrCompositorEntryTexSet(pMyEntry, CrVrScrCompositorEntryTexGet(pSrcEntry)); return VINF_SUCCESS; }
int CrFbDisplayWindowRootVr::EntryRemoved(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry) { int rc = CrFbDisplayWindow::EntryRemoved(pFb, hEntry); if (!RT_SUCCESS(rc)) { WARN(("err")); return rc; } VBOXVR_SCR_COMPOSITOR_ENTRY *pMyEntry = (VBOXVR_SCR_COMPOSITOR_ENTRY*)CrFbDDataEntryGet(hEntry, slotGet()); rc = CrVrScrCompositorEntryRegionsSet(&mCompositor, pMyEntry, NULL, 0, NULL, false, NULL); if (!RT_SUCCESS(rc)) { WARN(("err")); return rc; } return VINF_SUCCESS; }
FileInformation::FileInformation( QWidget *parent, Qt::WindowFlags f ) : QDialog( parent, f ) { setWindowTitle(tr("File Information")); LabelFileName = new QLabel(); LabelFileName->setText(tr("File Name:")); LineEditFileName = new QLineEdit(); PushButtonFile = new QPushButton( this); PushButtonFile->setText( tr( "File" ) ); LabelSize = new QLabel(); LabelSize->setText(tr("Size:")); LineEditSize = new QLineEdit(); LabelCreated = new QLabel(); LabelCreated->setText(tr("Created:")); LineEditCreated = new QLineEdit(); LabelLastModified = new QLabel(); LabelLastModified->setText(tr("Last Modified:")); LineEditLastModified = new QLineEdit(); LabelLastRead = new QLabel(); LabelLastRead->setText(tr("Last Read:")); LineEditLastRead = new QLineEdit(); LabelProperty = new QLabel(); LabelProperty->setText(tr("Property:")); CheckBoxIsDir = new QCheckBox(); CheckBoxIsDir->setText(tr("Dir")); CheckBoxIsFile = new QCheckBox(); CheckBoxIsFile->setText(tr("File")); CheckBoxIsSymLink = new QCheckBox(); CheckBoxIsSymLink->setText(tr("SymLink")); CheckBoxIsHidden = new QCheckBox(); CheckBoxIsHidden->setText(tr("Hidden")); CheckBoxIsReadable = new QCheckBox(); CheckBoxIsReadable->setText(tr("Readable")); CheckBoxIsWritable = new QCheckBox(); CheckBoxIsWritable->setText(tr("Writable")); CheckBoxIsExecutable = new QCheckBox(); CheckBoxIsExecutable->setText(tr("Executable")); PushButtonGet = new QPushButton( this); PushButtonGet->setText( tr( "Get" ) ); QHBoxLayout *hbLayout1 = new QHBoxLayout (); hbLayout1->addWidget(LabelFileName); hbLayout1->addWidget(LineEditFileName); hbLayout1->addWidget(PushButtonFile); QHBoxLayout *hbLayout2 = new QHBoxLayout (); hbLayout2->addWidget(LabelSize); hbLayout2->addWidget(LineEditSize); QHBoxLayout *hbLayout3 = new QHBoxLayout (); hbLayout3->addWidget(LabelCreated); hbLayout3->addWidget(LineEditCreated); QHBoxLayout *hbLayout4 = new QHBoxLayout (); hbLayout4->addWidget(LabelLastModified); hbLayout4->addWidget(LineEditLastModified); QHBoxLayout *hbLayout5 = new QHBoxLayout (); hbLayout5->addWidget(LabelLastRead); hbLayout5->addWidget(LineEditLastRead); QHBoxLayout *hbLayout6 = new QHBoxLayout (); hbLayout6->addWidget(LabelProperty); hbLayout6->addStretch(); QHBoxLayout *hbLayout7 = new QHBoxLayout (); hbLayout7->addWidget(CheckBoxIsDir); hbLayout7->addWidget(CheckBoxIsFile); hbLayout7->addWidget(CheckBoxIsSymLink); hbLayout7->addWidget(CheckBoxIsHidden); hbLayout7->addWidget(CheckBoxIsReadable); hbLayout7->addWidget(CheckBoxIsWritable); hbLayout7->addWidget(CheckBoxIsExecutable); QVBoxLayout *vbLayout = new QVBoxLayout( this ); vbLayout->addLayout( hbLayout1 ); vbLayout->addLayout( hbLayout2 ); vbLayout->addLayout( hbLayout3 ); vbLayout->addLayout( hbLayout4 ); vbLayout->addLayout( hbLayout5 ); vbLayout->addLayout( hbLayout6 ); vbLayout->addLayout( hbLayout7 ); vbLayout->addWidget( PushButtonGet ); connect(PushButtonFile,SIGNAL(clicked()),this,SLOT(slotFile())); connect(PushButtonGet,SIGNAL(clicked()),this,SLOT(slotGet())); }
FileInformation::FileInformation(QWidget *parent, Qt::WFlags flags) : QDialog(parent, flags) { setWindowTitle(tr("File Information")); fileNameLabel=new QLabel(tr("File Name")); fileNameLineEdit=new QLineEdit(); fileButton=new QPushButton(tr("Open")); QHBoxLayout *layout1=new QHBoxLayout(); layout1->addWidget(fileNameLabel); layout1->addWidget(fileNameLineEdit); layout1->addWidget(fileButton); fileSize=new QLabel(tr("File Size")); fileLineEditSize=new QLineEdit(); QHBoxLayout *layout2=new QHBoxLayout(); layout2->addWidget(fileSize); layout2->addWidget(fileLineEditSize); fileCreatLabel=new QLabel(tr("Creat Time")); fileCreatLineEdit=new QLineEdit(); QHBoxLayout *layout3=new QHBoxLayout(); layout3->addWidget(fileCreatLabel); layout3->addWidget(fileCreatLineEdit); fileLastModifyLabel=new QLabel(tr("Last Modify Time")); fileLastModifLineEdit=new QLineEdit(); QHBoxLayout *layout4=new QHBoxLayout(); layout4->addWidget(fileLastModifyLabel); layout4->addWidget(fileLastModifLineEdit); fileLastVisitedLabel=new QLabel(tr("Last Visited Time")); fileLastVisitedLineEdit=new QLineEdit(); filePropertyLabel=new QLabel(tr("File Property")); checkIsDir=new QCheckBox(tr("Menu")); checkIsFile=new QCheckBox(tr("File")); checkBoxIsSymLink=new QCheckBox(tr("SymLink")); checkBoxIsReadable=new QCheckBox(tr("Readable")); checkBoxIsWritable=new QCheckBox(tr("Writeable")); checkBoxIsHidden=new QCheckBox(tr("Hodden")); checkBoxIsExecutable=new QCheckBox(tr("Executable")); QHBoxLayout *layout5=new QHBoxLayout(); layout5->addWidget(filePropertyLabel); layout5->addWidget(checkIsDir); layout5->addWidget(checkIsFile); layout5->addWidget(checkBoxIsSymLink); layout5->addWidget(checkBoxIsReadable); layout5->addWidget(checkBoxIsWritable); layout5->addWidget(checkBoxIsExecutable); PushButtonGet=new QPushButton(tr("Get File Information")); // main layout QVBoxLayout *mainLayout=new QVBoxLayout(); mainLayout->addLayout(layout1); mainLayout->addLayout(layout2); mainLayout->addLayout(layout3); mainLayout->addLayout(layout4); mainLayout->addLayout(layout5); mainLayout->addWidget(PushButtonGet); setLayout(mainLayout); connect(fileButton,SIGNAL(clicked()),this,SLOT(slotFile())); connect(PushButtonGet,SIGNAL(clicked()),this,SLOT(slotGet())); }