本文整理汇总了C++中QDockWidget::setWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ QDockWidget::setWidget方法的具体用法?C++ QDockWidget::setWidget怎么用?C++ QDockWidget::setWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDockWidget
的用法示例。
在下文中一共展示了QDockWidget::setWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateDockWindows
void VSCMainWindows::CreateDockWindows()
{
QDockWidget *pDockDevicelist = new QDockWidget(tr("Devices"), this);
//QDockWidget *pDockDevicelist = new QDockWidget(this);
pDockDevicelist->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
#if 1
//pDockDevicelist->setWidget(new VSCDeviceList(pDockDevicelist));
m_pDeviceList = new VSCDeviceList(pDockDevicelist);
pDockDevicelist->setWidget(m_pDeviceList);
#else
QListWidget * customerList = new QListWidget(pDockDevicelist);
customerList->addItems(QStringList()
<< "John Doe, Harmony Enterprises, 12 Lakeside, Ambleton"
<< "Jane Doe, Memorabilia, 23 Watersedge, Beaton"
<< "Tammy Shea, Tiblanka, 38 Sea Views, Carlton"
<< "Tim Sheen, Caraba Gifts, 48 Ocean Way, Deal"
<< "Sol Harvey, Chicos Coffee, 53 New Springs, Eccleston"
<< "Sally Hobart, Tiroli Tea, 67 Long River, Fedula");
pDockDevicelist->setWidget(customerList);
#endif
addDockWidget(Qt::LeftDockWidgetArea, pDockDevicelist);
}
示例2: createDockWindows
void MainWindow::createDockWindows() {
/* Add HOL widget */
QDockWidget *dock = new QDockWidget(tr("HOL Process"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
mHOLWidget = new HOLWidget;
dock->setWidget(mHOLWidget);
addDockWidget(Qt::RightDockWidgetArea, dock);
/* File System View */
QDockWidget *fileDock = new QDockWidget(tr("Project"), this);
fileDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
mFileViewSplitter = new QSplitter;
QFileSystemModel *fileSystemModel = new QFileSystemModel;
fileSystemModel->setRootPath(QDir::currentPath());
QItemSelectionModel *itemSelectionModel = new QItemSelectionModel(fileSystemModel);
connect(itemSelectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(fileViewItemSelected(QModelIndex,QModelIndex)));
QTreeView* tree = new QTreeView(mFileViewSplitter);
tree->setModel(fileSystemModel);
tree->setRootIndex(fileSystemModel->index(QDir::currentPath()));
tree->setSelectionModel(itemSelectionModel);
tree->hideColumn(2);
tree->hideColumn(3);
tree->hideColumn(1);
fileDock->setWidget(mFileViewSplitter);
addDockWidget(Qt::RightDockWidgetArea, fileDock);
}
示例3: createDockWidgets
void MainWindow::createDockWidgets()
{
setDockOptions(QMainWindow::AnimatedDocks);
QDockWidget::DockWidgetFeatures features =
QDockWidget::DockWidgetMovable|
QDockWidget::DockWidgetFloatable;
transformWidget = new TransformWidget;
QDockWidget *transformDockWidget = new QDockWidget(
tr("Transform"), this);
transformDockWidget->setFeatures(features);
transformDockWidget->setWidget(transformWidget);
addDockWidget(Qt::RightDockWidgetArea, transformDockWidget);
brushWidget = new BrushWidget;
QDockWidget *brushDockWidget = new QDockWidget(tr("Brush (Fill)"),
this);
brushDockWidget->setFeatures(features);
brushDockWidget->setWidget(brushWidget);
addDockWidget(Qt::RightDockWidgetArea, brushDockWidget);
penWidget = new PenWidget;
QDockWidget *penDockWidget = new QDockWidget(tr("Pen (Outline)"),
this);
penDockWidget->setFeatures(features);
penDockWidget->setWidget(penWidget);
addDockWidget(Qt::RightDockWidgetArea, penDockWidget);
}
示例4: createDockWindows
void MainWindow::createDockWindows()
{
QDockWidget *dock = new QDockWidget(tr("History"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
historyList = new QListWidget(dock);
dock->setWidget(historyList);
addDockWidget(Qt::RightDockWidgetArea, dock);
viewMenu->addAction(dock->toggleViewAction());
dock = new QDockWidget(tr("Command Line"));
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
QStringList wordList;
wordList << "FW"<<"BK"<<"CW"<<"CCW"<<"ROT"<<"BLOCK"<<"FOR"<<"RESET"<<"DOWN"<<"UP";
QCompleter *completer = new QCompleter(wordList);
completer->setCaseSensitivity(Qt::CaseInsensitive);
cmdLineEdit = new QLineEdit();
cmdLineEdit->setCompleter(completer);
dock->setWidget(cmdLineEdit);
addDockWidget(Qt::RightDockWidgetArea, dock);
viewMenu->addAction(dock->toggleViewAction());
////////////////////////////////////////////////////////////////////////////////
// ZAD 3
cmdLineEdit->installEventFilter(keyPressEater);
connect(cmdLineEdit, SIGNAL(returnPressed()), this, SLOT(sendCmd()));
connect(keyPressEater, SIGNAL(odzyskaj()), this, SLOT(odzyskaj()));
}
示例5: createWidgets
void MainWindow::createWidgets() {
m_lstLog = new QListWidget();
QUndoView* undoView = new QUndoView(m_space->undoStack());
m_debugger = new QScriptEngineDebugger(this);
QDockWidget* dock;
dock = new QDockWidget(tr("Undo/Redo List"), this);
dock->setWidget(undoView);
addDockWidget(Qt::RightDockWidgetArea, dock);
dock = new QDockWidget(tr("Log"), this);
dock->setWidget(m_lstLog);
addDockWidget(Qt::RightDockWidgetArea, dock);
m_debugger->attachTo(m_engine);
dock = new QDockWidget(tr("Script console"), this);
dock->setWidget(m_debugger->widget(QScriptEngineDebugger::ConsoleWidget));
addDockWidget(Qt::BottomDockWidgetArea, dock);
QWidget* w = createCentralWidget1();
setCentralWidget(w);
//m_debugger->standardWindow()->show();
// TODO:
// - add some sample waves to the project
// - create a Model of the waves
// - show the Model in an editable table
// - show the Model in an editable form
// - add a button to modify something in a wave
// - test that updates by any method leads to changes in all views
// - test undo/redo
}
示例6: createDockWindows
void MainWindow::createDockWindows()
{
// Engine debug
QDockWidget* engineDebugDock = new QDockWidget(tr("Engine Debug"), this);
m_engineDebugLog = new PlainTextLog(engineDebugDock);
connect(m_engineDebugLog, SIGNAL(saveLogToFileRequest()), this,
SLOT(saveLogToFile()));
engineDebugDock->setWidget(m_engineDebugLog);
addDockWidget(Qt::BottomDockWidgetArea, engineDebugDock);
// Move list
QDockWidget* moveListDock = new QDockWidget(tr("Moves"), this);
moveListDock->setWidget(m_moveList);
addDockWidget(Qt::RightDockWidgetArea, moveListDock);
// Tags
QDockWidget* tagsDock = new QDockWidget(tr("Tags"), this);
QTreeView* tagsView = new QTreeView(tagsDock);
tagsView->setModel(m_tagsModel);
tagsView->setAlternatingRowColors(true);
tagsView->setRootIsDecorated(false);
tagsDock->setWidget(tagsView);
addDockWidget(Qt::RightDockWidgetArea, tagsDock);
tabifyDockWidget(moveListDock, tagsDock);
moveListDock->raise();
// Add toggle view actions to the View menu
m_viewMenu->addAction(moveListDock->toggleViewAction());
m_viewMenu->addAction(tagsDock->toggleViewAction());
m_viewMenu->addAction(engineDebugDock->toggleViewAction());
}
示例7: createDockWidget
void FFCP::createDockWidget()
{
//设置主窗体的第一个QDockWidget
QDockWidget *firstDockWidget = new QDockWidget(this);
//设置第一个QDockWidget的窗口名称
firstDockWidget->setWindowTitle(tr("代码查看器"));
//设置第一个QDockWidget的可停靠区域,全部可停靠
firstDockWidget->setAllowedAreas(Qt::AllDockWidgetAreas);
//设置第一个QDockWidget内的控件并设置该控件的属性
codeViewer = new QTextEdit(tr("打开main.c文件")); //前面别给定义 内存要报错 弄了我一天!!!!!!!!
codeViewer->setAcceptDrops(false); //禁止向codeViewer拖入东西
firstDockWidget->setWidget(codeViewer);
//向主窗体中添加第一个QDockWidget控件 第一个参数表示初始显示的位置 第二个参数是要添加的QDockWidget控件
this->addDockWidget(Qt::RightDockWidgetArea, firstDockWidget);
//向菜单和工具栏中添加第一个QDockWidget的显示和隐藏动作
viewMenu->addAction(firstDockWidget->toggleViewAction());
//设置第二个QDockWidget
QDockWidget *secondDockWidget = new QDockWidget(this);
secondDockWidget->setWindowTitle(tr("功能编辑盒"));
secondDockWidget->setAllowedAreas(Qt::AllDockWidgetAreas);
functionBox = new FunctionBox;
secondDockWidget->setWidget(functionBox);
this->addDockWidget(Qt::LeftDockWidgetArea, secondDockWidget);
//向菜单和工具栏中添加第一个QDockWidget的显示和隐藏动作
viewMenu->addAction(secondDockWidget->toggleViewAction());
}
示例8: connected
MonitorWindow::MonitorWindow():
connected(false),
usersSelectionCount(0),
initialized(false )
{
qServer = new afqt::QServer( this);
qthreadClientUp = new afqt::QThreadClientUp( this, false, af::Environment::getMonitorUpdatePeriod(), af::Environment::getMonitorConnectRetries());
qthreadClientSend = new afqt::QThreadClientSend( this);
if( qServer->isInitialized() == false )
{
AFERROR("MonitorWindow::MonitorWindow: Server initialization failed.\n");
return;
}
username = afqt::stoq( af::Environment::getUserName());
hostname = afqt::stoq( af::Environment::getHostName());
setWindowTitle("MonitorWindow::" + username + "@" + hostname + ":(connecting...)");
QMenu * viewMenu = menuBar()->addMenu("View");
QDockWidget * dock;
dock = new QDockWidget( "Renders", this);
rendersList = new ListRenders( dock);
dock->setWidget( rendersList);
addDockWidget( Qt::LeftDockWidgetArea, dock);
viewMenu->addAction( dock->toggleViewAction());
dock = new QDockWidget( "Users", this);
usersList = new ListUsers( dock);
dock->setWidget( usersList);
addDockWidget( Qt::RightDockWidgetArea, dock);
viewMenu->addAction( dock->toggleViewAction());
dock = new QDockWidget( "Jobs", this);
jobsList = new ListJobs( dock);
dock->setWidget( jobsList);
addDockWidget( Qt::RightDockWidgetArea, dock);
viewMenu->addAction( dock->toggleViewAction());
nodesList[ MTRenders ] = rendersList;
nodesList[ MTUsers ] = usersList;
nodesList[ MTJobs ] = jobsList;
connect( usersList, SIGNAL( itemSelectionChanged()), this, SLOT( usersSelectionChanged()));
connect( qServer, SIGNAL( newMsg( af::Msg*)), this, SLOT( caseMessage( af::Msg*)));
connect( qthreadClientUp, SIGNAL( newMsg( af::Msg*)), this, SLOT( caseMessage( af::Msg*)));
connect( qthreadClientSend, SIGNAL( newMsg( af::Msg*)), this, SLOT( caseMessage( af::Msg*)));
connect( qthreadClientUp, SIGNAL( connectionLost() ), this, SLOT( connectionLost()));
connect( qthreadClientSend, SIGNAL( connectionLost() ), this, SLOT( connectionLost()));
monitor = new MonitorHost();
initialized = true;
monitor->stdOut();
sendRegister();
}
示例9: GhostBustersHQ
GameUI::GameUI()
{
resize(1000, 800);
setWindowTitle("Adage");
QDockWidget *dock = new QDockWidget(tr("Shell"), this);
ShellWindow *shell = new ShellWindow(dock);
//ShellInterface *shellInt = new ShellInterface(shell);
dock->setWidget(shell);
addDockWidget(Qt::RightDockWidgetArea, dock);
dock = new QDockWidget(tr("Comm"), this);
CommWindow *comm = new CommWindow(dock);
dock->setWidget(comm);
addDockWidget(Qt::RightDockWidgetArea, dock);
//connect(mBtnClose, SIGNAL(clicked()), this, SLOT(close()));
mGame = new Game(comm);
//connect(mGame, SIGNAL(worldUpdated()), this, SLOT(update()));
//TEST GAME ENTITIES GO HERE
Map* map = new Map(mGame->world());
QFile* file = new QFile("data/map.map");
bool result = file->open(QIODevice::ReadOnly | QIODevice::Text);
assert(result); //TODO error handling
map->load(file);
/*QFile* outFile = new QFile("map-out.map");
result = outFile->open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text);
assert(result);
map->save(outFile);*/
new GhostBustersHQ(mGame->world());
for (int i=0; i<60; ++i) //ghost food
new Person(Math::Point(Math::randFloat(-75,75),Math::randFloat(-80,90)), mGame->world());
for (int i=0; i<60; ++i)
new Person(Math::Point(Math::randFloat(-75,75),Math::randFloat(190,260)), mGame->world());
for (int i=0; i<20; ++i)
new Ghost(Math::Point(Math::randFloat(-100,100),Math::randFloat(-100,100)), mGame->world());
for (int i=0; i<20; ++i)
new Ghost(Math::Point(Math::randFloat(-100,100),Math::randFloat(180,380)), mGame->world());
for (int i=0; i<4; ++i)
new GhostBuster(Math::Point(Math::randFloat(-75,75),Math::randFloat(-90,90)), mGame->world());
for (int i=0; i<4; ++i)
new GhostBuster(Math::Point(Math::randFloat(-75,75),Math::randFloat(190,270)), mGame->world());
Navigator* navvy = new Navigator(mGame->world());
mGame->setNavvy(navvy);
mBlueprint = new BlueprintWindow(mGame);
setCentralWidget(mBlueprint);
connect(mGame, SIGNAL(worldUpdated()), mBlueprint->blueprint(), SLOT(repaint()));
}
示例10: QMainWindow
Window::Window () : QMainWindow (NULL) {
try {
viewer = new GLViewer;
} catch (GLViewer::Exception e) {
cerr << e.getMessage () << endl;
exit (1);
}
setCentralWidget (viewer);
#if DEBUG
cout << "/ ! \\ Building in Debug mode. Performance will be impacted" << endl;
#else
viewer->setBaseSize(500, 500);
#endif
initControlWidget ();
QDockWidget * controlDockWidget = new QDockWidget (this);
controlDockWidget->setWidget (controlWidget);
controlDockWidget->adjustSize ();
addDockWidget (Qt::RightDockWidgetArea, controlDockWidget);
controlDockWidget->setFloating(true);
controlDockWidget->setFeatures (QDockWidget::AllDockWidgetFeatures);
controlDockWidget->adjustSize();
controlDockWidget->move(0, 0);
QDockWidget * focalDockWidget = new QDockWidget (this);
focalDockWidget->setWidget(focalWidget);
focalDockWidget->adjustSize ();
addDockWidget (Qt::LeftDockWidgetArea, focalDockWidget);
focalDockWidget->setFloating(true);
focalDockWidget->setFeatures (QDockWidget::AllDockWidgetFeatures);
focalDockWidget->adjustSize();
focalDockWidget->move(200, 0);
QDockWidget* rayTracerDockWidget = new QDockWidget(this);
rayTracerDockWidget->setWidget(rayTracerWidget);
rayTracerDockWidget->adjustSize ();
addDockWidget (Qt::TopDockWidgetArea, rayTracerDockWidget);
rayTracerDockWidget->setFloating(true);
rayTracerDockWidget->setFeatures (QDockWidget::AllDockWidgetFeatures);
rayTracerDockWidget->adjustSize();
// Move widgets around the raytracer
QDesktopWidget desktop;
QRect mainScreenSize = desktop.availableGeometry(desktop.primaryScreen());
controlDockWidget->move(mainScreenSize.width() - 200, 0);
rayTracerDockWidget->move(0, 0);
focalDockWidget->move(0, mainScreenSize.height() - focalDockWidget->height());
statusBar()->showMessage("");
}
示例11: makeLayout
void InvMain::makeLayout()
{
// create a docking window for several lists on the right side
QDockWidget *dw = new QDockWidget(this);
dw->setWindowTitle("Renderer Listbox ");
/*qt3 dw->setFeatures(Qt::Horizontal);
dw->setCloseMode(QDockWidget::Docked);
dw->setResizeEnabled(true);*/
listTabs = new QTabWidget(dw);
listTabs->setMinimumWidth(250);
/*colorListBox = new QListView(listTabs);
colorStringList = new QStringList();
colorListModel = new QStringListModel(*colorStringList, NULL);
colorListBox->setModel(colorListModel);*/
colorListWidget = new QListWidget(listTabs);
colorListWidget->setViewMode(QListView::IconMode);
treeWidget = new objTreeWidget(this, listTabs);
treeWidget->show();
listTabs->addTab(treeWidget, "Object Tree");
listTabs->addTab(colorListWidget, "ColorMap List");
dw->setWidget(listTabs);
addDockWidget(Qt::RightDockWidgetArea, dw, Qt::Horizontal);
// make a central widget window for the render area
QWidget *main = new QWidget(this);
main->setMinimumSize(720, 574); // will give PAL size images
viewer = new InvViewer(main);
setCentralWidget(main);
// create the lower docking window for sequencer
dw = new QDockWidget(this);
addDockWidget(Qt::BottomDockWidgetArea, dw, Qt::Vertical);
dw->setWindowTitle("Renderer Sequencer");
// qt3 dw->setHorizontallyStretchable(true);
// qt3 dw->setResizeEnabled(true);
sequencer = new InvSequencer(dw);
dw->setWidget(sequencer);
dw->hide();
// set the view all mode for the renderer
viewer->viewAll();
//connect( colorListBox->selectionModel(), SIGNAL(selectionChanged ( QItemSelection,QItemSelection )),
// this, SLOT(colorSelectionChanged ( QItemSelection,QItemSelection )) );
}
示例12: createDockWindows
void MainWindow::createDockWindows()
{
QDockWidget *dock = new QDockWidget(tr("Text Editor"), this);
m_editor = new TextEdit(dock);
connect(m_editor->document(), SIGNAL(contentsChanged()), this, SLOT(onEditorChanged()));
dock->setWidget(m_editor);
dock->setObjectName("text_editor");
addDockWidget(Qt::RightDockWidgetArea, dock);
m_showEditorDockAction = dock->toggleViewAction();
m_showEditorDockAction->setIconVisibleInMenu(false);
m_showEditorDockAction->setStatusTip(tr("Show or hide the document editor dock"));
m_showEditorDockAction->setIcon(QIcon::fromTheme("accessories-text-editor"));
m_showEditorDockAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_0));
dock = new QDockWidget(tr("Assistant"), this);
m_assistantToolBox = new QToolBox(dock);
dock->setWidget(m_assistantToolBox);
dock->setObjectName("assistant");
addDockWidget(Qt::LeftDockWidgetArea, dock);
connect(m_assistantToolBox, SIGNAL(currentChanged(int)),
this, SLOT(onCurrentAssistantChanged(int)));
m_showAssistantDockAction = dock->toggleViewAction();
m_showAssistantDockAction->setIconVisibleInMenu(false);
m_showAssistantDockAction->setStatusTip(tr("Show or hide the assistant dock"));
#if !defined(Q_WS_WIN) // BUG: icons are not displayed when cross-linking
m_showAssistantDockAction->setIcon(QIcon(":/assistant.svg"));
#endif
m_showAssistantDockAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_1));
dock = new QDockWidget(tr("Assistant Info"), this);
QWidget* widget = new QWidget(dock);
m_assistantPreviewNotes = new QLabel(widget);
m_assistantPreviewNotes->setText(tr("Code:"));
m_assistantCodePreview = new QTextEdit(widget);
m_assistantCodePreview->setReadOnly(true);
QBoxLayout* assistant_info_layout = new QBoxLayout(QBoxLayout::TopToBottom, widget);
assistant_info_layout->addWidget(m_assistantPreviewNotes);
assistant_info_layout->addWidget(m_assistantCodePreview);
widget->setLayout(assistant_info_layout);
dock->setWidget(widget);
dock->setObjectName("assistant_info");
addDockWidget(Qt::LeftDockWidgetArea, dock);
m_showAssistantInfoDockAction = dock->toggleViewAction();
m_showAssistantInfoDockAction->setIconVisibleInMenu(false);
m_showAssistantInfoDockAction->setStatusTip(tr("Show or hide the assistant info dock"));
#if !defined(Q_WS_WIN) // BUG: icons are not displayed when cross-linking
m_showAssistantInfoDockAction->setIcon(QIcon(":/assistant-info.svg"));
#endif
m_showAssistantInfoDockAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_2));
}
示例13: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
if (app.arguments().count() < 2) {
usage();
return 1;
}
///TODO: multi-part callgrind files
QFile file(app.arguments().at(1));
if (!file.open(QIODevice::ReadOnly)) {
qerr << "could not open callgrind file for reading:" << file.fileName() << file.errorString();
return 3;
}
Parser p;
p.parse(&file);
ParseData *data = p.takeData();
if (!data) {
qerr << "invalid callgrind file:" << file.fileName() << endl;
return 2;
}
QMainWindow window;
CallgrindWidgetHandler *handler = new CallgrindWidgetHandler(&window);
ModelTestWidget *widget = new ModelTestWidget(handler);
widget->setWindowTitle(file.fileName());
window.setCentralWidget(widget);
QDockWidget *callerDock = new QDockWidget("callers", &window);
callerDock->setWidget(handler->callersView());
window.addDockWidget(Qt::RightDockWidgetArea, callerDock);
QDockWidget *calleeDock = new QDockWidget("callees", &window);
calleeDock->setWidget(handler->calleesView());
window.addDockWidget(Qt::RightDockWidgetArea, calleeDock);
QDockWidget *widgetDock = new QDockWidget("vizualisation", &window);
widgetDock->setWidget(handler->visualisation());
window.addDockWidget(Qt::BottomDockWidgetArea, widgetDock);
handler->setParseData(data);
window.show();
return app.exec();
}
示例14: QMainWindow
KinectRecorderWindow::KinectRecorderWindow(int fps, KinectDevice* device)
: QMainWindow()
, fps_(fps)
, device_(device)
, widget_viewer_(new KinectViewerWidget(fps, device))
{
widget_viewer_->setMinimumSize(1280, 480);
widget_viewer_->setMaximumSize(1280, 480);
setCentralWidget(widget_viewer_);
QDockWidget *dock = new QDockWidget(this);
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
widget_record_ = new RecordInterfaceWidget(dock);
connect(widget_record_, SIGNAL(dialogOpened()), widget_viewer_, SLOT(pause()));
connect(widget_record_, SIGNAL(dialogClosed()), widget_viewer_, SLOT(resume()));
connect(widget_record_, SIGNAL(destroyed(QObject*)), this, SLOT(close()));
connect(widget_record_, SIGNAL(startRecord(std::string)), this, SLOT(recordStarted(std::string)));
connect(widget_record_, SIGNAL(finishRecord()), this, SLOT(recordFinished()));
widget_record_->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
dock->setWidget(widget_record_);
addDockWidget(Qt::BottomDockWidgetArea, dock);
setWindowTitle("Kinect viewer");
move(100, 100);
setAttribute(Qt::WA_DeleteOnClose);
}
示例15: QMainWindow
MainWindow::MainWindow(QWidget* parent, int, char* const*) :
QMainWindow(parent),
d(new Private(this)) {
createActions();
createMenus();
createToolBars();
connect(d->saveAct, SIGNAL(triggered()), d->result, SLOT(saveResult()));
setCentralWidget(d->result);
d->result->setFocusPolicy(Qt::ClickFocus);
QDockWidget* settingsDock = new QDockWidget(tr("Settings"), this);
settingsDock->setAllowedAreas(Qt::LeftDockWidgetArea);
settingsDock->setWidget(d->settings);
addDockWidget(Qt::LeftDockWidgetArea, settingsDock);
d->result->setFocus();
d->setSettings();
connect(d->settings,
SIGNAL(settingsChanged(int, int, int, int, int, int)),
this,
SLOT(getSettings(int, int, int, int, int, int)));
// connect (result, SIGNAL (etching()), this, SLOT (etch()));
connect(d->etchMenu, SIGNAL(startEtching(int, int, float*)), this,
SLOT(etch(int, int, float*)));
}