本文整理汇总了C++中setViewMode函数的典型用法代码示例。如果您正苦于以下问题:C++ setViewMode函数的具体用法?C++ setViewMode怎么用?C++ setViewMode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setViewMode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void InfoScreens::editModeBtnClicked(MultiFunctionButtonAction event)
{
switch (event) {
case BTN_CLICK:
debugf("edit - click");
moveToNextEditParam();
// moveRight();
// handleClick();
break;
case BTN_DOUBLE_CLICK:
// debugf("return to View mode");
setViewMode(ViewMode::INFO);
show();
// moveLeft();
// handleDoubleClick();
break;
case BTN_LONG_CLICK:
// debugf("edit - BTN_LONG_CLICK");
setViewMode(ViewMode::EDIT_FIELD);
// handleHoldClick();
break;
case BTN_HOLD_CLICK:
debugf("BTN_HOLD_CLICK");
break;
}
}
示例2: switch
void CMDIArea::setMDIArrangementMode( const MDIArrangementMode newArrangementMode ) {
m_mdiArrangementMode = newArrangementMode;
switch (m_mdiArrangementMode) {
case ArrangementModeManual:
setViewMode(QMdiArea::SubWindowView);
break;
case ArrangementModeTile:
setViewMode(QMdiArea::SubWindowView);
tileSubWindows();
break;
case ArrangementModeTabbed:
setViewMode(QMdiArea::TabbedView);
break;
default:
setViewMode(QMdiArea::SubWindowView);
triggerWindowUpdate();
break;
}
Q_FOREACH(QTabBar * const tab, findChildren<QTabBar *>()) {
QObject* parent = tab->parent();
if (parent == this) {
tab->setTabsClosable(true);
// As of version 4.8, Qt does the close for us.
#if QT_VERSION < 0x040800
disconnect(tab, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
connect(tab, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
#endif
}
示例3: QFileDialog
ImportDialog::ImportDialog(QWidget* parent) :
QFileDialog(parent, WINDOW_NAME, DESKTOP_LOCATION, NULL),
_importButton(IMPORT_BUTTON_NAME, this),
_cancelButton(CANCEL_BUTTON_NAME, this),
fileAccepted(false) {
setOption(QFileDialog::DontUseNativeDialog, true);
setFileMode(QFileDialog::ExistingFile);
setViewMode(QFileDialog::Detail);
#ifdef Q_OS_MAC
QString cmdString = ("Command");
#else
QString cmdString = ("Control");
#endif
QLabel* infoLabel = new QLabel(QString(INFO_LABEL_TEXT).arg(cmdString));
infoLabel->setObjectName("infoLabel");
QGridLayout* gridLayout = (QGridLayout*) layout();
gridLayout->addWidget(infoLabel, 2, 0, 2, 1);
gridLayout->addWidget(&_cancelButton, 2, 1, 2, 1);
gridLayout->addWidget(&_importButton, 2, 2, 2, 1);
setImportTypes();
setLayout();
connect(&_importButton, SIGNAL(pressed()), SLOT(import()));
connect(this, SIGNAL(currentChanged(QString)), SLOT(saveCurrentFile(QString)));
connect(&_cancelButton, SIGNAL(pressed()), SLOT(close()));
connect(this, SIGNAL(currentChanged(QString)), SLOT(saveCurrentFile(QString)));
}
示例4: QFileDialog
ImportDialog::ImportDialog(QWidget *parent)
: QFileDialog(parent, WINDOW_NAME, DESKTOP_LOCATION, IMPORT_FILE_TYPES),
_importButton (IMPORT_BUTTON_NAME, this),
_clipboardImportBox(IMPORT_TO_CLIPBOARD_CHECKBOX_STRING, this),
_previewBox (PREVIEW_CHECKBOX_STRING, this),
_previewBar (this),
_glPreview (new GLWidget(this)) {
setOption(QFileDialog::DontUseNativeDialog, true);
setFileMode(QFileDialog::ExistingFile);
setViewMode(QFileDialog::Detail);
QGridLayout* gridLayout = (QGridLayout*) layout();
gridLayout->addWidget(&_importButton , 2, 2);
gridLayout->addWidget(&_clipboardImportBox, 2, 3);
gridLayout->addWidget(&_previewBox , 3, 3);
gridLayout->addWidget(&_previewBar , 0, 3);
gridLayout->addWidget(_glPreview , 1, 3);
gridLayout->setColumnStretch(3, 1);
_previewBar.setVisible(false);
_previewBar.setRange(0, 100);
_previewBar.setValue(0);
connect(&_importButton, SIGNAL(pressed()), SLOT(import()));
connect(&_previewBox, SIGNAL(toggled(bool)), SIGNAL(previewToggled(bool)));
connect(&_previewBox, SIGNAL(toggled(bool)), SLOT(preview(bool)));
connect(this, SIGNAL(currentChanged(QString)), SLOT(saveCurrentFile(QString)));
connect(&_glTimer, SIGNAL(timeout()), SLOT(timer()));
}
示例5: setViewMode
void KPrView::startPresentation()
{
m_actionDrawOnPresentation->setEnabled(true);
m_actionHighlightPresentation->setEnabled(true);
m_actionBlackPresentation->setEnabled(true);
setViewMode( m_presentationMode );
}
示例6: QWidget
void QPreviewFileDialog::initDlg()
{
ImageIOSupporter iisup;
QStringList filters;
QString qs;
if(mPreviewMode)
{
QWidget* widget = new QWidget(this);
QVBoxLayout* qvbl = new QVBoxLayout(widget);
mpPreviewCheckBox = new QCheckBox(tr("Show preview"),widget);
connect(mpPreviewCheckBox,SIGNAL(toggled(bool)),
this,SLOT(slotShowPreview(bool)));
mpPixWidget = new QLabel(widget);
mpPixWidget->setMinimumWidth(200);
qvbl->setMargin(5);
qvbl->addWidget(mpPreviewCheckBox);
qvbl->addWidget(mpPixWidget);
qvbl->setStretchFactor (mpPixWidget,1);
mpPixWidget->setPalette(QColor(lightGray));
addLeftWidget(widget);
resize(550,300);
}
mImageFormat =xmlConfig->stringValue("VIEWER_IMAGE_TYPE","ALL_FILES");
filters = iisup.getOrderedOutFilterList(mImageFormat);
setDir(xmlConfig->stringValue("SINGLEFILE_SAVE_PATH"));
setFilters(filters);
setMode(QFileDialog::AnyFile);
setSizeGripEnabled(false);
setViewMode((QFileDialog::ViewMode)xmlConfig->intValue("SINGLEFILE_VIEW_MODE"));
}
示例7: QListWidget
MusicToolSetsWidget::MusicToolSetsWidget(QWidget *parent)
: QListWidget(parent)
{
setAttribute(Qt::WA_TranslucentBackground, true);
setFrameShape(QFrame::NoFrame);//Set No Border
setStyleSheet(MusicUIObject::MScrollBarStyle01);
setIconSize(QSize(60, 60));
setViewMode(QListView::IconMode);
setMovement(QListView::Static);
#ifdef Q_OS_WIN
setSpacing(17);
addListWidgetItem();
#else
setSpacing(16);
QTimer::singleShot(1, this, SLOT(addListWidgetItem()));
#endif
MusicUtils::UWidget::setTransparent(this, 50);
connect(this, SIGNAL(itemClicked(QListWidgetItem*)),
SLOT(itemHasClicked(QListWidgetItem*)));
M_CONNECTION_PTR->setValue(getClassName(), this);
M_CONNECTION_PTR->poolConnect(getClassName(), MusicApplication::getClassName());
M_CONNECTION_PTR->poolConnect(getClassName(), MusicLeftAreaWidget::getClassName());
}
示例8: setViewMode
void GameScene::clickedDashboardButton()
{
#if defined Q_WS_MAEMO_5
QDBusConnection connection = QDBusConnection::sessionBus();
QDBusMessage message = QDBusMessage::createSignal("/","com.nokia.hildon_desktop","exit_app_view");
connection.send(message);
#elif (defined Q_OS_LINUX || defined Q_OS_MAC || defined Q_OS_WIN32) && !defined OS_IS_HARMATTAN && !defined OS_IS_ANDROID
if(viewMode() == ViewNormal) {
setViewMode(ViewFullScreen);
} else {
setViewMode(ViewNormal);
}
#else
qDebug() << "Dashboard button should not have been shown...";
#endif
}
示例9: QFileDialog
ScFileWidget::ScFileWidget(QWidget * parent)
: QFileDialog(parent, Qt::Widget)
{
setSizeGripEnabled(false);
setModal(false);
setViewMode(QFileDialog::List);
setWindowFlags(Qt::Widget);
#ifdef Q_OS_MAC
QList<QUrl> urls;
QUrl computer(QUrl::fromLocalFile(QLatin1String("")));
if (!urls.contains(computer))
urls << computer;
QUrl volumes(QUrl::fromLocalFile("/Volumes"));
if (!urls.contains(volumes))
urls << volumes;
//desktop too? QUrl computer(QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)));
setSidebarUrls(urls);
#endif
QList<QPushButton *> b = findChildren<QPushButton *>();
QListIterator<QPushButton *> i(b);
while (i.hasNext())
i.next()->setVisible(false);
setMinimumSize(QSize(480, 310));
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
示例10: switch
int QPrintPreviewWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: paintRequested((*reinterpret_cast< QPrinter*(*)>(_a[1]))); break;
case 1: previewChanged(); break;
case 2: print(); break;
case 3: zoomIn((*reinterpret_cast< qreal(*)>(_a[1]))); break;
case 4: zoomIn(); break;
case 5: zoomOut((*reinterpret_cast< qreal(*)>(_a[1]))); break;
case 6: zoomOut(); break;
case 7: setZoomFactor((*reinterpret_cast< qreal(*)>(_a[1]))); break;
case 8: setOrientation((*reinterpret_cast< QPrinter::Orientation(*)>(_a[1]))); break;
case 9: setViewMode((*reinterpret_cast< ViewMode(*)>(_a[1]))); break;
case 10: setZoomMode((*reinterpret_cast< ZoomMode(*)>(_a[1]))); break;
case 11: setCurrentPage((*reinterpret_cast< int(*)>(_a[1]))); break;
case 12: fitToWidth(); break;
case 13: fitInView(); break;
case 14: setLandscapeOrientation(); break;
case 15: setPortraitOrientation(); break;
case 16: setSinglePageViewMode(); break;
case 17: setFacingPagesViewMode(); break;
case 18: setAllPagesViewMode(); break;
case 19: updatePreview(); break;
case 20: d_func()->_q_fit(); break;
case 21: d_func()->_q_updateCurrentPage(); break;
}
_id -= 22;
}
return _id;
}
示例11: QListView
PhotosImportView::PhotosImportView(QWidget * parent):
QListView(parent) {
setViewMode(QListView::IconMode);
setSpacing(5);
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(contextMenu(const QPoint&)));
}
示例12: QListWidget
MusicBackgroundListWidget::MusicBackgroundListWidget(QWidget *parent)
: QListWidget(parent)
{
setFrameShape(QFrame::NoFrame); //Set No Border
setStyleSheet(MusicUIObject::MScrollBarStyle01);
setIconSize(QSize(100, 80));
setViewMode(QListView::IconMode);
setMovement(QListView::Static);
}
示例13: QListWidget
PathWindow::PathWindow(QWidget *parent)
: QListWidget(parent)
{
char sz[16];
setViewMode(QListWidget::IconMode);
setResizeMode(QListWidget::Adjust);
setMovement(QListWidget::Static);
connect(this, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(moveClicked(QListWidgetItem*)));
}
示例14: QStackedWidget
FolderView::FolderView(int mode, QWidget *parent)
: QStackedWidget(parent)
{
listView = new ListView();
addWidget(listView);
//colView = new ColumnView();
//addWidget(colView);
setViewMode(mode);
}
示例15: QMdiArea
MyCentralWidget::MyCentralWidget(QWidget *parent) :
QMdiArea(parent)
{
setViewMode(QMdiArea::TabbedView);
setTabsMovable(true);
setTabsClosable(true);
setDocumentMode(true);
}