亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bookcase.cpp

?? Bookcase 是一個用于KDE的個人的書籍管理。它使用XML文件存儲格式
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
  // initialize the recent file list  m_fileOpenRecent->loadEntries(m_config, QString::fromLatin1("Recent Files"));  QSize size = m_config->readSizeEntry("Geometry");  if(!size.isEmpty()) {    resize(size);  }  QValueList<int> splitList = m_config->readIntListEntry("Main Window Splitter Sizes");  if(!splitList.empty()) {    m_split->setSizes(splitList);  }  bool autoCapitals = m_config->readBoolEntry("Auto Capitalization", true);  BCAttribute::setAutoCapitalize(autoCapitals);  bool autoFormat = m_config->readBoolEntry("Auto Format", true);  BCAttribute::setAutoFormat(autoFormat);  bool showCount = m_config->readBoolEntry("Show Group Count", false);  m_groupView->showCount(showCount);  QStringList articles;  if(m_config->hasKey("Articles")) {    articles = m_config->readListEntry("Articles", ',');  } else {    articles = BCAttribute::defaultArticleList();  }  BCAttribute::setArticleList(articles);  QStringList suffixes;  if(m_config->hasKey("Name Suffixes")) {    suffixes = m_config->readListEntry("Name Suffixes", ',');  } else {    suffixes = BCAttribute::defaultSuffixList();  }  BCAttribute::setSuffixList(suffixes);  // TODO: fix iteration  BCCollectionListIterator collIt(m_doc->collectionList());  for( ; collIt.current(); ++collIt) {    BCCollection* coll = collIt.current();    m_config->setGroup(QString::fromLatin1("Options - %1").arg(coll->unitName()));    QString defaultGroup = coll->defaultGroupAttribute();    QString unitGroup = m_config->readEntry("Group By", defaultGroup);    m_groupView->setGroupAttribute(coll, unitGroup);    // make sure the right combo element is selected    updateCollectionToolBar();    QStringList colNames = m_config->readListEntry("ColumnNames");    if(colNames.isEmpty()) {      colNames = BookCollection::defaultViewAttributes();    }    m_detailedView->setColumns(coll, colNames);    m_detailedView->restoreLayout(m_config, QString::fromLatin1("Options - %1").arg(coll->unitName()));  }}void Bookcase::saveProperties(KConfig* cfg_) {  if(m_doc->URL().fileName() != i18n("Untitled") && !m_doc->isModified()) {    // saving to tempfile not necessary  } else {    KURL url = m_doc->URL();    cfg_->writeEntry("filename", url.url());    cfg_->writeEntry("modified", m_doc->isModified());    QString tempname = KURL::encode_string(kapp->tempSaveName(url.url()));    KURL tempurl(tempname);    m_doc->saveDocument(tempurl);  }}void Bookcase::readProperties(KConfig* cfg_) {  QString filename = cfg_->readEntry(QString::fromLatin1("filename"));  bool modified = cfg_->readBoolEntry(QString::fromLatin1("modified"), false);  if(modified) {    bool canRecover;    QString tempname = kapp->checkRecoverFile(filename, canRecover);    KURL tempurl(tempname);    if(canRecover) {      m_doc->openDocument(tempurl);      m_doc->setModified(true);      setCaption(tempurl.fileName(), true);      QFile::remove(tempname);    }  } else {    if(!filename.isEmpty()) {      KURL url(filename);      m_doc->openDocument(url);      setCaption(filename, false);    }  }}bool Bookcase::queryClose() {//  kdDebug() << "Bookcase::queryClose()" << endl;  return m_editWidget->queryModified() && m_doc->saveModified();}bool Bookcase::queryExit() {//  kdDebug() << "Bookcase::queryExit()" << endl;  saveOptions();  return true;}BookcaseDoc* Bookcase::doc() {  return m_doc;}BCUnitItem* Bookcase::selectedOrFirstItem() {  QListViewItem* item = m_detailedView->selectedItem();  if(!item) {    item = m_detailedView->firstChild();  }  return static_cast<BCUnitItem*>(item);}void Bookcase::slotFileNew() {  slotStatusMsg(i18n("Creating new document..."));  if(m_editWidget->queryModified() && m_doc->saveModified()) {    m_doc->newDocument();    slotEnableOpenedActions(false);    slotEnableModifiedActions(false);  }  slotStatusMsg(i18n("Ready."));}void Bookcase::slotFileOpen() {  slotStatusMsg(i18n("Opening file..."));  if(m_editWidget->queryModified() && m_doc->saveModified()) {    QString filter = i18n("*.bc|Bookcase files (*.bc)");    filter += QString::fromLatin1("\n");    filter += i18n("*.xml|XML files (*.xml)");    filter += QString::fromLatin1("\n");    filter += i18n("*|All files");    // keyword 'open'    KURL url = KFileDialog::getOpenURL(QString::fromLatin1(":open"), filter,                                       this, i18n("Open File..."));    if(!url.isEmpty()) {      slotFileOpen(url);    }  }  slotStatusMsg(i18n("Ready."));}void Bookcase::slotFileOpen(const KURL& url_) {  slotStatusMsg(i18n("Opening file..."));    if(m_editWidget->queryModified() && m_doc->saveModified()) {    bool success = openURL(url_);    if(success) {      m_fileOpenRecent->addURL(url_);    }  }  slotStatusMsg(i18n("Ready."));}void Bookcase::slotFileOpenRecent(const KURL& url_) {  slotStatusMsg(i18n("Opening file..."));  if(m_editWidget->queryModified() && m_doc->saveModified()) {    bool success = openURL(url_);    if(!success) {      m_fileOpenRecent->removeURL(url_);    }  }  slotStatusMsg(i18n("Ready."));}bool Bookcase::openURL(const KURL& url_) {  if(!m_editWidget->queryModified()) {    return false;  }//  kdDebug() <<  "Bookcase::openURL() - " << url_.url() << endl; // since a lot of updates will happen with a large file, disable them  m_detailedView->setUpdatesEnabled(false);  m_groupView->setUpdatesEnabled(false);  // disable sorting  m_detailedView->setSorting(-1);  m_groupView->setSorting(-1);  // try to open document  bool success = m_doc->openDocument(url_);  // re-enable updates  m_detailedView->setUpdatesEnabled(true);  m_groupView->setUpdatesEnabled(true);  // re-enable sorting  m_detailedView->setSorting(0, true);  m_groupView->setSorting(0, true);  if(success) {    slotEnableOpenedActions(true);    slotEnableModifiedActions(false);  }  return success;}void Bookcase::slotFileSave() {  if(!m_editWidget->queryModified()) {    return;  }  slotStatusMsg(i18n("Saving file..."));  if(m_doc->URL().fileName() == i18n("Untitled")) {    slotFileSaveAs();  } else {    m_doc->saveDocument(m_doc->URL());  }  m_fileSave->setEnabled(false);  setCaption(m_doc->URL().fileName(), false);  slotStatusMsg(i18n("Ready."));}void Bookcase::slotFileSaveAs() {  if(!m_editWidget->queryModified()) {    return;  }    if(m_doc->isEmpty()) {    return;  }  slotStatusMsg(i18n("Saving file with a new filename..."));  QString filter = i18n("*.bc|Bookcase files (*.bc)");  filter += QString::fromLatin1("\n");  filter += i18n("*.xml|XML files (*.xml)");  filter += QString::fromLatin1("\n");  filter += i18n("*|All files");  // keyword 'open'  KURL url = KFileDialog::getSaveURL(QString::fromLatin1(":open"), filter,                                     this, i18n("Save as..."));  if(!url.isEmpty()) {    m_doc->saveDocument(url);    m_fileOpenRecent->addURL(url);    setCaption(m_doc->URL().fileName(), false);  }  slotStatusMsg(i18n("Ready."));}void Bookcase::slotFilePrint() {  slotStatusMsg(i18n("Printing..."));  if(m_doc->isEmpty()) {    slotStatusMsg(i18n("Ready."));    return;  }  QString filename(QString::fromLatin1("bookcase-printing.xsl"));  QString xsltfile = KGlobal::dirs()->findResource("appdata", filename);  if(xsltfile.isNull()) {    FileError(filename);    return;  }  XSLTHandler handler(xsltfile);  m_config->setGroup("Printing");  bool printGrouped = m_config->readBoolEntry("Print Grouped", true);  QString sortby;  if(printGrouped) {   sortby = m_config->readEntry("Print Grouped Attribute", QString::fromLatin1("author"));   // make sure to add "bc" namespace   handler.addStringParam("sort-name", QString(QString::fromLatin1("bc:")+sortby).utf8());  } else {   // this is needed since the stylesheet has a default value   handler.addStringParam("sort-name", "");  }    handler.addStringParam("doc-url", m_doc->URL().fileName().utf8());  // TODO: fix for multiple collections  QString sortTitle = m_doc->collectionById(0)->attributeTitleByName(sortby).lower();  QString sortString = i18n("(sorted by %1)").arg(sortTitle);  handler.addStringParam("sort-title", sortString.utf8());  bool printHeaders = m_config->readBoolEntry("Print Field Headers", false);  if(printHeaders) {    handler.addParam("show-headers", "true()");  } else {    handler.addParam("show-headers", "false()");  }  QStringList printFields = m_config->readListEntry("Print Fields - book");  if(printFields.isEmpty()) {    //TODO fix me for other types    printFields = BookCollection::defaultPrintAttributes();  }  handler.addStringParam("column-names", printFields.join(QString::fromLatin1(" ")).utf8());    bool printFormatted = m_config->readBoolEntry("Print Formatted", true);  //TODO these two functions should really be rolled into one  QDomDocument dom;  if(printGrouped) {    // first parameter is what attribute to group by    // second parameter is whether to run the dom through BCAttribute::format    dom = m_doc->exportXML(sortby, printFormatted);  } else {    dom = m_doc->exportXML(printFormatted);  }  //  kdDebug() << dom.toString() << endl;    slotStatusMsg(i18n("Processing document..."));  QString html = handler.applyStylesheet(dom.toString());  if(html.isEmpty()) {    XSLTError();    slotStatusMsg(i18n("Ready."));    return;  }//  kdDebug() << html << endl;  slotStatusMsg(i18n("Printing..."));  doPrint(html);  slotStatusMsg(i18n("Ready."));}void Bookcase::slotFileQuit() {  slotStatusMsg(i18n("Exiting..."));  // this gets called in queryExit() anyway  //saveOptions();  close();  slotStatusMsg(i18n("Ready."));}void Bookcase::slotEditCut() {  slotStatusMsg(i18n("Cutting selection..."));  slotStatusMsg(i18n("Ready."));}void Bookcase::slotEditCopy() {  slotStatusMsg(i18n("Copying selection to clipboard..."));  slotStatusMsg(i18n("Ready."));}void Bookcase::slotEditPaste() {  slotStatusMsg(i18n("Inserting clipboard contents..."));  slotStatusMsg(i18n("Ready."));}void Bookcase::slotEditFind() {  if(!m_findDlg) {    m_findDlg = new FindDialog(this);    m_editFindNext->setEnabled(true);  }  m_findDlg->show();}void Bookcase::slotEditFindNext() {  if(m_doc->isEmpty()) {    return;  }    if(m_findDlg) {    m_findDlg->slotFindNext();  }}void Bookcase::slotToggleToolBar() {#if KDE_VERSION < 306  slotStatusMsg(i18n("Toggling toolbar..."));  if(m_toggleToolBar->isChecked()) {    toolBar("mainToolBar")->show();  } else {    toolBar("mainToolBar")->hide();  }  slotStatusMsg(i18n("Ready."));#endif}void Bookcase::slotToggleStatusBar() {  slotStatusMsg(i18n("Toggle the statusbar..."));  if(m_toggleStatusBar->isChecked()) {    statusBar()->show();  } else {    statusBar()->hide();  }  slotStatusMsg(i18n("Ready."));}void Bookcase::slotToggleCollectionBar() {#if KDE_VERSION < 306  slotStatusMsg(i18n("Toggling collection toolbar..."));  KToolBar* tb = toolBar("collectionToolBar");  if(m_toggleCollectionBar->isChecked()) {    tb->show();  } else {    tb->hide();  }  slotStatusMsg(i18n("Ready."));#endif}void Bookcase::slotShowConfigDialog() {  if(!m_configDlg) {    m_configDlg = new ConfigDialog(m_doc, this);    m_configDlg->readConfiguration(m_config);    connect(m_configDlg, SIGNAL(signalConfigChanged()),            SLOT(slotHandleConfigChange()));    connect(m_configDlg, SIGNAL(finished()),            SLOT(slotHideConfigDialog()));  } else {    KWin::setActiveWindow(m_configDlg->winId());

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产精品专区| www国产精品av| av亚洲精华国产精华精华 | 欧美日韩视频一区二区| 一本一道综合狠狠老| 色综合久久88色综合天天| 99在线视频精品| av中文字幕一区| 色综合久久天天| 欧美午夜精品电影| 欧美精品久久99| 欧美一区二区日韩| 久久一区二区三区国产精品| 欧美激情一区二区三区全黄| 中文字幕在线视频一区| 最新日韩av在线| 亚洲一区二区视频在线| 日韩中文字幕一区二区三区| 国内一区二区在线| va亚洲va日韩不卡在线观看| 色94色欧美sute亚洲线路一ni| 欧美视频一区在线| 日韩欧美一级二级| 欧美国产成人在线| 亚洲v日本v欧美v久久精品| 日韩国产一区二| 国产超碰在线一区| 欧洲另类一二三四区| 欧美一区二区视频免费观看| 久久久亚洲精华液精华液精华液 | 亚洲尤物视频在线| 美美哒免费高清在线观看视频一区二区| 久色婷婷小香蕉久久| 成人免费看黄yyy456| 在线播放国产精品二区一二区四区| 久久久综合网站| 亚洲尤物视频在线| 国产精品一色哟哟哟| 欧美性xxxxxx少妇| 日本一区二区三区四区在线视频| 亚洲一区二区三区视频在线播放| 免费观看成人av| 色婷婷国产精品| 久久精品这里都是精品| 亚洲chinese男男1069| 国产成人精品免费在线| 欧美精品色综合| 亚洲丝袜美腿综合| 国产成人高清视频| 精品剧情在线观看| 亚洲激情中文1区| 不卡电影免费在线播放一区| 欧美成人福利视频| 日韩不卡一二三区| 欧美中文字幕不卡| 亚洲人亚洲人成电影网站色| 国产精品系列在线观看| 欧美精品一卡两卡| 亚洲一区二区欧美日韩| 91麻豆成人久久精品二区三区| 日韩欧美综合一区| 日韩成人精品在线观看| 欧美色手机在线观看| 亚洲女人的天堂| 99久久精品国产精品久久| 久久亚洲春色中文字幕久久久| 日韩影院在线观看| 欧美日韩高清在线播放| 亚洲国产精品麻豆| 欧美性做爰猛烈叫床潮| 夜色激情一区二区| 色婷婷综合久久久久中文一区二区 | 蜜桃av一区二区三区电影| 色成人在线视频| 一区二区三区日本| 色综合久久久久久久| 亚洲精品视频免费看| 97久久人人超碰| 亚洲自拍偷拍综合| 欧美卡1卡2卡| 久久精品国产精品亚洲红杏| 精品久久久久一区二区国产| 韩国一区二区视频| 国产精品女主播在线观看| 不卡av在线免费观看| 亚洲欧美激情视频在线观看一区二区三区| 顶级嫩模精品视频在线看| 国产精品国产自产拍在线| 91麻豆成人久久精品二区三区| 亚洲综合图片区| 欧美一区二区三区免费观看视频 | 亚洲va国产天堂va久久en| 精品视频一区二区三区免费| 日韩精品久久久久久| 精品少妇一区二区三区在线视频| 国产一区二区三区最好精华液| 久久综合999| jvid福利写真一区二区三区| 一区二区三区在线播放| 欧美精品日韩精品| 国产一区二区伦理| 中文字幕综合网| 欧美一区二区三区四区在线观看| 国产酒店精品激情| 亚洲综合图片区| 久久久久久夜精品精品免费| 91在线视频18| 久久超碰97中文字幕| 亚洲色图制服诱惑| 精品奇米国产一区二区三区| 97久久超碰国产精品电影| 秋霞影院一区二区| 亚洲欧美日韩在线不卡| 精品日本一线二线三线不卡| 日本精品一级二级| 国产成人免费av在线| 婷婷国产在线综合| 国产精品久久久久久久久免费樱桃 | 婷婷夜色潮精品综合在线| 久久久久久久久久久久久夜| 精品视频在线看| 不卡一卡二卡三乱码免费网站| 日韩成人午夜电影| 亚洲视频免费在线| 2024国产精品| 5566中文字幕一区二区电影| aaa欧美大片| 国产一区二区三区最好精华液| 亚洲大型综合色站| 亚洲视频狠狠干| 国产日韩欧美精品一区| 91精品国产综合久久精品app| av在线一区二区| 成人av资源在线| 国产电影一区二区三区| 九九九久久久精品| 免费看欧美女人艹b| 亚洲国产精品久久久久秋霞影院 | 日韩1区2区3区| 亚洲影视在线播放| 亚洲人午夜精品天堂一二香蕉| 久久综合视频网| 日韩欧美综合在线| 日韩一级二级三级精品视频| 欧美日韩免费观看一区三区| 色老综合老女人久久久| 99精品桃花视频在线观看| 成人天堂资源www在线| 国产原创一区二区三区| 国产精一区二区三区| 男男成人高潮片免费网站| 日本麻豆一区二区三区视频| 亚洲国产一区二区三区| 亚洲国产中文字幕在线视频综合| 一二三区精品视频| 亚洲一二三四久久| 亚洲亚洲精品在线观看| 日韩有码一区二区三区| 欧美aaaaa成人免费观看视频| 日韩av网站在线观看| 久久精品72免费观看| 极品尤物av久久免费看| 国产成人精品综合在线观看| 成人h版在线观看| 在线观看日产精品| 日韩一区二区三区免费看 | 国产精品自拍网站| 高清av一区二区| 一本久久a久久精品亚洲| 色综合av在线| 欧美日韩成人一区| 欧美mv日韩mv国产网站app| 久久久久成人黄色影片| 日本一区免费视频| 亚洲一区二区三区小说| 免费成人在线影院| 国产成人精品免费视频网站| 91免费精品国自产拍在线不卡| 欧美日韩中文一区| 国产日韩三级在线| 亚洲午夜一二三区视频| 国产美女精品人人做人人爽| 成人app网站| 91精品麻豆日日躁夜夜躁| 国产欧美日韩精品一区| 亚洲毛片av在线| 久久电影网站中文字幕| 国产揄拍国内精品对白| 色婷婷激情一区二区三区| 日韩一区二区高清| 国产精品美女www爽爽爽| 亚洲成人动漫av| 粉嫩一区二区三区在线看| 91国内精品野花午夜精品| 精品国产髙清在线看国产毛片| 亚洲另类在线一区| 国产成人99久久亚洲综合精品| 在线播放/欧美激情| 亚洲免费在线视频| 美女视频黄久久|