• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setViewMode函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setViewMode函数的典型用法代码示例。如果您正苦于以下问题:C++ setViewMode函数的具体用法?C++ setViewMode怎么用?C++ setViewMode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setViewMode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
	}
}
开发者ID:alon24,项目名称:InfoScreens,代码行数:26,代码来源:InfoScreens.cpp


示例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
        }
开发者ID:betsegaw,项目名称:bibletime,代码行数:28,代码来源:cmdiarea.cpp


示例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)));
}
开发者ID:BogusCurry,项目名称:hifi,代码行数:32,代码来源:ImportDialog.cpp


示例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()));
}
开发者ID:Issacchaos,项目名称:hifi,代码行数:30,代码来源:ImportDialog.cpp


示例5: setViewMode

void KPrView::startPresentation()
{
    m_actionDrawOnPresentation->setEnabled(true);
    m_actionHighlightPresentation->setEnabled(true);
    m_actionBlackPresentation->setEnabled(true);
    setViewMode( m_presentationMode );
}
开发者ID:KDE,项目名称:calligra-history,代码行数:7,代码来源:KPrView.cpp


示例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"));
}
开发者ID:arunjalota,项目名称:paperman,代码行数:30,代码来源:qpreviewfiledialog.cpp


示例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());
}
开发者ID:getwingm,项目名称:TTKMusicplayer,代码行数:25,代码来源:musictoolsetswidget.cpp


示例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
}
开发者ID:dragly,项目名称:nanoparticles,代码行数:16,代码来源:gamescene.cpp


示例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);
}
开发者ID:AlterScribus,项目名称:ece15,代码行数:27,代码来源:scfilewidget.cpp


示例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;
}
开发者ID:pk-codebox-evo,项目名称:remixos-usb-tool,代码行数:34,代码来源:moc_qprintpreviewwidget.cpp


示例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&)));
	}
开发者ID:Jellofishi,项目名称:Desktop,代码行数:8,代码来源:photos_import_view.cpp


示例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);
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:9,代码来源:musicbackgroundlistwidget.cpp


示例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*)));
}
开发者ID:OGMalin,项目名称:PolarChess,代码行数:9,代码来源:PathWindow.cpp


示例14: QStackedWidget

FolderView::FolderView(int mode, QWidget *parent)
	: QStackedWidget(parent)
{
	listView = new ListView();
	addWidget(listView);
        //colView = new ColumnView();
	//addWidget(colView);
	setViewMode(mode);
}
开发者ID:admiral0,项目名称:Antico-Deluxe,代码行数:9,代码来源:folderview.cpp


示例15: QMdiArea

MyCentralWidget::MyCentralWidget(QWidget *parent) :
    QMdiArea(parent)

{
    setViewMode(QMdiArea::TabbedView);
    setTabsMovable(true);
    setTabsClosable(true);
    setDocumentMode(true);
}
开发者ID:mortang2410,项目名称:drawing_joke,代码行数:9,代码来源:mycentralwidget.cpp


示例16: QAutoExpandList

QGroupList::QGroupList(QWidget *parent) :
    QAutoExpandList(parent)
{
    setIconSize(QSize(ICON_DIM, ICON_DIM));
	setViewMode(QListView::IconMode);
	setWordWrap(true);
	setFrameStyle(QFrame::NoFrame);
        //setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum));
}
开发者ID:KdeOs,项目名称:pcbsd,代码行数:9,代码来源:grouplist.cpp


示例17: QDialog

IconPickerDialog::IconPickerDialog(QWidget *parent) :
	QDialog(parent),
	ui(new Ui::IconPickerDialog)
{
    MultiMCPlatform::fixWM_CLASS(this);
	ui->setupUi(this);
	setWindowModality(Qt::WindowModal);
	
	auto contentsWidget = ui->iconView;
	contentsWidget->setViewMode(QListView::IconMode);
	contentsWidget->setFlow(QListView::LeftToRight);
	contentsWidget->setIconSize(QSize(48, 48));
	contentsWidget->setMovement(QListView::Static);
	contentsWidget->setResizeMode(QListView::Adjust);
	contentsWidget->setSelectionMode(QAbstractItemView::SingleSelection);
	contentsWidget->setSpacing(5);
	contentsWidget->setWordWrap(false);
	contentsWidget->setWrapping(true);
	contentsWidget->setUniformItemSizes(true);
	contentsWidget->setTextElideMode(Qt::ElideRight);
	contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
	contentsWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
	contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	contentsWidget->setItemDelegate(new ListViewDelegate());
	
	//contentsWidget->setAcceptDrops(true);
	contentsWidget->setDropIndicatorShown(true);
	contentsWidget->viewport()->setAcceptDrops(true);
	contentsWidget->setDragDropMode(QAbstractItemView::DropOnly);
	contentsWidget->setDefaultDropAction(Qt::CopyAction);
	
	contentsWidget->installEventFilter(this);
	
	contentsWidget->setModel(MMC->icons().get());
	
	auto buttonAdd = ui->buttonBox->addButton(tr("Add Icon"),QDialogButtonBox::ResetRole);
	auto buttonRemove = ui->buttonBox->addButton(tr("Remove Icon"),QDialogButtonBox::ResetRole);
	
	
	connect(buttonAdd,SIGNAL(clicked(bool)),SLOT(addNewIcon()));
	connect(buttonRemove,SIGNAL(clicked(bool)),SLOT(removeSelectedIcon()));
	
	connect
	(
		contentsWidget,
		SIGNAL(doubleClicked(QModelIndex)),
		SLOT(activated(QModelIndex))
	);
	
	connect
	(
		contentsWidget->selectionModel(),
		SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
		SLOT(selectionChanged(QItemSelection,QItemSelection))
	);
}
开发者ID:Loras,项目名称:MultiMC5,代码行数:56,代码来源:IconPickerDialog.cpp


示例18: switch

void InfoScreens::editModeBtnClicked(MultiFunctionButtonAction event)
{
	switch (event) {
		case BTN_CLICK:
			debugf("edit - click");
			moveToNextEditParam();
			break;
		case BTN_DOUBLE_CLICK:
			setViewMode(ViewMode::INFO);
			show();
			break;
		case BTN_LONG_CLICK:
			setViewMode(ViewMode::EDIT_FIELD);
			break;
		case BTN_HOLD_CLICK:
			debugf("BTN_HOLD_CLICK");
			break;
	}
}
开发者ID:BorntraegerMarc,项目名称:SmingRTOS,代码行数:19,代码来源:InfoScreens.cpp


示例19: QListWidget

PiecesList::PiecesList(QWidget *parent)
    : QListWidget(parent)
{
    setDragEnabled(true);
    setViewMode(QListView::IconMode);
    setIconSize(QSize(60, 60));
    setSpacing(10);
    setAcceptDrops(true);
    setDropIndicatorShown(true);
}
开发者ID:Fale,项目名称:qtmoko,代码行数:10,代码来源:pieceslist.cpp


示例20: QListWidget

PiecesList::PiecesList(int pieceSize, QWidget *parent)
    : QListWidget(parent), m_PieceSize(pieceSize)
{
    setDragEnabled(true);
    setViewMode(QListView::IconMode);
    setIconSize(QSize(m_PieceSize, m_PieceSize));
    setSpacing(10);
    setAcceptDrops(true);
    setDropIndicatorShown(true);
}
开发者ID:ismaell,项目名称:android-qt5-qtbase,代码行数:10,代码来源:pieceslist.cpp



注:本文中的setViewMode函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setViewport函数代码示例发布时间:2022-05-30
下一篇:
C++ setView函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap