chengxr 1 ano atrás
pai
commit
6c4baf63b9
100 arquivos alterados com 717 adições e 104 exclusões
  1. 103 0
      .clang-format
  2. 4 2
      QFD/QFD.pro
  3. 10 9
      QFD/main.cpp
  4. 14 0
      QFD/pages/AboutView.cpp
  5. 17 0
      QFD/pages/AboutView.h
  6. 0 10
      QFD/pages/Login.cpp
  7. 0 11
      QFD/pages/Login.h
  8. 18 0
      QFD/pages/LoginView.cpp
  9. 17 0
      QFD/pages/LoginView.h
  10. 137 49
      QFD/pages/MainWindow.cpp
  11. 45 23
      QFD/pages/MainWindow.h
  12. 352 0
      QFD/resource.qrc
  13. BIN
      QFD/resource/MainIco.png
  14. BIN
      QFD/resource/Round.png
  15. BIN
      QFD/resource/Rounded_Rectangle.png
  16. BIN
      QFD/resource/about.ico
  17. BIN
      QFD/resource/add.png
  18. BIN
      QFD/resource/add_expert.png
  19. BIN
      QFD/resource/app.png
  20. BIN
      QFD/resource/arrow-left.png
  21. BIN
      QFD/resource/arrow-right.png
  22. BIN
      QFD/resource/arrow0.png
  23. BIN
      QFD/resource/arrow1.png
  24. BIN
      QFD/resource/arrow2.png
  25. BIN
      QFD/resource/arrow3.png
  26. BIN
      QFD/resource/background/1.jpg
  27. BIN
      QFD/resource/background/10.jpg
  28. BIN
      QFD/resource/background/2.jpg
  29. BIN
      QFD/resource/background/3.jpg
  30. BIN
      QFD/resource/background/4.jpg
  31. BIN
      QFD/resource/background/5.jpg
  32. BIN
      QFD/resource/background/6.jpg
  33. BIN
      QFD/resource/background/7.jpg
  34. BIN
      QFD/resource/background/8.jpg
  35. BIN
      QFD/resource/background/9.jpg
  36. BIN
      QFD/resource/background/login.jpg
  37. BIN
      QFD/resource/clear.png
  38. BIN
      QFD/resource/createproj.png
  39. BIN
      QFD/resource/daochu.png
  40. BIN
      QFD/resource/daoru.png
  41. BIN
      QFD/resource/delete.png
  42. BIN
      QFD/resource/detect_type.png
  43. BIN
      QFD/resource/diamond.png
  44. BIN
      QFD/resource/eval_type.png
  45. BIN
      QFD/resource/excel.png
  46. BIN
      QFD/resource/expert.png
  47. BIN
      QFD/resource/expert_config.png
  48. BIN
      QFD/resource/expert_import.png
  49. BIN
      QFD/resource/file_add.png
  50. BIN
      QFD/resource/file_delete.png
  51. BIN
      QFD/resource/file_open.png
  52. BIN
      QFD/resource/file_save.png
  53. BIN
      QFD/resource/find.png
  54. BIN
      QFD/resource/finger_indicate.png
  55. BIN
      QFD/resource/flag.png
  56. BIN
      QFD/resource/flags/1.png
  57. BIN
      QFD/resource/flags/10.png
  58. BIN
      QFD/resource/flags/11.png
  59. BIN
      QFD/resource/flags/12.png
  60. BIN
      QFD/resource/flags/13.png
  61. BIN
      QFD/resource/flags/14.png
  62. BIN
      QFD/resource/flags/15.png
  63. BIN
      QFD/resource/flags/16.png
  64. BIN
      QFD/resource/flags/17.png
  65. BIN
      QFD/resource/flags/18.png
  66. BIN
      QFD/resource/flags/19.png
  67. BIN
      QFD/resource/flags/2.png
  68. BIN
      QFD/resource/flags/3.png
  69. BIN
      QFD/resource/flags/4.png
  70. BIN
      QFD/resource/flags/5.png
  71. BIN
      QFD/resource/flags/6.png
  72. BIN
      QFD/resource/flags/7.png
  73. BIN
      QFD/resource/flags/8.png
  74. BIN
      QFD/resource/flags/9.png
  75. BIN
      QFD/resource/home_close.png
  76. BIN
      QFD/resource/home_open.png
  77. BIN
      QFD/resource/icons/cil-3d.png
  78. BIN
      QFD/resource/icons/cil-4k.png
  79. BIN
      QFD/resource/icons/cil-account-logout.png
  80. BIN
      QFD/resource/icons/cil-action-redo.png
  81. BIN
      QFD/resource/icons/cil-action-undo.png
  82. BIN
      QFD/resource/icons/cil-airplane-mode-off.png
  83. BIN
      QFD/resource/icons/cil-airplane-mode.png
  84. BIN
      QFD/resource/icons/cil-alarm.png
  85. BIN
      QFD/resource/icons/cil-align-center.png
  86. BIN
      QFD/resource/icons/cil-align-left.png
  87. BIN
      QFD/resource/icons/cil-align-right.png
  88. BIN
      QFD/resource/icons/cil-arrow-bottom-2.png
  89. BIN
      QFD/resource/icons/cil-arrow-bottom.png
  90. BIN
      QFD/resource/icons/cil-arrow-circle-bottom.png
  91. BIN
      QFD/resource/icons/cil-arrow-circle-left.png
  92. BIN
      QFD/resource/icons/cil-arrow-circle-right.png
  93. BIN
      QFD/resource/icons/cil-arrow-circle-top.png
  94. BIN
      QFD/resource/icons/cil-arrow-left.png
  95. BIN
      QFD/resource/icons/cil-arrow-right.png
  96. BIN
      QFD/resource/icons/cil-arrow-top.png
  97. BIN
      QFD/resource/icons/cil-at.png
  98. BIN
      QFD/resource/icons/cil-av-timer.png
  99. BIN
      QFD/resource/icons/cil-ban.png
  100. BIN
      QFD/resource/icons/cil-battery-0.png

+ 103 - 0
.clang-format

@@ -0,0 +1,103 @@
+# Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
+#
+# You may use this file under the terms of the 3-clause BSD license.
+# See the file LICENSE from this package for details.
+
+# This is the clang-format configuration style to be used by Qt,
+# based on the rules from https://wiki.qt.io/Qt_Coding_Style and
+# https://wiki.qt.io/Coding_Conventions
+
+---
+# Webkit style was loosely based on the Qt style
+BasedOnStyle: WebKit
+
+Standard: Cpp11
+
+# Column width is limited to 100 in accordance with Qt Coding Style.
+# https://wiki.qt.io/Qt_Coding_Style
+# Note that this may be changed at some point in the future.
+ColumnLimit: 120
+# How much weight do extra characters after the line length limit have.
+# PenaltyExcessCharacter: 4
+
+# Disable reflow of qdoc comments: indentation rules are different.
+# Translation comments are also excluded.
+CommentPragmas: "^!|^:"
+
+# We want a space between the type and the star for pointer types.
+PointerBindsToType: false
+#指针的*的挨着哪边
+#PointerAlignment: Right
+
+# We use template< without space.
+SpaceAfterTemplateKeyword: false
+
+# We want to break before the operators, but not before a '='.
+BreakBeforeBinaryOperators: NonAssignment
+
+# Braces are usually attached, but not after functions or class declarations.
+BreakBeforeBraces: Custom
+BraceWrapping:
+    AfterClass: true
+    AfterControlStatement: false
+    AfterEnum: true
+    AfterFunction: true
+    AfterNamespace: false
+    AfterObjCDeclaration: false
+    AfterStruct: true
+    AfterUnion: false
+    BeforeCatch: false
+    BeforeElse: false
+    IndentBraces: false
+
+# When constructor initializers do not fit on one line, put them each on a new line.
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+# Indent initializers by 4 spaces
+ConstructorInitializerIndentWidth: 4
+
+# Indent width for line continuations.
+ContinuationIndentWidth: 8
+
+# No indentation for namespaces.
+NamespaceIndentation: None
+
+# Allow indentation for preprocessing directives (if/ifdef/endif). https://reviews.llvm.org/rL312125
+IndentPPDirectives: AfterHash
+
+# Horizontally align arguments after an open bracket.
+# The coding style does not specify the following, but this is what gives
+# results closest to the existing code.
+AlignAfterOpenBracket: true
+AlwaysBreakTemplateDeclarations: true
+
+# Ideally we should also allow less short function in a single line, but
+# clang-format does not handle that.
+AllowShortFunctionsOnASingleLine: Inline
+
+# The coding style specifies some include order categories, but also tells to
+# separate categories with an empty line. It does not specify the order within
+# the categories. Since the SortInclude feature of clang-format does not
+# re-order includes separated by empty lines, the feature is not used.
+SortIncludes: false
+
+# macros for which the opening brace stays attached.
+ForEachMacros:   [ for, foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
+
+# Break constructor initializers before the colon and after the commas.
+BreakConstructorInitializers: BeforeColon
+
+# 连续赋值时,对齐所有等号
+AlignConsecutiveAssignments:    true
+# 连续声明时,对齐所有声明的变量名
+AlignConsecutiveDeclarations:   false
+# 支持一行的if
+#AllowShortIfStatementsOnASingleLine: true
+# 注释对齐
+AlignTrailingComments: true
+FixNamespaceComments: true
+# 在尾随的注释前添加的空格数(只适用于//)
+SpacesBeforeTrailingComments: 2
+# false表示函数实参要么都在同一行,要么都各自一行
+#BinPackArguments:	true
+# false表示所有形参要么都在同一行,要么都各自一行
+#BinPackParameters:	true

+ 4 - 2
QFD/QFD.pro

@@ -61,11 +61,13 @@ INCLUDEPATH += $$PWD/common
 
 SOURCES += \
     main.cpp \
-    pages/Login.cpp \
+    pages/AboutView.cpp \
+    pages/LoginView.cpp \
     pages/MainWindow.cpp
 
 HEADERS += \
-    pages/Login.h \
+    pages/AboutView.h \
+    pages/LoginView.h \
     pages/MainWindow.h
 
 # Default rules for deployment.

+ 10 - 9
QFD/main.cpp

@@ -1,18 +1,19 @@
-#include "Login.h"
+#include "LoginView.h"
 #include "MainWindow.h"
 
 #include <QApplication>
 
-int main(int argc, char *argv[]) {
-  QApplication a(argc, argv);
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
 
-  //  Login l;
-  //  l.show();
+    //  Login l;
+    //  l.show();
 
-  MainWindow m;
-  m.show();
+    MainWindow m;
+    m.show();
 
-  Q_INIT_RESOURCE(qfluentwidgets);
+    Q_INIT_RESOURCE(qfluentwidgets);
 
-  return a.exec();
+    return a.exec();
 }

+ 14 - 0
QFD/pages/AboutView.cpp

@@ -0,0 +1,14 @@
+#include "AboutView.h"
+
+#include <QPainter>
+
+AboutView::AboutView(QWidget *parent) : QWidget(parent) { }
+
+void AboutView::paintEvent(QPaintEvent *event)
+{
+    QWidget::paintEvent(event);
+    QPainter painter(this);
+    QPixmap pixmap(":/resource/background/login.jpg");
+    painter.drawPixmap(0, 0,
+                       pixmap.scaled(width(), height(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation));
+}

+ 17 - 0
QFD/pages/AboutView.h

@@ -0,0 +1,17 @@
+#ifndef ABOUTVIEW_H
+#define ABOUTVIEW_H
+
+#include <QWidget>
+
+class AboutView : public QWidget
+{
+    Q_OBJECT
+public:
+    explicit AboutView(QWidget *parent = nullptr);
+
+    void paintEvent(QPaintEvent *event) override;
+
+signals:
+};
+
+#endif  // ABOUTVIEW_H

+ 0 - 10
QFD/pages/Login.cpp

@@ -1,10 +0,0 @@
-#include "Login.h"
-
-Login::Login() {
-  Qt::WindowFlags flags = Qt::Dialog | Qt::FramelessWindowHint;
-  this->setWindowFlags(flags);
-  this->setAttribute(Qt::WA_AlwaysShowToolTips);
-  this->setFocusPolicy(Qt::StrongFocus);
-
-  this->setWindowTitle("登录界面");
-}

+ 0 - 11
QFD/pages/Login.h

@@ -1,11 +0,0 @@
-#ifndef LOGIN_H
-#define LOGIN_H
-
-#include <QDialog>
-
-class Login : public QDialog {
-public:
-  Login();
-};
-
-#endif // LOGIN_H

+ 18 - 0
QFD/pages/LoginView.cpp

@@ -0,0 +1,18 @@
+#include "LoginView.h"
+
+#include <QPushButton>
+#include <QHBoxLayout>
+
+#include <QPainter>
+#include <QLabel>
+
+LoginView::LoginView(QWidget *parent) : QWidget(parent) { }
+
+void LoginView::paintEvent(QPaintEvent *event)
+{
+    QWidget::paintEvent(event);
+    QPainter painter(this);
+    QPixmap pixmap(":/resource/background/1.jpg");
+    painter.drawPixmap(0, 0,
+                       pixmap.scaled(width(), height(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation));
+}

+ 17 - 0
QFD/pages/LoginView.h

@@ -0,0 +1,17 @@
+#ifndef LOGINVIEW_H
+#define LOGINVIEW_H
+
+#include <QWidget>
+
+class LoginView : public QWidget
+{
+    Q_OBJECT
+public:
+    explicit LoginView(QWidget *parent = nullptr);
+
+    void paintEvent(QPaintEvent *event) override;
+
+signals:
+};
+
+#endif  // LOGINVIEW_H

+ 137 - 49
QFD/pages/MainWindow.cpp

@@ -1,5 +1,8 @@
 #include "MainWindow.h"
 
+#include "LoginView.h"
+#include "AboutView.h"
+
 #include <DateTime/DatePicker.h>
 #include <QFramelessWindow.h>
 #include <TitleBar.h>
@@ -9,79 +12,164 @@
 
 #include <QDebug>
 
-StackedWidget::StackedWidget(QWidget *parent) : QFrame(parent) {
-  m_hBoxLayout = new QHBoxLayout(this);
-  m_view = new PopUpAniStackedWidget(this);
+StackedWidget::StackedWidget(QWidget *parent) : QFrame(parent)
+{
+    m_hBoxLayout = new QHBoxLayout(this);
+    m_view       = new PopUpAniStackedWidget(this);
+
+    m_hBoxLayout->setContentsMargins(0, 0, 0, 0);
+    m_hBoxLayout->addWidget(m_view);
 
-  m_hBoxLayout->setContentsMargins(0, 0, 0, 0);
-  m_hBoxLayout->addWidget(m_view);
+    connect(m_view, &PopUpAniStackedWidget::currentChanged, this, [this](int index) {
+        qDebug() << __FUNCTION__ << __LINE__;
+        emit currentWidgetChanged(m_view->widget(index));
+    });
 
-  connect(
-      m_view, &PopUpAniStackedWidget::currentChanged, this,
-      [this](int index) { emit currentWidgetChanged(m_view->widget(index)); });
+    setStyleSheet("background-color: rgb(0,222,222);");
 }
 
-void StackedWidget::addWidget(QWidget *widget) { m_view->addWidget(widget); }
+void StackedWidget::addWidget(QWidget *widget)
+{
+    m_view->addWidget(widget);
+}
 
 ///
 /// @todo widget.verticalScrollBar().setValue(0)
 ///
-void StackedWidget::setCurrentWidget(QWidget *widget, bool popOut) {
-  if (popOut) {
-    m_view->setCurrentWidget(widget, true, false, 200, QEasingCurve::InQuad);
-  } else {
-    m_view->setCurrentWidget(widget, false, true, 300);
-  }
+void StackedWidget::setCurrentWidget(QWidget *widget, bool popOut)
+{
+    if (popOut) {
+        qDebug() << __FUNCTION__ << __LINE__;
+        m_view->setCurrentWidget(widget, true, false, 200, QEasingCurve::InQuad);
+    } else {
+        qDebug() << __FUNCTION__ << __LINE__;
+        m_view->setCurrentWidget(widget, false, true, 300);
+    }
+}
+
+void StackedWidget::setCurrentIndex(int index, bool popOut)
+{
+    qDebug() << __FUNCTION__ << __LINE__;
+    setCurrentWidget(m_view->widget(index), popOut);
+}
+
+PopUpAniStackedWidget *StackedWidget::view() const
+{
+    return m_view;
+}
+
+MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
+{
+    initialize();
+    initWindow();
+    initLayout();
+    initNavigation();
+    connectSignalsAndSlots();
+}
+
+MainWindow::~MainWindow() { }
+
+void MainWindow::initialize()
+{
+    m_titleBar      = new StandardTitleBar(this);
+    m_widgetLayout  = new QHBoxLayout();
+    m_stackWidget   = new StackedWidget(this);
+    m_naviInterface = new NavigationInterface(true, true, this);
+
+    m_loginView = new LoginView(this);
+    m_aboutView = new AboutView(this);
 }
 
-void StackedWidget::setCurrentIndex(int index, bool popOut) {
-  setCurrentWidget(m_view->widget(index), popOut);
+void MainWindow::initWindow()
+{
+    setMinimumSize(QSize(800, 600));
+
+    QFramelessHelper *helper = new QFramelessHelper(this);
+    helper->setTitleBar(m_titleBar);
+
+    QWidget *w   = new QWidget();
+    m_hBoxLayout = new QHBoxLayout(w);
+    setCentralWidget(w);
+
+    m_titleBar->setGeometry(QRect(titleBarIndent(), 0, width() - titleBarIndent(), m_titleBar->height()));
+    setWindowTitle("专家评定数据分析软件");
+
+    QIcon icon = QIcon(":/resource/logo.png");
+    m_titleBar->setIcon(icon);
+    setWindowIcon(icon);
 }
 
-PopUpAniStackedWidget *StackedWidget::view() const { return m_view; }
+void MainWindow::initLayout()
+{
+    m_hBoxLayout->setSpacing(0);
+    m_hBoxLayout->setContentsMargins(0, 0, 0, 0);
+    m_hBoxLayout->addWidget(m_naviInterface);
+    m_hBoxLayout->addLayout(m_widgetLayout);
+    m_hBoxLayout->setStretchFactor(m_widgetLayout, 1);
 
-MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
-  initWindow();
-  initLayout();
+    m_widgetLayout->addWidget(m_stackWidget);
+    m_widgetLayout->setContentsMargins(0, 32, 0, 0);
 }
 
-MainWindow::~MainWindow() {}
+void MainWindow::initNavigation()
+{
+    m_naviInterface->addSeparator();
+
+    m_loginView->setObjectName("loginView");
+    m_stackWidget->addWidget(m_loginView);
+    m_naviInterface->addItem(m_loginView->objectName(), NEWFLICON(FluentIcon, HEART), "Login", this,
+                             SLOT(loginViewClicked()), true, NavigationItemPosition::BOTTOM);
 
-void MainWindow::initWindow() {
+    m_aboutView->setObjectName("aboutView");
+    m_stackWidget->addWidget(m_aboutView);
+    m_naviInterface->addItem(m_aboutView->objectName(), NEWFLICON(FluentIcon, INFO), "About", this,
+                             SLOT(aboutViewClicked()), true, NavigationItemPosition::BOTTOM);
 
-  QWidget *w = new QWidget();
-  m_hBoxLayout = new QHBoxLayout(w);
-  setCentralWidget(w);
+    m_naviInterface->setDefaultRouteKey(m_aboutView->objectName());
 
-  m_widgetLayout = new QHBoxLayout();
-  m_stackWidget = new StackedWidget(this);
-  m_navigationInterface = new NavigationInterface(true, true, this);
+    connect(m_stackWidget, &StackedWidget::currentWidgetChanged, this, [this](QWidget *w) {
+        m_naviInterface->setCurrentItem(w->objectName());
+        qDebug() << "current" << m_stackWidget->view()->currentIndex();
+    });
+    m_naviInterface->setCurrentItem(m_loginView->objectName());
+    m_stackWidget->setCurrentIndex(0);
+}
+
+void MainWindow::connectSignalsAndSlots()
+{
+    connect(m_naviInterface, &NavigationInterface::displayModeChanged, m_titleBar, &StandardTitleBar::raise);
+}
 
-  QFramelessHelper *helper = new QFramelessHelper(this);
-  m_titleBar = new StandardTitleBar(this);
-  m_titleBar->setGeometry(QRect(46, 0, width() - 46, m_titleBar->height()));
-  helper->setTitleBar(m_titleBar);
+void MainWindow::setNaviInterfaceHidden(bool hidden)
+{
+    m_naviInterface->setHidden(hidden);
+    m_titleBar->setGeometry(QRect(titleBarIndent(), 0, width() - titleBarIndent(), m_titleBar->height()));
+}
 
-  QIcon icon = QIcon(":/resource/logo.png");
-  setWindowIcon(icon);
-  m_titleBar->setIcon(icon);
+int MainWindow::titleBarIndent() const
+{
+    return m_naviInterface->isHidden() ? 0 : 46;
+}
 
-  setWindowTitle("专家评定数据分析软件");
-  setMinimumSize(QSize(800, 600));
+void MainWindow::resizeEvent(QResizeEvent *event)
+{
+    m_titleBar->resize(width() - titleBarIndent(), m_titleBar->height());
 }
 
-void MainWindow::initLayout() {
-  m_hBoxLayout->setSpacing(0);
-  m_hBoxLayout->setContentsMargins(0, 0, 0, 0);
-  m_hBoxLayout->addWidget(m_navigationInterface);
-  m_hBoxLayout->addLayout(m_widgetLayout);
-  m_hBoxLayout->setStretchFactor(m_widgetLayout, 1);
+void MainWindow::switchTo(QWidget *widget, bool triggerByUser)
+{
+    qDebug() << __FUNCTION__ << __LINE__;
+    m_stackWidget->setCurrentWidget(widget, triggerByUser);
+}
 
-  m_widgetLayout->addWidget(m_stackWidget);
-  m_widgetLayout->setContentsMargins(0, 32, 0, 0);
+void MainWindow::loginViewClicked()
+{
+    qDebug() << __FUNCTION__ << __LINE__;
+    switchTo(m_loginView);
 }
 
-void MainWindow::resizeEvent(QResizeEvent *event) {
-  m_navigationInterface->resize(m_navigationInterface->width(), height());
-  m_titleBar->resize(width() - 46, m_titleBar->height());
+void MainWindow::aboutViewClicked()
+{
+    qDebug() << __FUNCTION__ << __LINE__;
+    switchTo(m_aboutView);
 }

+ 45 - 23
QFD/pages/MainWindow.h

@@ -9,45 +9,67 @@ class QHBoxLayout;
 class NavigationInterface;
 class StandardTitleBar;
 
-class StackedWidget : public QFrame {
-  Q_OBJECT
+class LoginView;
+class AboutView;
+
+class StackedWidget : public QFrame
+{
+    Q_OBJECT
 public:
-  StackedWidget(QWidget *parent = nullptr);
+    StackedWidget(QWidget *parent = nullptr);
 
-  void addWidget(QWidget *widget);
+    void addWidget(QWidget *widget);
 
-  void setCurrentWidget(QWidget *widget, bool popOut = false);
+    void setCurrentWidget(QWidget *widget, bool popOut = false);
 
-  void setCurrentIndex(int index, bool popOut = false);
+    void setCurrentIndex(int index, bool popOut = false);
 
-  PopUpAniStackedWidget *view() const;
+    PopUpAniStackedWidget *view() const;
 
 signals:
-  void currentWidgetChanged(QWidget *);
+    void currentWidgetChanged(QWidget *);
 
 private:
-  QHBoxLayout *m_hBoxLayout;
-  PopUpAniStackedWidget *m_view;
+    QHBoxLayout *m_hBoxLayout;
+    PopUpAniStackedWidget *m_view;
 };
 
-class MainWindow : public QMainWindow {
-  Q_OBJECT
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
 
 public:
-  MainWindow(QWidget *parent = nullptr);
-  ~MainWindow();
+    MainWindow(QWidget *parent = nullptr);
+    ~MainWindow();
 
 private:
-  void initWindow();
-  void initLayout();
+    void initialize();
+    void initWindow();
+    void initLayout();
+    void initNavigation();
+
+    void connectSignalsAndSlots();
+
+    void setNaviInterfaceHidden(bool hidden);
+
+    int titleBarIndent() const;
 
-  void resizeEvent(QResizeEvent *event) override;
+    void resizeEvent(QResizeEvent *event) override;
+
+    void switchTo(QWidget *widget, bool triggerByUser = true);
+
+private slots:
+    void loginViewClicked();
+    void aboutViewClicked();
 
 private:
-  StandardTitleBar *m_titleBar;
-  QHBoxLayout *m_hBoxLayout;
-  QHBoxLayout *m_widgetLayout;
-  StackedWidget *m_stackWidget;
-  NavigationInterface *m_navigationInterface;
+    StandardTitleBar *m_titleBar;
+    QHBoxLayout *m_hBoxLayout;
+    QHBoxLayout *m_widgetLayout;
+    StackedWidget *m_stackWidget;
+    NavigationInterface *m_naviInterface;
+
+    LoginView *m_loginView;
+    AboutView *m_aboutView;
 };
-#endif // MAINWINDOW_H
+#endif  // MAINWINDOW_H

+ 352 - 0
QFD/resource.qrc

@@ -2,5 +2,357 @@
     <qresource prefix="/">
         <file>resource/logo.png</file>
         <file>resource/logo32.png</file>
+        <file>resource/background/1.jpg</file>
+        <file>resource/background/10.jpg</file>
+        <file>resource/background/2.jpg</file>
+        <file>resource/background/3.jpg</file>
+        <file>resource/background/4.jpg</file>
+        <file>resource/background/5.jpg</file>
+        <file>resource/background/6.jpg</file>
+        <file>resource/background/7.jpg</file>
+        <file>resource/background/8.jpg</file>
+        <file>resource/background/9.jpg</file>
+        <file>resource/background/login.jpg</file>
+        <file>resource/flags/1.png</file>
+        <file>resource/flags/10.png</file>
+        <file>resource/flags/11.png</file>
+        <file>resource/flags/12.png</file>
+        <file>resource/flags/13.png</file>
+        <file>resource/flags/14.png</file>
+        <file>resource/flags/15.png</file>
+        <file>resource/flags/16.png</file>
+        <file>resource/flags/17.png</file>
+        <file>resource/flags/18.png</file>
+        <file>resource/flags/19.png</file>
+        <file>resource/flags/2.png</file>
+        <file>resource/flags/3.png</file>
+        <file>resource/flags/4.png</file>
+        <file>resource/flags/5.png</file>
+        <file>resource/flags/6.png</file>
+        <file>resource/flags/7.png</file>
+        <file>resource/flags/8.png</file>
+        <file>resource/flags/9.png</file>
+        <file>resource/icons/cil-3d.png</file>
+        <file>resource/icons/cil-4k.png</file>
+        <file>resource/icons/cil-account-logout.png</file>
+        <file>resource/icons/cil-action-redo.png</file>
+        <file>resource/icons/cil-action-undo.png</file>
+        <file>resource/icons/cil-airplane-mode-off.png</file>
+        <file>resource/icons/cil-airplane-mode.png</file>
+        <file>resource/icons/cil-alarm.png</file>
+        <file>resource/icons/cil-align-center.png</file>
+        <file>resource/icons/cil-align-left.png</file>
+        <file>resource/icons/cil-align-right.png</file>
+        <file>resource/icons/cil-arrow-bottom-2.png</file>
+        <file>resource/icons/cil-arrow-bottom.png</file>
+        <file>resource/icons/cil-arrow-circle-bottom.png</file>
+        <file>resource/icons/cil-arrow-circle-left.png</file>
+        <file>resource/icons/cil-arrow-circle-right.png</file>
+        <file>resource/icons/cil-arrow-circle-top.png</file>
+        <file>resource/icons/cil-arrow-left.png</file>
+        <file>resource/icons/cil-arrow-right.png</file>
+        <file>resource/icons/cil-arrow-top.png</file>
+        <file>resource/icons/cil-at.png</file>
+        <file>resource/icons/cil-av-timer.png</file>
+        <file>resource/icons/cil-ban.png</file>
+        <file>resource/icons/cil-battery-0.png</file>
+        <file>resource/icons/cil-battery-3.png</file>
+        <file>resource/icons/cil-battery-5.png</file>
+        <file>resource/icons/cil-battery-alert.png</file>
+        <file>resource/icons/cil-battery-slash.png</file>
+        <file>resource/icons/cil-bell.png</file>
+        <file>resource/icons/cil-bluetooth.png</file>
+        <file>resource/icons/cil-briefcase.png</file>
+        <file>resource/icons/cil-browser.png</file>
+        <file>resource/icons/cil-calendar-check.png</file>
+        <file>resource/icons/cil-camera-roll.png</file>
+        <file>resource/icons/cil-camera.png</file>
+        <file>resource/icons/cil-caret-bottom.png</file>
+        <file>resource/icons/cil-caret-left.png</file>
+        <file>resource/icons/cil-caret-right.png</file>
+        <file>resource/icons/cil-caret-top.png</file>
+        <file>resource/icons/cil-cart.png</file>
+        <file>resource/icons/cil-cast.png</file>
+        <file>resource/icons/cil-chart-line.png</file>
+        <file>resource/icons/cil-chart-pie.png</file>
+        <file>resource/icons/cil-chart.png</file>
+        <file>resource/icons/cil-chat-bubble.png</file>
+        <file>resource/icons/cil-check-alt.png</file>
+        <file>resource/icons/cil-check-circle.png</file>
+        <file>resource/icons/cil-check.png</file>
+        <file>resource/icons/cil-chevron-bottom.png</file>
+        <file>resource/icons/cil-chevron-circle-down-alt.png</file>
+        <file>resource/icons/cil-chevron-circle-left-alt.png</file>
+        <file>resource/icons/cil-chevron-circle-right-alt.png</file>
+        <file>resource/icons/cil-chevron-circle-up-alt.png</file>
+        <file>resource/icons/cil-chevron-double-down.png</file>
+        <file>resource/icons/cil-chevron-double-left.png</file>
+        <file>resource/icons/cil-chevron-double-right.png</file>
+        <file>resource/icons/cil-chevron-double-up-alt.png</file>
+        <file>resource/icons/cil-chevron-double-up.png</file>
+        <file>resource/icons/cil-chevron-left.png</file>
+        <file>resource/icons/cil-chevron-right.png</file>
+        <file>resource/icons/cil-chevron-top.png</file>
+        <file>resource/icons/cil-circle.png</file>
+        <file>resource/icons/cil-clipboard.png</file>
+        <file>resource/icons/cil-clock.png</file>
+        <file>resource/icons/cil-clone.png</file>
+        <file>resource/icons/cil-closed-captioning.png</file>
+        <file>resource/icons/cil-cloud-download.png</file>
+        <file>resource/icons/cil-cloud-upload.png</file>
+        <file>resource/icons/cil-cloudy.png</file>
+        <file>resource/icons/cil-code.png</file>
+        <file>resource/icons/cil-coffee.png</file>
+        <file>resource/icons/cil-comment-bubble.png</file>
+        <file>resource/icons/cil-comment-square.png</file>
+        <file>resource/icons/cil-credit-card.png</file>
+        <file>resource/icons/cil-cursor-move.png</file>
+        <file>resource/icons/cil-cursor.png</file>
+        <file>resource/icons/cil-cut.png</file>
+        <file>resource/icons/cil-data-transfer-down.png</file>
+        <file>resource/icons/cil-data-transfer-up.png</file>
+        <file>resource/icons/cil-deaf.png</file>
+        <file>resource/icons/cil-description.png</file>
+        <file>resource/icons/cil-devices.png</file>
+        <file>resource/icons/cil-dialpad.png</file>
+        <file>resource/icons/cil-dog.png</file>
+        <file>resource/icons/cil-door.png</file>
+        <file>resource/icons/cil-double-quote-sans-left.png</file>
+        <file>resource/icons/cil-double-quote-sans-right.png</file>
+        <file>resource/icons/cil-drop.png</file>
+        <file>resource/icons/cil-envelope-closed.png</file>
+        <file>resource/icons/cil-envelope-letter.png</file>
+        <file>resource/icons/cil-envelope-open.png</file>
+        <file>resource/icons/cil-equalizer.png</file>
+        <file>resource/icons/cil-ethernet.png</file>
+        <file>resource/icons/cil-exit-to-app.png</file>
+        <file>resource/icons/cil-expand-down.png</file>
+        <file>resource/icons/cil-expand-left.png</file>
+        <file>resource/icons/cil-expand-right.png</file>
+        <file>resource/icons/cil-expand-up.png</file>
+        <file>resource/icons/cil-exposure.png</file>
+        <file>resource/icons/cil-external-link.png</file>
+        <file>resource/icons/cil-face-dead.png</file>
+        <file>resource/icons/cil-featured-playlist.png</file>
+        <file>resource/icons/cil-file.png</file>
+        <file>resource/icons/cil-find-in-page.png</file>
+        <file>resource/icons/cil-fingerprint.png</file>
+        <file>resource/icons/cil-fire.png</file>
+        <file>resource/icons/cil-flip-to-back.png</file>
+        <file>resource/icons/cil-folder-open.png</file>
+        <file>resource/icons/cil-folder.png</file>
+        <file>resource/icons/cil-frown.png</file>
+        <file>resource/icons/cil-gamepad.png</file>
+        <file>resource/icons/cil-hand-point-down.png</file>
+        <file>resource/icons/cil-hand-point-left.png</file>
+        <file>resource/icons/cil-hand-point-right.png</file>
+        <file>resource/icons/cil-hand-point-up.png</file>
+        <file>resource/icons/cil-hd.png</file>
+        <file>resource/icons/cil-hdr.png</file>
+        <file>resource/icons/cil-headphones.png</file>
+        <file>resource/icons/cil-heart.png</file>
+        <file>resource/icons/cil-highligt.png</file>
+        <file>resource/icons/cil-history.png</file>
+        <file>resource/icons/cil-home.png</file>
+        <file>resource/icons/cil-house.png</file>
+        <file>resource/icons/cil-image-plus.png</file>
+        <file>resource/icons/cil-image1.png</file>
+        <file>resource/icons/cil-infinity.png</file>
+        <file>resource/icons/cil-input-power.png</file>
+        <file>resource/icons/cil-input.png</file>
+        <file>resource/icons/cil-justify-center.png</file>
+        <file>resource/icons/cil-justify-left.png</file>
+        <file>resource/icons/cil-justify-right.png</file>
+        <file>resource/icons/cil-keyboard.png</file>
+        <file>resource/icons/cil-laptop.png</file>
+        <file>resource/icons/cil-layers.png</file>
+        <file>resource/icons/cil-level-down.png</file>
+        <file>resource/icons/cil-level-up.png</file>
+        <file>resource/icons/cil-library-add.png</file>
+        <file>resource/icons/cil-library.png</file>
+        <file>resource/icons/cil-lightbulb.png</file>
+        <file>resource/icons/cil-link-alt.png</file>
+        <file>resource/icons/cil-link-broken.png</file>
+        <file>resource/icons/cil-link.png</file>
+        <file>resource/icons/cil-location-pin.png</file>
+        <file>resource/icons/cil-lock-locked.png</file>
+        <file>resource/icons/cil-lock-unlocked.png</file>
+        <file>resource/icons/cil-loop-1.png</file>
+        <file>resource/icons/cil-loop-circular.png</file>
+        <file>resource/icons/cil-loop.png</file>
+        <file>resource/icons/cil-low-vision.png</file>
+        <file>resource/icons/cil-magnifying-glass.png</file>
+        <file>resource/icons/cil-map.png</file>
+        <file>resource/icons/cil-media-eject.png</file>
+        <file>resource/icons/cil-media-pause.png</file>
+        <file>resource/icons/cil-media-play.png</file>
+        <file>resource/icons/cil-media-skip-backward.png</file>
+        <file>resource/icons/cil-media-skip-forward.png</file>
+        <file>resource/icons/cil-media-step-backward.png</file>
+        <file>resource/icons/cil-media-step-forward.png</file>
+        <file>resource/icons/cil-media-stop.png</file>
+        <file>resource/icons/cil-medical-cross.png</file>
+        <file>resource/icons/cil-meh.png</file>
+        <file>resource/icons/cil-menu.png</file>
+        <file>resource/icons/cil-microphone.png</file>
+        <file>resource/icons/cil-minus.png</file>
+        <file>resource/icons/cil-mobile-landscape.png</file>
+        <file>resource/icons/cil-mobile.png</file>
+        <file>resource/icons/cil-mood-bad.png</file>
+        <file>resource/icons/cil-mood-good.png</file>
+        <file>resource/icons/cil-mood-very-bad.png</file>
+        <file>resource/icons/cil-mood-very-good.png</file>
+        <file>resource/icons/cil-moon.png</file>
+        <file>resource/icons/cil-mouse.png</file>
+        <file>resource/icons/cil-move.png</file>
+        <file>resource/icons/cil-movie.png</file>
+        <file>resource/icons/cil-mug-tea.png</file>
+        <file>resource/icons/cil-mug.png</file>
+        <file>resource/icons/cil-notes.png</file>
+        <file>resource/icons/cil-options-horizontal.png</file>
+        <file>resource/icons/cil-options.png</file>
+        <file>resource/icons/cil-paint-bucket.png</file>
+        <file>resource/icons/cil-paper-plane.png</file>
+        <file>resource/icons/cil-paperclip.png</file>
+        <file>resource/icons/cil-paragraph.png</file>
+        <file>resource/icons/cil-pen-alt.png</file>
+        <file>resource/icons/cil-pencil.png</file>
+        <file>resource/icons/cil-people.png</file>
+        <file>resource/icons/cil-phone.png</file>
+        <file>resource/icons/cil-pin.png</file>
+        <file>resource/icons/cil-plus.png</file>
+        <file>resource/icons/cil-power-standby.png</file>
+        <file>resource/icons/cil-print.png</file>
+        <file>resource/icons/cil-rectangle.png</file>
+        <file>resource/icons/cil-reload.png</file>
+        <file>resource/icons/cil-remove.png</file>
+        <file>resource/icons/cil-rss.png</file>
+        <file>resource/icons/cil-satelite.png</file>
+        <file>resource/icons/cil-save.png</file>
+        <file>resource/icons/cil-screen-desktop.png</file>
+        <file>resource/icons/cil-screen-smartphone.png</file>
+        <file>resource/icons/cil-settings.png</file>
+        <file>resource/icons/cil-share-boxed.png</file>
+        <file>resource/icons/cil-share.png</file>
+        <file>resource/icons/cil-signal-cellular-0.png</file>
+        <file>resource/icons/cil-signal-cellular-3.png</file>
+        <file>resource/icons/cil-size-grip.png</file>
+        <file>resource/icons/cil-smile.png</file>
+        <file>resource/icons/cil-speaker.png</file>
+        <file>resource/icons/cil-speech.png</file>
+        <file>resource/icons/cil-speedometer.png</file>
+        <file>resource/icons/cil-star.png</file>
+        <file>resource/icons/cil-tags.png</file>
+        <file>resource/icons/cil-task.png</file>
+        <file>resource/icons/cil-terminal.png</file>
+        <file>resource/icons/cil-text-size.png</file>
+        <file>resource/icons/cil-text-square.png</file>
+        <file>resource/icons/cil-text.png</file>
+        <file>resource/icons/cil-thumb-down.png</file>
+        <file>resource/icons/cil-thumb-up.png</file>
+        <file>resource/icons/cil-transfer.png</file>
+        <file>resource/icons/cil-triangle.png</file>
+        <file>resource/icons/cil-truck.png</file>
+        <file>resource/icons/cil-user-female.png</file>
+        <file>resource/icons/cil-user-follow.png</file>
+        <file>resource/icons/cil-user-unfollow.png</file>
+        <file>resource/icons/cil-user.png</file>
+        <file>resource/icons/cil-vertical-align-bottom.png</file>
+        <file>resource/icons/cil-view-column.png</file>
+        <file>resource/icons/cil-view-module.png</file>
+        <file>resource/icons/cil-view-quilt.png</file>
+        <file>resource/icons/cil-view-stream.png</file>
+        <file>resource/icons/cil-voice-over-record.png</file>
+        <file>resource/icons/cil-volume-high.png</file>
+        <file>resource/icons/cil-volume-low.png</file>
+        <file>resource/icons/cil-volume-off.png</file>
+        <file>resource/icons/cil-wallet.png</file>
+        <file>resource/icons/cil-watch.png</file>
+        <file>resource/icons/cil-wifi-signal-0.png</file>
+        <file>resource/icons/cil-wifi-signal-1.png</file>
+        <file>resource/icons/cil-wifi-signal-2.png</file>
+        <file>resource/icons/cil-wifi-signal-4.png</file>
+        <file>resource/icons/cil-wifi-signal-off.png</file>
+        <file>resource/icons/cil-window-maximize.png</file>
+        <file>resource/icons/cil-window-minimize.png</file>
+        <file>resource/icons/cil-window-restore.png</file>
+        <file>resource/icons/cil-wrap-text.png</file>
+        <file>resource/icons/cil-x-circle.png</file>
+        <file>resource/icons/cil-x.png</file>
+        <file>resource/icons/cil-zoom-in.png</file>
+        <file>resource/icons/cil-zoom-out.png</file>
+        <file>resource/icons/icon_close.png</file>
+        <file>resource/icons/icon_maximize.png</file>
+        <file>resource/icons/icon_menu.png</file>
+        <file>resource/icons/icon_minimize.png</file>
+        <file>resource/icons/icon_restore.png</file>
+        <file>resource/icons/icon_settings.png</file>
+        <file>resource/image/btn_close.png</file>
+        <file>resource/image/btn_ok.png</file>
+        <file>resource/image/Font Awesome Cheatsheet.png</file>
+        <file>resource/image/fontawesome-webfont.ttf</file>
+        <file>resource/image/msg_error.png</file>
+        <file>resource/image/msg_info.png</file>
+        <file>resource/image/msg_question.png</file>
+        <file>resource/image/qt_zh_CN.qm</file>
+        <file>resource/image/widgets.qm</file>
+        <file>resource/about.ico</file>
+        <file>resource/add.png</file>
+        <file>resource/add_expert.png</file>
+        <file>resource/app.png</file>
+        <file>resource/arrow-left.png</file>
+        <file>resource/arrow-right.png</file>
+        <file>resource/arrow0.png</file>
+        <file>resource/arrow1.png</file>
+        <file>resource/arrow2.png</file>
+        <file>resource/arrow3.png</file>
+        <file>resource/clear.png</file>
+        <file>resource/createproj.png</file>
+        <file>resource/daochu.png</file>
+        <file>resource/daoru.png</file>
+        <file>resource/delete.png</file>
+        <file>resource/detect_type.png</file>
+        <file>resource/diamond.png</file>
+        <file>resource/eval_type.png</file>
+        <file>resource/excel.png</file>
+        <file>resource/expert.png</file>
+        <file>resource/expert_config.png</file>
+        <file>resource/expert_import.png</file>
+        <file>resource/file_add.png</file>
+        <file>resource/file_delete.png</file>
+        <file>resource/file_open.png</file>
+        <file>resource/file_save.png</file>
+        <file>resource/find.png</file>
+        <file>resource/finger_indicate.png</file>
+        <file>resource/flag.png</file>
+        <file>resource/home_close.png</file>
+        <file>resource/home_open.png</file>
+        <file>resource/line.png</file>
+        <file>resource/link.png</file>
+        <file>resource/MainIco.png</file>
+        <file>resource/menu.png</file>
+        <file>resource/mind.png</file>
+        <file>resource/minus_expert.png</file>
+        <file>resource/name.png</file>
+        <file>resource/open.png</file>
+        <file>resource/openproj.png</file>
+        <file>resource/pass_hide.png</file>
+        <file>resource/pass_show.png</file>
+        <file>resource/qiehuan.png</file>
+        <file>resource/rectangle.png</file>
+        <file>resource/refresh.png</file>
+        <file>resource/remark.png</file>
+        <file>resource/Round.png</file>
+        <file>resource/Rounded_Rectangle.png</file>
+        <file>resource/search.png</file>
+        <file>resource/settings.png</file>
+        <file>resource/software.png</file>
+        <file>resource/trapezoid.png</file>
+        <file>resource/user_change.png</file>
+        <file>resource/userinfo.png</file>
+        <file>resource/word.png</file>
+        <file>resource/xiangqing.png</file>
+        <file>resource/xiugai.png</file>
+        <file>resource/yulan.png</file>
     </qresource>
 </RCC>

BIN
QFD/resource/MainIco.png


BIN
QFD/resource/Round.png


BIN
QFD/resource/Rounded_Rectangle.png


BIN
QFD/resource/about.ico


BIN
QFD/resource/add.png


BIN
QFD/resource/add_expert.png


BIN
QFD/resource/app.png


BIN
QFD/resource/arrow-left.png


BIN
QFD/resource/arrow-right.png


BIN
QFD/resource/arrow0.png


BIN
QFD/resource/arrow1.png


BIN
QFD/resource/arrow2.png


BIN
QFD/resource/arrow3.png


BIN
QFD/resource/background/1.jpg


BIN
QFD/resource/background/10.jpg


BIN
QFD/resource/background/2.jpg


BIN
QFD/resource/background/3.jpg


BIN
QFD/resource/background/4.jpg


BIN
QFD/resource/background/5.jpg


BIN
QFD/resource/background/6.jpg


BIN
QFD/resource/background/7.jpg


BIN
QFD/resource/background/8.jpg


BIN
QFD/resource/background/9.jpg


BIN
QFD/resource/background/login.jpg


BIN
QFD/resource/clear.png


BIN
QFD/resource/createproj.png


BIN
QFD/resource/daochu.png


BIN
QFD/resource/daoru.png


BIN
QFD/resource/delete.png


BIN
QFD/resource/detect_type.png


BIN
QFD/resource/diamond.png


BIN
QFD/resource/eval_type.png


BIN
QFD/resource/excel.png


BIN
QFD/resource/expert.png


BIN
QFD/resource/expert_config.png


BIN
QFD/resource/expert_import.png


BIN
QFD/resource/file_add.png


BIN
QFD/resource/file_delete.png


BIN
QFD/resource/file_open.png


BIN
QFD/resource/file_save.png


BIN
QFD/resource/find.png


BIN
QFD/resource/finger_indicate.png


BIN
QFD/resource/flag.png


BIN
QFD/resource/flags/1.png


BIN
QFD/resource/flags/10.png


BIN
QFD/resource/flags/11.png


BIN
QFD/resource/flags/12.png


BIN
QFD/resource/flags/13.png


BIN
QFD/resource/flags/14.png


BIN
QFD/resource/flags/15.png


BIN
QFD/resource/flags/16.png


BIN
QFD/resource/flags/17.png


BIN
QFD/resource/flags/18.png


BIN
QFD/resource/flags/19.png


BIN
QFD/resource/flags/2.png


BIN
QFD/resource/flags/3.png


BIN
QFD/resource/flags/4.png


BIN
QFD/resource/flags/5.png


BIN
QFD/resource/flags/6.png


BIN
QFD/resource/flags/7.png


BIN
QFD/resource/flags/8.png


BIN
QFD/resource/flags/9.png


BIN
QFD/resource/home_close.png


BIN
QFD/resource/home_open.png


BIN
QFD/resource/icons/cil-3d.png


BIN
QFD/resource/icons/cil-4k.png


BIN
QFD/resource/icons/cil-account-logout.png


BIN
QFD/resource/icons/cil-action-redo.png


BIN
QFD/resource/icons/cil-action-undo.png


BIN
QFD/resource/icons/cil-airplane-mode-off.png


BIN
QFD/resource/icons/cil-airplane-mode.png


BIN
QFD/resource/icons/cil-alarm.png


BIN
QFD/resource/icons/cil-align-center.png


BIN
QFD/resource/icons/cil-align-left.png


BIN
QFD/resource/icons/cil-align-right.png


BIN
QFD/resource/icons/cil-arrow-bottom-2.png


BIN
QFD/resource/icons/cil-arrow-bottom.png


BIN
QFD/resource/icons/cil-arrow-circle-bottom.png


BIN
QFD/resource/icons/cil-arrow-circle-left.png


BIN
QFD/resource/icons/cil-arrow-circle-right.png


BIN
QFD/resource/icons/cil-arrow-circle-top.png


BIN
QFD/resource/icons/cil-arrow-left.png


BIN
QFD/resource/icons/cil-arrow-right.png


BIN
QFD/resource/icons/cil-arrow-top.png


BIN
QFD/resource/icons/cil-at.png


BIN
QFD/resource/icons/cil-av-timer.png


BIN
QFD/resource/icons/cil-ban.png


BIN
QFD/resource/icons/cil-battery-0.png


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff