本文整理汇总了C++中CWizExplorerApp类的典型用法代码示例。如果您正苦于以下问题:C++ CWizExplorerApp类的具体用法?C++ CWizExplorerApp怎么用?C++ CWizExplorerApp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CWizExplorerApp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}
示例6: 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;
}
示例7: QObject
CWizDocumentWebViewWorkerPool::CWizDocumentWebViewWorkerPool(CWizExplorerApp& app, QObject* parent)
: m_dbMgr(app.databaseManager())
, QObject(parent)
{
m_timer.setInterval(100);
connect(&m_timer, SIGNAL(timeout()), SLOT(on_timer_timeout()));
}
示例8: 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()));
}
示例9: QWidget
CWizTagBar::CWizTagBar(CWizExplorerApp& app, QWidget *parent)
: QWidget(parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
, m_tagList(nullptr)
{
int nHeight = Utils::StyleHelper::tagBarHeight();
setFixedHeight(nHeight);
// setStyleSheet("font-size: 11px; color: #646464;");
setContentsMargins(8, 0, 0, 0);
setFocusPolicy(Qt::ClickFocus);
QPalette pl = palette();
pl.setColor(QPalette::Window, QColor("#f7f8f9"));
// pl.setBrush(QPalette::Window, QColor("#f7f8f9"));
setPalette(pl);
setAutoFillBackground(true);
//
QHBoxLayout* hLayout = new QHBoxLayout(this);
hLayout->setContentsMargins(0, 0, 0, 0);
m_label = new QLabel(tr("Tag"), this);
hLayout->addWidget(m_label);
m_btnAdd = new QToolButton(this);
hLayout->addWidget(m_btnAdd);
m_tagWidget = new QWidget(this);
hLayout->addWidget(m_tagWidget);
m_btnMore = new QToolButton(this);
hLayout->addWidget(m_btnMore);
m_btnMore->setVisible(false);
m_lineEdit = new QLineEdit(this);
hLayout->addWidget(m_lineEdit);
hLayout->addStretch();
//
m_tagLayout = new QHBoxLayout(m_tagWidget);
m_tagLayout->setContentsMargins(0, 0, 0, 0);
applyStyleSheet();
connect(m_lineEdit, SIGNAL(returnPressed()), SLOT(on_lineEditReturnPressed()));
connect(m_lineEdit, SIGNAL(textChanged(QString)), SLOT(on_lineEditTextChanged(QString)));
connect(m_btnMore, SIGNAL(clicked()), SLOT(on_buttonMoreClicked()));
connect(m_btnAdd, SIGNAL(clicked()), SLOT(on_buttonAddClicked()));
//
connect(&m_dbMgr, SIGNAL(tagCreated(WIZTAGDATA)),
SLOT(on_tagCreated(WIZTAGDATA)));
connect(&m_dbMgr, SIGNAL(tagModified(WIZTAGDATA,WIZTAGDATA)),
SLOT(on_tagModified(WIZTAGDATA,WIZTAGDATA)));
connect(&m_dbMgr, SIGNAL(tagDeleted(WIZTAGDATA)),
SLOT(on_tagDeleted(WIZTAGDATA)));
connect(&m_dbMgr, SIGNAL(documentTagModified(WIZDOCUMENTDATA)),
SLOT(on_documentTagModified(WIZDOCUMENTDATA)));
}
示例10: QWidget
CWizDocumentSelectionView::CWizDocumentSelectionView(CWizExplorerApp& app, QWidget *parent)
: m_app(app)
, m_dbMgr(app.databaseManager())
, QWidget(parent)
{
MainWindow* mainWindow = qobject_cast<MainWindow*>(app.mainWindow());
CWizDocumentListView* listView = qobject_cast<CWizDocumentListView*>(mainWindow->DocumentsCtrl());
m_thumbCache = listView->thumbCache();
connect(m_thumbCache, SIGNAL(loaded(const WIZABSTRACT&)), SLOT(on_thumbCache_loaded(const WIZABSTRACT&)));
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
QGraphicsScene* scene = new QGraphicsScene(this);
scene->setItemIndexMethod(QGraphicsScene::NoIndex);
//scene->setSceneRect(-100, -100, 500, 500);
m_graphicsView = new QGraphicsView(scene, this);
m_graphicsView->setBackgroundBrush(WizGetLeftViewBrush());
m_graphicsView->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
layout->addWidget(m_graphicsView);
}
示例11: QWebView
CWizDocumentWebView::CWizDocumentWebView(CWizExplorerApp& app, QWidget* parent)
: QWebView(parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
, m_bEditorInited(false)
, m_bNewNote(false)
, m_bNewNoteTitleInited(false)
, m_noteFrame(0)
, m_bCurrentEditing(false)
, m_bContentsChanged(false)
{
CWizDocumentWebViewPage* page = new CWizDocumentWebViewPage(this);
setPage(page);
#ifdef QT_DEBUG
settings()->globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
#endif
connect(page, SIGNAL(actionTriggered(QWebPage::WebAction)), SLOT(onActionTriggered(QWebPage::WebAction)));
// minimum page size hint
setMinimumSize(400, 250);
// only accept focus by mouse click as the best way to trigger toolbar reset
setFocusPolicy(Qt::ClickFocus);
setAttribute(Qt::WA_AcceptTouchEvents, false);
// FIXME: should accept drop picture, attachment, link etc.
setAcceptDrops(true);
// refers
MainWindow* mainWindow = qobject_cast<MainWindow *>(m_app.mainWindow());
m_transitionView = mainWindow->transitionView();
m_docLoadThread = new CWizDocumentWebViewLoaderThread(m_dbMgr);
connect(m_docLoadThread, SIGNAL(loaded(const QString&, const QString, const QString)),
SLOT(onDocumentReady(const QString&, const QString, const QString)), Qt::QueuedConnection);
//
m_docSaverThread = new CWizDocumentWebViewSaverThread(m_dbMgr);
connect(m_docSaverThread, SIGNAL(saved(const QString, const QString,bool)),
SLOT(onDocumentSaved(const QString, const QString,bool)), Qt::QueuedConnection);
// loading and saving thread
m_timerAutoSave.setInterval(5*60*1000); // 5 minutes
connect(&m_timerAutoSave, SIGNAL(timeout()), SLOT(onTimerAutoSaveTimout()));
}
示例12: QTreeWidget
CWizFolderView::CWizFolderView(CWizExplorerApp& app, QWidget *parent)
: QTreeWidget(parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
{
header()->hide();
setAnimated(true);
setAttribute(Qt::WA_MacShowFocusRect, false);
setStyle(::WizGetStyle(m_app.userSettings().skin()));
// use custom scrollbar
setVerticalScrollMode(QAbstractItemView::ScrollPerItem);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_vScroll = new CWizScrollBar(this);
m_vScroll->syncWith(verticalScrollBar());
initFolders();
}
示例13: QTreeWidget
CWizCategoryBaseView::CWizCategoryBaseView(CWizExplorerApp& app, QWidget* parent)
: QTreeWidget(parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
, m_bDragHovered(false)
{
header()->hide();
setFrameStyle(QFrame::NoFrame);
setAttribute(Qt::WA_MacShowFocusRect, false);
setAutoFillBackground(true);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setTextElideMode(Qt::ElideMiddle);
setIndentation(12);
QPalette pal = palette();
pal.setColor(QPalette::Base, WizGetCategoryBackroundColor(m_app.userSettings().skin()));
setPalette(pal);
setStyle(::WizGetStyle(m_app.userSettings().skin()));
}
示例14: CWizMultiLineListWidget
CWizAttachmentListView::CWizAttachmentListView(CWizExplorerApp& app, QWidget* parent)
: CWizMultiLineListWidget(2, parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
{
setFrameStyle(QFrame::NoFrame);
setStyle(WizGetStyle(m_app.userSettings().skin()));
setSelectionMode(QAbstractItemView::ExtendedSelection);
setAttribute(Qt::WA_MacShowFocusRect, false);
QPalette pal;
#ifdef Q_OS_LINUX
pal.setBrush(QPalette::Base, QBrush("#D7D7D7"));
#elif defined(Q_OS_MAC)
pal.setBrush(QPalette::Base, QBrush("#F7F7F7"));
#endif
setPalette(pal);
//QVBoxLayout* layout = new QVBoxLayout();
//setStyleSheet("background-color: #F7F7F7");
connect(this, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
SLOT(on_list_itemDoubleClicked(QListWidgetItem*)));
MainWindow* mainWindow = qobject_cast<MainWindow *>(m_app.mainWindow());
m_downloaderHost = mainWindow->downloaderHost();
//connect(m_downloaderHost, SIGNAL(downloadDone(const WIZOBJECTDATA&, bool)),
// SLOT(on_download_finished(const WIZOBJECTDATA&, bool)));
// setup context menu
m_menu = new QMenu(this);
m_menu->addAction(WIZACTION_ATTACHMENT_ADD, this, SLOT(on_action_addAttachment()));
m_menu->addSeparator();
m_menu->addAction(WIZACTION_ATTACHMENT_SAVEAS, this, SLOT(on_action_saveAttachmentAs()));
m_menu->addAction(WIZACTION_ATTACHMENT_OPEN, this, SLOT(on_action_openAttachment()));
m_menu->addSeparator();
m_menu->addAction(WIZACTION_ATTACHMENT_DELETE, this, SLOT(on_action_deleteAttachment()));
}
示例15: CWizMultiLineListWidget
CWizAttachmentListView::CWizAttachmentListView(CWizExplorerApp& app, QWidget* parent)
: CWizMultiLineListWidget(2, parent)
, m_app(app)
, m_dbMgr(app.databaseManager())
{
setFrameStyle(QFrame::NoFrame);
setStyle(WizGetStyle(m_app.userSettings().skin()));
setSelectionMode(QAbstractItemView::ExtendedSelection);
setAttribute(Qt::WA_MacShowFocusRect, false);
MainWindow* mainWindow = qobject_cast<MainWindow *>(m_app.mainWindow());
m_downloadDialog = mainWindow->objectDownloadDialog();
connect(this, SIGNAL(itemDoubleClicked(QListWidgetItem*)), SLOT(on_list_itemDoubleClicked(QListWidgetItem*)));
// setup context menu
m_menu = new QMenu(this);
m_menu->addAction(WIZACTION_ATTACHMENT_ADD, this, SLOT(on_action_addAttachment()));
m_menu->addSeparator();
m_menu->addAction(WIZACTION_ATTACHMENT_SAVEAS, this, SLOT(on_action_saveAttachmentAs()));
m_menu->addAction(WIZACTION_ATTACHMENT_OPEN, this, SLOT(on_action_openAttachment()));
m_menu->addSeparator();
m_menu->addAction(WIZACTION_ATTACHMENT_DELETE, this, SLOT(on_action_deleteAttachment()));
}