本文整理汇总了C++中CWizExplorerApp::userSettings方法的典型用法代码示例。如果您正苦于以下问题:C++ CWizExplorerApp::userSettings方法的具体用法?C++ CWizExplorerApp::userSettings怎么用?C++ CWizExplorerApp::userSettings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWizExplorerApp
的用法示例。
在下文中一共展示了CWizExplorerApp::userSettings方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CWizCategoryViewGroupsRootItem
CWizCategoryViewJionedGroupRootItem::CWizCategoryViewJionedGroupRootItem(CWizExplorerApp& app)
: CWizCategoryViewGroupsRootItem(app, CATEGORY_OTHER_GROUPS)
{
QIcon icon;
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "group_normal"),
QSize(16, 16), QIcon::Normal);
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "group_selected"),
QSize(16, 16), QIcon::Selected);
setIcon(0, icon);
}
示例2: CWizCategoryViewItemBase
CWizCategoryViewGroupsRootItem::CWizCategoryViewGroupsRootItem(CWizExplorerApp& app, const QString& strName)
: CWizCategoryViewItemBase(app, strName, "")
{
QIcon icon;
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "group_normal"),
QSize(16, 16), QIcon::Normal);
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "group_selected"),
QSize(16, 16), QIcon::Selected);
setIcon(0, icon);
setText(0, strName);
}
示例3: CWizCategoryViewFolderItem
CWizCategoryViewTrashItem::CWizCategoryViewTrashItem(CWizExplorerApp& app,
const QString& strKbGUID)
: CWizCategoryViewFolderItem(app, "/Deleted Items/", strKbGUID)
{
QIcon icon;
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "trash_normal"),
QSize(16, 16), QIcon::Normal);
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "trash_selected"),
QSize(16, 16), QIcon::Selected);
setIcon(0, icon);
setText(0, PREDEFINED_TRASH);
}
示例4: QWidget
CWizDocumentView::CWizDocumentView(CWizExplorerApp& app, QWidget* parent)
: QWidget(parent)
, m_app(app)
, m_userSettings(app.userSettings())
, m_dbMgr(app.databaseManager())
, m_title(new CWizTitleBar(app, this))
, m_web(new CWizDocumentWebView(app, this))
, m_client(NULL)
, m_tags(NULL)
, m_attachments(NULL)
, m_editingDocument(true)
, m_viewMode(app.userSettings().noteViewMode())
{
m_client = createClient();
QVBoxLayout* layout = new QVBoxLayout(this);
setLayout(layout);
layout->addWidget(m_client);
layout->setContentsMargins(0, 0, 0, 0);
m_title->setEditingDocument(m_editingDocument);
m_timerDelay.setSingleShot(true);
connect(&m_timerDelay, SIGNAL(timeout()), SLOT(on_titleEdit_textEdit_writeDelay()));
connect(m_title->titleEdit(), SIGNAL(textChanged(const QString&)), \
SLOT(on_titleEdit_textChanged(const QString&)));
connect(m_title->editDocumentButton(), SIGNAL(clicked()), \
SLOT(on_editDocumentButton_clicked()));
connect(m_title->tagsButton(), SIGNAL(clicked()), \
SLOT(on_tagsButton_clicked()));
connect(m_title->attachmentButton(), SIGNAL(clicked()), \
SLOT(on_attachmentButton_clicked()));
connect(m_title->infoButton(), SIGNAL(clicked()), \
SLOT(on_infoButton_clicked()));
qRegisterMetaType<WIZDOCUMENTDATA>("WIZDOCUMENTDATA");
qRegisterMetaType<WIZDOCUMENTATTACHMENTDATA>("WIZDOCUMENTATTACHMENTDATA");
connect(&m_dbMgr, SIGNAL(documentModified(const WIZDOCUMENTDATA&, const WIZDOCUMENTDATA&)), \
SLOT(on_document_modified(const WIZDOCUMENTDATA&, const WIZDOCUMENTDATA&)));
connect(&m_dbMgr, SIGNAL(attachmentCreated(const WIZDOCUMENTATTACHMENTDATA&)), \
SLOT(on_attachment_created(const WIZDOCUMENTATTACHMENTDATA&)));
connect(&m_dbMgr, SIGNAL(attachmentDeleted(const WIZDOCUMENTATTACHMENTDATA&)), \
SLOT(on_attachment_deleted(const WIZDOCUMENTATTACHMENTDATA&)));
}
示例5: CWizCategoryViewItemBase
/* -------------------- CWizCategoryViewMessageRootItem -------------------- */
CWizCategoryViewMessageItem::CWizCategoryViewMessageItem(CWizExplorerApp& app,
const QString& strName, int nFilterType)
: CWizCategoryViewItemBase(app, strName)
{
QIcon icon;
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "messages_normal"),
QSize(16, 16), QIcon::Normal);
icon.addFile(WizGetSkinResourceFileName(app.userSettings().skin(), "messages_selected"),
QSize(16, 16), QIcon::Selected);
setIcon(0, icon);
setText(0, strName);
m_nFilter = nFilterType;
}
示例6: QFrame
CWizGroupAttributeForm::CWizGroupAttributeForm(CWizExplorerApp& app, QWidget* parent)
: QFrame(parent)
, m_app(app)
, m_web(new QWebView(parent))
{
setFrameShadow(QFrame::Raised);
setFrameShape(QFrame::StyledPanel);
setAutoFillBackground(true);
setAttribute(Qt::WA_MacShowFocusRect, true);
QVBoxLayout* layout = new QVBoxLayout(this);
setLayout(layout);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(m_web);
QPushButton* btnClose = new QPushButton(this);
btnClose->setDefault(true);
btnClose->setIcon(::WizLoadSkinIcon(app.userSettings().skin(), palette().window().color(), "sheetHide"));
btnClose->setFlat(true);
btnClose->setMaximumHeight(18);
btnClose->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
connect(btnClose, SIGNAL(clicked()), SLOT(on_btnClose_clicked()));
layout->addWidget(btnClose);
layout->setAlignment(btnClose, Qt::AlignHCenter);
connect(&m_api, SIGNAL(clientLoginDone()), SLOT(on_clientLoginDone()));
}
示例7: WIZUSERINFOWIDGETBASE
CWizUserInfoWidget::CWizUserInfoWidget(CWizExplorerApp& app, QWidget *parent)
: WIZUSERINFOWIDGETBASE(parent)
, m_app(app)
, m_db(app.databaseManager().db())
{
connect(AvatarHost::instance(), SIGNAL(loaded(const QString&)),
SLOT(on_userAvatar_loaded(const QString&)));
AvatarHost::load(m_db.GetUserId());
resetUserInfo();
connect(&m_db, SIGNAL(userInfoChanged()), SLOT(on_userInfo_changed()));
// load builtin arraw
QString strIconPath = ::WizGetSkinResourcePath(app.userSettings().skin()) + "arrow.png";
m_iconArraw.addFile(strIconPath);
// setup menu
m_menuMain = new QMenu(this);
QAction* actionAccountInfo = new QAction(tr("View account info..."), m_menuMain);
connect(actionAccountInfo, SIGNAL(triggered()), SLOT(on_action_accountInfo_triggered()));
actionAccountInfo->setVisible(false);
QAction* actionAccountSetup = new QAction(tr("Account settings..."), m_menuMain);
connect(actionAccountSetup, SIGNAL(triggered()), SLOT(on_action_accountSetup_triggered()));
QAction* actionChangeAvatar = new QAction(tr("Change avatar..."), m_menuMain);
connect(actionChangeAvatar, SIGNAL(triggered()), SLOT(on_action_changeAvatar_triggered()));
QAction* actionWebService = new QAction(tr("Open web client..."), m_menuMain);
connect(actionWebService, SIGNAL(triggered()), SLOT(on_action_viewNotesOnWeb_triggered()));
QAction* actionMyShare = new QAction(tr("My shared links..."), m_menuMain);
connect(actionMyShare, SIGNAL(triggered()), SLOT(on_action_mySharedNotes_triggered()));
QAction* actionLogout = new QAction(tr("Logout..."), m_menuMain);
connect(actionLogout, SIGNAL(triggered()), SLOT(on_action_logout_triggered()));
m_menuMain->addAction(actionAccountInfo);
m_menuMain->addAction(actionAccountSetup);
m_menuMain->addAction(actionChangeAvatar);
m_menuMain->addSeparator();
m_menuMain->addAction(actionWebService);
m_menuMain->addAction(actionMyShare);
m_menuMain->addSeparator();
m_menuMain->addAction(actionLogout);
//
setMenu(m_menuMain);
}
示例8: INoteView
CWizDocumentView::CWizDocumentView(CWizExplorerApp& app, QWidget* parent)
: INoteView(parent)
, m_app(app)
, m_userSettings(app.userSettings())
, m_dbMgr(app.databaseManager())
, m_web(new CWizDocumentWebView(app, this))
, m_comments(new QWebView(this))
, m_title(new TitleBar(this))
, m_viewMode(app.userSettings().noteViewMode())
, m_bLocked(false)
, m_bEditingMode(false)
, m_noteLoaded(false)
{
m_title->setEditor(m_web);
QVBoxLayout* layoutDoc = new QVBoxLayout();
layoutDoc->setContentsMargins(0, 0, 0, 0);
layoutDoc->setSpacing(0);
m_docView = new QWidget(this);
m_docView->setLayout(layoutDoc);
m_tab = new QStackedWidget(this);
//
MainWindow* mainWindow = qobject_cast<MainWindow *>(m_app.mainWindow());
m_passwordView = new CWizUserCipherForm(m_app, this);
m_passwordView->setGeometry(this->geometry());
connect(m_passwordView, SIGNAL(cipherCheckRequest()), SLOT(onCipherCheckRequest()));
//
m_msgWidget = new QWidget(this);
QVBoxLayout* layoutMsg = new QVBoxLayout();
m_msgWidget->setLayout(layoutMsg);
m_msgLabel = new QLabel(m_msgWidget);
m_msgLabel->setAlignment(Qt::AlignCenter);
m_msgLabel->setWordWrap(true);
layoutMsg->addWidget(m_msgLabel);
//
m_tab->addWidget(m_docView);
m_tab->addWidget(m_passwordView);
m_tab->addWidget(m_msgWidget);
m_tab->setCurrentWidget(m_docView);
m_splitter = new CWizSplitter(this);
m_splitter->addWidget(m_web);
m_splitter->addWidget(m_comments);
m_comments->page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
m_comments->hide();
layoutDoc->addWidget(m_title);
layoutDoc->addWidget(m_splitter);
layoutDoc->setStretchFactor(m_title, 0);
layoutDoc->setStretchFactor(m_splitter, 1);
QVBoxLayout* layoutMain = new QVBoxLayout(this);
layoutMain->setContentsMargins(0, 0, 0, 0);
setLayout(layoutMain);
layoutMain->addWidget(m_tab);
m_downloaderHost = mainWindow->downloaderHost();
connect(m_downloaderHost, SIGNAL(downloadDone(const WIZOBJECTDATA&, bool)),
SLOT(on_download_finished(const WIZOBJECTDATA&, bool)));
connect(&m_dbMgr, SIGNAL(documentModified(const WIZDOCUMENTDATA&, const WIZDOCUMENTDATA&)), \
SLOT(on_document_modified(const WIZDOCUMENTDATA&, const WIZDOCUMENTDATA&)));
connect(&m_dbMgr, SIGNAL(documentDataModified(const WIZDOCUMENTDATA&)),
SLOT(on_document_data_modified(const WIZDOCUMENTDATA&)));
connect(&m_dbMgr, SIGNAL(attachmentCreated(const WIZDOCUMENTATTACHMENTDATA&)), \
SLOT(on_attachment_created(const WIZDOCUMENTATTACHMENTDATA&)));
connect(&m_dbMgr, SIGNAL(attachmentDeleted(const WIZDOCUMENTATTACHMENTDATA&)), \
SLOT(on_attachment_deleted(const WIZDOCUMENTATTACHMENTDATA&)));
connect(Core::ICore::instance(), SIGNAL(viewNoteRequested(Core::INoteView*,const WIZDOCUMENTDATA&)),
SLOT(onViewNoteRequested(Core::INoteView*,const WIZDOCUMENTDATA&)));
connect(Core::ICore::instance(), SIGNAL(viewNoteLoaded(Core::INoteView*,WIZDOCUMENTDATA,bool)),
SLOT(onViewNoteLoaded(Core::INoteView*,const WIZDOCUMENTDATA&,bool)));
connect(Core::ICore::instance(), SIGNAL(closeNoteRequested(Core::INoteView*)),
SLOT(onCloseNoteRequested(Core::INoteView*)));
}
示例9: QListWidget
CWizDocumentListView::CWizDocumentListView(CWizExplorerApp& app, QWidget *parent /*= 0*/)
: QListWidget(parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
, m_tagList(NULL)
, m_itemSelectionChanged(false)
, m_accpetAllItems(false)
{
setFrameStyle(QFrame::NoFrame);
setAttribute(Qt::WA_MacShowFocusRect, false);
setSelectionMode(QAbstractItemView::ExtendedSelection);
m_nViewType = (ViewType)app.userSettings().get("VIEW_TYPE").toInt();
m_nSortingType = app.userSettings().get("SORT_TYPE").toInt();
if (qAbs(m_nSortingType) < CWizSortingPopupButton::SortingCreateTime ||
qAbs(m_nSortingType) > CWizSortingPopupButton::SortingSize)
{
m_nSortingType = CWizSortingPopupButton::SortingCreateTime;
}
connect(this, SIGNAL(itemSelectionChanged()), SLOT(on_itemSelectionChanged()));
// scroll bar
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
#ifdef Q_OS_MAC
verticalScrollBar()->setSingleStep(15);
#else
verticalScrollBar()->setSingleStep(30);
#endif
#ifdef WIZNOTE_CUSTOM_SCROLLBAR
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_vScroll = new CWizScrollBar(this);
m_vScroll->syncWith(verticalScrollBar());
#endif
// setup style
QString strSkinName = m_app.userSettings().skin();
setStyle(::WizGetStyle(strSkinName));
QPalette pal = palette();
pal.setColor(QPalette::Base, Utils::StyleHelper::listViewBackground());
setPalette(pal);
setCursor(QCursor(Qt::ArrowCursor));
//
connect(&m_dbMgr, SIGNAL(tagCreated(const WIZTAGDATA&)), \
SLOT(on_tag_created(const WIZTAGDATA&)));
connect(&m_dbMgr, SIGNAL(tagModified(const WIZTAGDATA&, const WIZTAGDATA&)), \
SLOT(on_tag_modified(const WIZTAGDATA&, const WIZTAGDATA&)));
connect(&m_dbMgr, SIGNAL(documentCreated(const WIZDOCUMENTDATA&)), \
SLOT(on_document_created(const WIZDOCUMENTDATA&)));
connect(&m_dbMgr, SIGNAL(documentModified(const WIZDOCUMENTDATA&, const WIZDOCUMENTDATA&)), \
SLOT(on_document_modified(const WIZDOCUMENTDATA&, const WIZDOCUMENTDATA&)));
connect(&m_dbMgr, SIGNAL(documentDeleted(const WIZDOCUMENTDATA&)),
SLOT(on_document_deleted(const WIZDOCUMENTDATA&)));
connect(&m_dbMgr, SIGNAL(documentReadCountChanged(const WIZDOCUMENTDATA&)),
SLOT(on_documentReadCount_changed(const WIZDOCUMENTDATA&)));
// message
//connect(&m_dbMgr.db(), SIGNAL(messageModified(const WIZMESSAGEDATA&, const WIZMESSAGEDATA&)),
// SLOT(on_message_modified(const WIZMESSAGEDATA&, const WIZMESSAGEDATA&)));
//connect(&m_dbMgr.db(), SIGNAL(messageDeleted(const WIZMESSAGEDATA&)),
// SLOT(on_message_deleted(const WIZMESSAGEDATA&)));
// thumb cache
//m_thumbCache = new CWizThumbIndexCache(app);
//connect(m_thumbCache, SIGNAL(loaded(const WIZABSTRACT&)),
// SLOT(on_document_abstractLoaded(const WIZABSTRACT&)));
//QThread *thread = new QThread();
//m_thumbCache->moveToThread(thread);
//thread->start();
connect(ThumbCache::instance(), SIGNAL(loaded(const QString& ,const QString&)),
SLOT(onThumbCacheLoaded(const QString&, const QString&)));
connect(WizService::AvatarHost::instance(), SIGNAL(loaded(const QString&)),
SLOT(on_userAvatar_loaded(const QString&)));
setDragDropMode(QAbstractItemView::DragDrop);
setDragEnabled(true);
viewport()->setAcceptDrops(true);
// message context menu
//m_menuMessage = new QMenu(this);
//m_menuMessage->addAction(WIZACTION_LIST_MESSAGE_MARK_READ, this,
// SLOT(on_action_message_mark_read()));
//m_menuMessage->addAction(WIZACTION_LIST_MESSAGE_DELETE, this,
// SLOT(on_action_message_delete()));
// document context menu
m_menuDocument = new QMenu(this);
//.........这里部分代码省略.........
示例10: INoteView
CWizDocumentView::CWizDocumentView(CWizExplorerApp& app, QWidget* parent)
: INoteView(parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
, m_userSettings(app.userSettings())
#ifdef USEWEBENGINE
, m_web(new CWizDocumentWebEngine(app, this))
, m_comments(new QWebEngineView(this))
#else
, m_web(new CWizDocumentWebView(app, this))
, m_commentWidget(new CWizLocalProgressWebView(app.mainWindow()))
#endif
, m_title(new TitleBar(app, this))
, m_passwordView(new CWizUserCipherForm(app, this))
, m_viewMode(app.userSettings().noteViewMode())
, m_transitionView(new CWizDocumentTransitionView(this))
, m_bLocked(false)
, m_bEditingMode(false)
, m_noteLoaded(false)
, m_editStatusSyncThread(new CWizDocumentEditStatusSyncThread(this))
//, m_editStatusCheckThread(new CWizDocumentStatusCheckThread(this))
, m_editStatus(0)
, m_sizeHint(QSize(200, 1))
{
m_title->setEditor(m_web);
QVBoxLayout* layoutDoc = new QVBoxLayout();
layoutDoc->setContentsMargins(0, 0, 0, 0);
layoutDoc->setSpacing(0);
m_docView = new QWidget(this);
m_docView->setLayout(layoutDoc);
m_tab = new QStackedWidget(this);
//
m_passwordView->setGeometry(this->geometry());
connect(m_passwordView, SIGNAL(cipherCheckRequest()), SLOT(onCipherCheckRequest()));
//
m_msgWidget = new QWidget(this);
QVBoxLayout* layoutMsg = new QVBoxLayout();
m_msgWidget->setLayout(layoutMsg);
m_msgLabel = new QLabel(m_msgWidget);
m_msgLabel->setAlignment(Qt::AlignCenter);
m_msgLabel->setWordWrap(true);
layoutMsg->addWidget(m_msgLabel);
//
m_tab->addWidget(m_docView);
m_tab->addWidget(m_passwordView);
m_tab->addWidget(m_msgWidget);
m_tab->setCurrentWidget(m_docView);
m_web->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_comments = m_commentWidget->web();
QWebPage *commentPage = new QWebPage(m_comments);
commentPage->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
m_comments->setPage(commentPage);
m_comments->history()->setMaximumItemCount(0);
m_comments->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
m_comments->settings()->globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
m_comments->settings()->globalSettings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true);
m_comments->page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
m_comments->setAcceptDrops(false);
connect(m_comments, SIGNAL(loadFinished(bool)), m_title, SLOT(onCommentPageLoaded(bool)));
connect(m_comments, SIGNAL(linkClicked(QUrl)), m_web, SLOT(onEditorLinkClicked(QUrl)));
connect(m_comments->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),
SLOT(on_comment_populateJavaScriptWindowObject()));
connect(m_commentWidget, SIGNAL(widgetStatusChanged()), SLOT(on_commentWidget_statusChanged()));
m_commentWidget->hide();
QWidget* wgtEditor = new QWidget(m_docView);
QVBoxLayout* layoutEditor = new QVBoxLayout(wgtEditor);
layoutEditor->setSpacing(0);
layoutEditor->setContentsMargins(0, 5, 0, 0);
layoutEditor->addWidget(m_title);
layoutEditor->addWidget(m_web);
layoutEditor->setStretchFactor(m_title, 0);
layoutEditor->setStretchFactor(m_web, 1);
m_splitter = new CWizSplitter(this);
m_splitter->addWidget(wgtEditor);
m_splitter->addWidget(m_commentWidget);
m_splitter->setOrientation(Qt::Horizontal);
layoutDoc->addWidget(m_splitter);
// layoutDoc->setStretchFactor(m_title, 0);
// layoutDoc->setStretchFactor(m_splitter, 1);
#ifdef USEWEBENGINE
QLineEdit *commandLine = new QLineEdit(this);
layoutDoc->addWidget(commandLine);
connect(commandLine, SIGNAL(returnPressed()), SLOT(on_command_request()));
#endif
QVBoxLayout* layoutMain = new QVBoxLayout(this);
layoutMain->setContentsMargins(0, 0, 0, 0);
setLayout(layoutMain);
layoutMain->addWidget(m_tab);
//
//.........这里部分代码省略.........