Skip to content

Commit

Permalink
Add log menu in application
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Nov 1, 2023
1 parent fb90ba9 commit 6d4ac2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
16 changes: 3 additions & 13 deletions App/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifdef RABBITCOMMON
#include "DlgAbout.h"
#include "FrmUpdater.h"
#include "FrmStyle.h"
#include "RabbitCommonTools.h"
#endif

MainWindow::MainWindow(QWidget *parent) :
Expand Down Expand Up @@ -76,17 +76,15 @@ MainWindow::MainWindow(QWidget *parent) :
pViewHeadposition->addAction(pHeadRight);

pViewMenu->addSeparator();
QAction* pActionStyle = pViewMenu->addAction(QIcon::fromTheme("style"),
tr("Style"),
this, SLOT(slotStyle()));
Q_UNUSED(pActionStyle);
pViewMenu->addAction(RabbitCommon::CTools::Instance()->AddStyleMenu(pViewMenu));

#ifdef RABBITCOMMON
QMenu* pHelp = menuBar()->addMenu(tr("Help"));
CFrmUpdater updater;
pHelp->addAction(updater.windowIcon(), tr("Update"),
this, SLOT(slotUpdate()));
pHelp->addAction(windowIcon(), tr("About"), this, SLOT(slotAbout()));
pHelp->addMenu(RabbitCommon::CTools::Instance()->GetLogMenu(this));
#endif

//m_pLunarCalendar->setLocale(QLocale("zh_CN"));
Expand Down Expand Up @@ -163,14 +161,6 @@ void MainWindow::slotUpdate()
#endif
}

void MainWindow::slotStyle()
{
#ifdef RABBITCOMMON
CFrmStyle* f = new CFrmStyle();
f->show();
#endif
}

void MainWindow::slotUpdateCalendar()
{
qDebug() << m_pLunarCalendar->SelectedLunar();
Expand Down
1 change: 0 additions & 1 deletion App/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ private Q_SLOTS:
void slotHeadpositionDown();
void slotHeadpositionLeft();
void slotHeadpositionRight();
void slotStyle();

private:
Ui::MainWindow *ui;
Expand Down
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- v0.2.8
+ [增加 2024 年节假日](https://www.gov.cn/zhengce/content/202310/content_6911527.htm)
+ 在应用程序中增加日志菜单

- v0.2.7
+ 修复 DockDebugLog 崩溃. 详见: [RabbitCommon](https://github.com/KangLin/RabbitCommon/commit/af2e434e39af35876113436ead2a946efcf74199)
Expand Down

0 comments on commit 6d4ac2b

Please sign in to comment.