Qt-Advanced-Docking-System示例程序

写了一些简单的示例程序,帮助我更好地使用和了解Qt-Advanced-Docking-System

1.写一个如图页面布局的程序

 

    m_pDockManger=new ads::CDockManager(this);this->setCentralWidget(m_pDockManger);ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());

2.在centerDockWidget->dockAreaWidget()的ads::BottomDockWidgetArea添加widget

    m_pDockManger=new ads::CDockManager(this);this->setCentralWidget(m_pDockManger);ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget5=new ads::CDockWidget("页面5");m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget5,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget6=new ads::CDockWidget("页面6");m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget6,centerDockWidget->dockAreaWidget());

3.写一个如图所示的程序

    m_pDockManger=new ads::CDockManager(this);this->setCentralWidget(m_pDockManger);ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());

4.

    m_pDockManger=new ads::CDockManager(this);this->setCentralWidget(m_pDockManger);ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget5=new ads::CDockWidget("页面5");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget5,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget6=new ads::CDockWidget("页面6");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget6,centerDockWidget->dockAreaWidget());

5.

    m_pDockManger=new ads::CDockManager(this);this->setCentralWidget(m_pDockManger);ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget5=new ads::CDockWidget("页面5");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget5,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget6=new ads::CDockWidget("页面6");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget6,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget7=new ads::CDockWidget("页面7");m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget7,centerDockWidget->dockAreaWidget());ads::CDockWidget* pDockWidget8=new ads::CDockWidget("页面8");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget8,pDockWidget7->dockAreaWidget());ads::CDockWidget* pDockWidget9=new ads::CDockWidget("页面9");m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget9,pDockWidget7->dockAreaWidget());

6.

#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>
#include <QListWidget>
#include <QLabel>
#include "DockManager.h"
#include "QtDock/DockAreaWidget.h"
namespace Ui {
class MainWindow;
}class MainWindow : public QMainWindow
{Q_OBJECTpublic:explicit MainWindow(QWidget *parent = 0);~MainWindow();private slots:void on_actionAdd_triggered();private:Ui::MainWindow *ui;ads::CDockManager* m_pDockManger;ads::CDockWidget* centerDockWidget;ads::CDockWidget* bottomDockWidget;QListWidget* ListWidget;int mProjectNum=0;
};#endif // MAINWINDOW_H
#include "mainwindow.h"
#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);m_pDockManger=new ads::CDockManager(this);this->setCentralWidget(m_pDockManger);centerDockWidget=new ads::CDockWidget("中心页面");centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("测试页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("项目管理");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ListWidget=new QListWidget(pDockWidget2);pDockWidget2->setWidget(ListWidget);ads::CDockWidget* pDockWidget3=new ads::CDockWidget("测试页面2");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());bottomDockWidget=new ads::CDockWidget("底部页面");bottomDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,bottomDockWidget,centerDockWidget->dockAreaWidget());
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::on_actionAdd_triggered()
{mProjectNum++;ListWidget->addItem(QString("项目%1").arg(mProjectNum));ads::CDockWidget* cDockWidget=new ads::CDockWidget(QString("中心页面%1").arg(mProjectNum));m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,cDockWidget,centerDockWidget->dockAreaWidget());ads::CDockWidget* bDockWidget=new ads::CDockWidget(QString("底部页面%1").arg(mProjectNum));m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,bDockWidget,bottomDockWidget->dockAreaWidget());
}

7.dockWidgetsMap()

        QMap<QString, ads::CDockWidget*> map=m_pDockManger->dockWidgetsMap();qDebug()<<map.keys();for(auto key:map.keys()){qDebug()<<key.toStdString().c_str();}

中心页面

中心页面1

中心页面2

中心页面3

中心页面4

底部页面

底部页面1

底部页面2

底部页面3

底部页面4

测试页面1

测试页面2

项目管理

qDebug()<<"centralWidget():"<<m_pDockManger->centralWidget()->objectName().toStdString().c_str();

centralWidget(): 中心页面

8. 


        QMap<QString, ads::CDockWidget*> map=m_pDockManger->dockWidgetsMap();for(auto key:map.keys()){qDebug()<<key.toStdString().c_str();auto value = map[key];qDebug()<<"ads::CDockWidget:"<<value;qDebug()<<"dockAreaWidget:"<<value->dockAreaWidget();}

中心页面

ads::CDockWidget: ads::CDockWidget(0x3052108, name = "\u4E2D\u5FC3\u9875\u9762")

dockAreaWidget: ads::CDockAreaWidget(0x30818f0)

中心页面1

ads::CDockWidget: ads::CDockWidget(0x41f25a8, name = "\u4E2D\u5FC3\u9875\u97621")

dockAreaWidget: ads::CDockAreaWidget(0x30818f0)

底部页面

ads::CDockWidget: ads::CDockWidget(0x30f8f68, name = "\u5E95\u90E8\u9875\u9762")

dockAreaWidget: ads::CDockAreaWidget(0x30f90a8)

底部页面1

ads::CDockWidget: ads::CDockWidget(0x41f26c0, name = "\u5E95\u90E8\u9875\u97621")

dockAreaWidget: ads::CDockAreaWidget(0x30f90a8)

测试页面1

ads::CDockWidget: ads::CDockWidget(0x3092060, name = "\u6D4B\u8BD5\u9875\u97621")

dockAreaWidget: ads::CDockAreaWidget(0x3091ea8)

测试页面2

ads::CDockWidget: ads::CDockWidget(0x30eca80, name = "\u6D4B\u8BD5\u9875\u97622")

dockAreaWidget: ads::CDockAreaWidget(0x30ecad0)

项目管理

ads::CDockWidget: ads::CDockWidget(0x30d81b0, name = "\u9879\u76EE\u7BA1\u7406")

dockAreaWidget: ads::CDockAreaWidget(0x30d84a8)

9.

        QList<ads::CDockAreaWidget*> areas=m_pDockManger->openedDockAreas();qDebug()<<areas;

 (ads::CDockAreaWidget(0x3071828), ads::CDockAreaWidget(0x3082448), ads::CDockAreaWidget(0x30c81b0), ads::CDockAreaWidget(0x30dd250), ads::CDockAreaWidget(0x30e8fb8))

对应5块区域 

 

10.

        QMap<QString, ads::CDockWidget*> map=m_pDockManger->dockWidgetsMap();for(auto key:map.keys()){qDebug()<<key.toStdString().c_str();auto value = map[key];qDebug()<<"ads::CDockWidget:"<<value;qDebug()<<"dockAreaWidget:"<<value->dockAreaWidget();}

area: ads::CDockAreaWidget(0x31118a0) count: 5

area: ads::CDockAreaWidget(0x3122128) count: 1

area: ads::CDockAreaWidget(0x3168458) count: 1

area: ads::CDockAreaWidget(0x317c440) count: 1

area: ads::CDockAreaWidget(0x3189440) count: 5

相关函数:

QList<CDockWidget*> CDockAreaWidget::dockWidgets() const

 这个信号也比较好用

ads::CDockAreaWidget::currentChanged

11.

#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>
#include <QListWidget>
#include <QLabel>
#include "DockManager.h"
#include "QtDock/DockAreaWidget.h"
namespace Ui {
class MainWindow;
}class MainWindow : public QMainWindow
{Q_OBJECTpublic:explicit MainWindow(QWidget *parent = 0);~MainWindow();private slots:void on_actionAdd_triggered();private:Ui::MainWindow *ui;ads::CDockManager* m_pDockManger;ads::CDockWidget* centerDockWidget;QHash<int,ads::CDockWidget*> centerHash;QHash<int,ads::CDockWidget*> bottomHash;ads::CDockWidget* bottomDockWidget;QListWidget* ListWidget;int mProjectNum=0;QLabel * mLabelOne;QLabel * mLabelTwo;
};#endif // MAINWINDOW_H
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);m_pDockManger=new ads::CDockManager(this);this->setCentralWidget(m_pDockManger);centerDockWidget=new ads::CDockWidget("中心页面");centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("测试页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);mLabelOne=new QLabel(pDockWidget1);pDockWidget1->setWidget(mLabelOne);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("项目管理");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ListWidget=new QListWidget(pDockWidget2);connect(ListWidget,&QListWidget::currentItemChanged,this,[=](QListWidgetItem *current, QListWidgetItem *previous){int index=current->data(Qt::UserRole).toInt();ads::CDockAreaWidget* centerArea=centerDockWidget->dockAreaWidget();centerArea->setCurrentDockWidget(centerHash[index]);ads::CDockAreaWidget* bottomArea=bottomDockWidget->dockAreaWidget();bottomArea->setCurrentDockWidget(bottomHash[index]);QString msg=QString("当时是项目%1").arg(index);mLabelOne->setText(msg);mLabelTwo->setText(msg);});pDockWidget2->setWidget(ListWidget);ads::CDockWidget* pDockWidget3=new ads::CDockWidget("测试页面2");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());mLabelTwo=new QLabel(pDockWidget3);pDockWidget3->setWidget(mLabelTwo);bottomDockWidget=new ads::CDockWidget("底部页面");bottomDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,bottomDockWidget,centerDockWidget->dockAreaWidget());
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::on_actionAdd_triggered()
{mProjectNum++;QListWidgetItem *item;item=new QListWidgetItem(ListWidget);item->setText(QString("项目%1").arg(mProjectNum));item->setData(Qt::UserRole,mProjectNum);ListWidget->addItem(item);ListWidget->setCurrentItem(item);ads::CDockWidget* cDockWidget=new ads::CDockWidget(QString("中心页面%1").arg(mProjectNum));m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,cDockWidget,centerDockWidget->dockAreaWidget());centerHash.insert(mProjectNum,cDockWidget);ads::CDockWidget* bDockWidget=new ads::CDockWidget(QString("底部页面%1").arg(mProjectNum));m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,bDockWidget,bottomDockWidget->dockAreaWidget());bottomHash.insert(mProjectNum,bDockWidget);QString msg=QString("当时是项目%1").arg(mProjectNum);mLabelOne->setText(msg);mLabelTwo->setText(msg);
}

12.

#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>
#include <QListWidget>
#include <QLabel>
#include "DockManager.h"
#include "QtDock/DockAreaWidget.h"
namespace Ui {
class MainWindow;
}class MainWindow : public QMainWindow
{Q_OBJECTpublic:explicit MainWindow(QWidget *parent = 0);~MainWindow();private slots:void on_actionAdd_triggered();void onProjectChanged(int index);
private:Ui::MainWindow *ui;ads::CDockManager* m_pDockManger;ads::CDockWidget* centerDockWidget;ads::CDockWidget* bottomDockWidget;QListWidget* ListWidget;QHash<int,ads::CDockWidget*> centerHash;QHash<int,ads::CDockWidget*> bottomHash;QHash<int,QListWidgetItem*>  itemHash;int mProjectNum=0;QLabel * mLabelOne;QLabel * mLabelTwo;
};#endif // MAINWINDOW_H
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);m_pDockManger=new ads::CDockManager(this);qDebug()<<"m_pDockManger:"<<m_pDockManger;this->setCentralWidget(m_pDockManger);centerDockWidget=new ads::CDockWidget("中心页面");centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->setCentralWidget(centerDockWidget);m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);ads::CDockAreaWidget* centerArea=centerDockWidget->dockAreaWidget();connect(centerArea,&ads::CDockAreaWidget::currentChanged,this,&MainWindow::onProjectChanged);bottomDockWidget=new ads::CDockWidget("底部页面");bottomDockWidget->setFeature(ads::CDockWidget::NoTab,true);m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,bottomDockWidget,centerDockWidget->dockAreaWidget());ads::CDockAreaWidget* bottomArea=bottomDockWidget->dockAreaWidget();connect(bottomArea,&ads::CDockAreaWidget::currentChanged,this,&MainWindow::onProjectChanged);ads::CDockWidget* pDockWidget1=new ads::CDockWidget("测试页面1");m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);mLabelOne=new QLabel(pDockWidget1);pDockWidget1->setWidget(mLabelOne);ads::CDockWidget* pDockWidget2=new ads::CDockWidget("项目管理");m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());ListWidget=new QListWidget(pDockWidget2);pDockWidget2->setWidget(ListWidget);connect(ListWidget,&QListWidget::currentItemChanged,this,[=](QListWidgetItem *current, QListWidgetItem *previous){int index=current->data(Qt::UserRole).toInt();onProjectChanged(index);});ads::CDockWidget* pDockWidget3=new ads::CDockWidget("测试页面2");m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());mLabelTwo=new QLabel(pDockWidget3);pDockWidget3->setWidget(mLabelTwo);
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::on_actionAdd_triggered()
{mProjectNum++;QListWidgetItem *item;item=new QListWidgetItem(ListWidget);item->setText(QString("项目%1").arg(mProjectNum));item->setData(Qt::UserRole,mProjectNum);ListWidget->addItem(item);itemHash.insert(mProjectNum,item);ListWidget->setCurrentItem(item);ads::CDockWidget* cDockWidget=new ads::CDockWidget(QString("中心页面%1").arg(mProjectNum));m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,cDockWidget,centerDockWidget->dockAreaWidget());centerHash.insert(mProjectNum,cDockWidget);ads::CDockWidget* bDockWidget=new ads::CDockWidget(QString("底部页面%1").arg(mProjectNum));m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,bDockWidget,bottomDockWidget->dockAreaWidget());bottomHash.insert(mProjectNum,bDockWidget);QString msg=QString("当时是项目%1").arg(mProjectNum);mLabelOne->setText(msg);mLabelTwo->setText(msg);
}void MainWindow::onProjectChanged(int index)
{ListWidget->setCurrentItem(itemHash[index]);ads::CDockAreaWidget* centerArea=centerDockWidget->dockAreaWidget();centerArea->setCurrentDockWidget(centerHash[index]);ads::CDockAreaWidget* bottomArea=bottomDockWidget->dockAreaWidget();bottomArea->setCurrentDockWidget(bottomHash[index]);QString msg=QString("当时是项目%1").arg(index);mLabelOne->setText(msg);mLabelTwo->setText(msg);
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/34809.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

JetBrains WebStorm 2024 mac/win版:效率至上,编码无忧

JetBrains WebStorm 2024 是一款专为前端开发者和全栈工程师打造的高 级集成开发环境(IDE)。它提供了对JavaScript、TypeScript、HTML5、CSS等技术的全面支持&#xff0c;帮助开发者更高效地进行前端开发。 WebStorm 2023 mac/win版获取 WebStorm 2024 拥有强大的智能代码补全…

从一万英尺外看libevent(源码刨析)

从一万英尺外看libevent 温馨提示&#xff1a;阅读时间大概二十分钟 前言 Libevent是用于编写高速可移植非阻塞IO应用的库&#xff0c;其设计目标是&#xff1a; 可移植性&#xff1a;使用libevent编写的程序应该可以在libevent支持的所有平台上工作。即使没有好的方式进行非…

js实现拖拽排序

<!DOCTYPE html> <html lang"zh"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>拖拽排序</title><style>* {margin: 0;p…

manim边学边做--SingleStringMathTex

SingleStringMathTex是Mobjects分类中用来显示数学公式的class。 manim中有3个可以用来显示数学公式的class&#xff0c;还有两个是MathTex和Tex&#xff0c;后续再介绍。 从SingleStringMathTex的名称中也可以看出&#xff0c;它是用来显示只有一行的简单公式。 SingleStrin…

Elasticsearch:使用 semantic_text 简化语义搜索

作者&#xff1a;来自 Elastic Carlos Delgado, Mike Pellegrini semantic_text - 你知道&#xff0c;用于语义搜索&#xff01; 你是否想开始使用语义搜索来搜索数据&#xff0c;但专注于模型和结果而不是技术细节&#xff1f;我们引入了 semantic_text 字段类型&#xff0c;…

OpenAI开发者大会:OpenAI如何再次掀起AI领域的浪潮

对于AI行业的从业者来说&#xff0c;他们可能度过了一个不眠之夜。 北京时间2023年11月7日凌晨&#xff0c;美国人工智能公司OpenAI的开发者大会隆重举行。OpenAI的创始人Sam Altman与同事仅用短短45分钟的时间&#xff0c;在台上发布了他们团队的最新成果——GPT-4 Turbo。这一…

vue+canvas画布实现网页签名效果

1、签名自定义组件代码示例&#xff1a; qianMing.vue <template><!-- 容器&#xff0c;包含画布和清除按钮 --><div class"signature-pad-container"><!-- 画布元素&#xff0c;用于用户签名 --><canvasref"canvas" <!--…

学习金字塔模型

学习金字塔模型由美国缅因州巴特尔教育研究所&#xff08;National Training Laboratories, Bethel, Maine&#xff09;开发&#xff0c;它展示了不同学习活动的平均知识保留率。这种方法可以帮助人们理解不同学习方式的有效性&#xff0c;从而更好地选择适合的学习方法。学习金…

关键时刻,了解可燃气体报警器探头使用年限至关重要

可燃气体报警器是工业生产、商业场所及家庭安全中不可或缺的重要设备&#xff0c;它能够实时监测环境中可燃气体&#xff08;如天然气、液化石油气等&#xff09;的浓度&#xff0c;并在浓度达到预设的阈值时发出警报&#xff0c;以预防火灾和爆炸等危险事件。 而作为报警器核…

来聊聊Redis所实现的Reactor模型

写在文章开头 我们都知道解决C10k问题的最好方案就是通过在IO多路复用的基础上通过reactor模型实现高性能的网络并发程序&#xff0c;借助这个设计&#xff0c;redis的主线程也是基于IO多路复用以reactor模型的思路实现了一个高性能的单线程内存数据&#xff0c;本文将带领读者…

一种改进最大相关峭度解卷积的滚动轴承故障诊断方法(MATLAB)

近年来&#xff0c;最大相关峭度解卷积受到了研究人员越来越多的关注&#xff0c;陆续有多篇研究论文将该方法应用于滚动轴轴承故障诊断。MCKD是由McDonald提出的一种解卷积方法&#xff0c;其算法中设计了一个新的目标函数——相关峭度&#xff0c;并以此为优化目标设计一系列…

HTML(24)——过渡

过渡 作用&#xff1a;可以为一个元素在不同的状态之间切换的时候添加过渡效果 属性名&#xff1a;transition(复合属性) 属性值&#xff1a;过渡的属性 花费时间(s) 提示&#xff1a; 过渡的属性可以是具体的CSS属性也可以为all&#xff08;两个状态属性值不同的所有属性…

HTML基础入门知识

HTML基础使用 文章目录 HTML基础使用1、什么是HTML2、web标准4、HTML语法规则5、常用的标签标题标签段落标签换行标签文本格式化标签div和span标签图片标签路径链接标签注释 1、什么是HTML 什么是网页 网站是指在因特网上根据一定的规则&#xff0c;使用 HTML 等制作的用于展示…

完美世界否认大规模裁员,存在项目和人员的正常调整

原标题&#xff1a;完美世界回应裁员传闻&#xff1a;确实存在人员调整 项目继续正常研发 易采游戏网6月25日消息&#xff1a;网络上热传完美世界进行史上最大规模裁员&#xff0c;甚至有消息称其两栋办公楼已近乎搬空&#xff0c;同时备受瞩目的游戏项目《完美新世界》和《一拳…

日立EX-PROII+系列全新升级,智慧随心控畅享新生活

随着科技的进步&#xff0c;各种智能家电也开始走入人们的生活&#xff0c;而在这个领域&#xff0c;日立用技术创新生活&#xff0c;不断为新时代注入活力&#xff0c;推出日立 EX-PROII系列家用净化中央空调&#xff0c;贯彻“小身材&#xff0c;大能量”核心设计理念&#x…

Docker编译nanopc-t4源码流程介绍

官方文档 Android系统编译 vnc加环境变量配置 https://github.com/friendlyarm/docker-cross-compiler-novnc 下载 git clone https://github.com/friendlyarm/docker-ubuntu-lxde-novnc cd docker-ubuntu-lxde-novnc docker build --no-cache -t docker-ubuntu-lxde-novnc …

【期末复习】计算机组成原理

海明码 最通俗的海明码计算方法&#xff0c;不需记公式&#xff0c;套步骤即可&#xff08;可能都不需要理解&#xff09; https://www.bilibili.com/video/BV1tL4y1h7Fd/ 接上一海明码视频&#xff08;海明码的纠错&#xff09; https://www.bilibili.com/video/BV1tf4y1A7NX/…

使用官方新工具手动升级 Quest 操作系统

Meta 近期推出了一款用于手动升级 Meta Quest 系统的工具&#xff0c;为用户提供了更多选择。本文将详细介绍如何使用这一工具进行系统升级。 优势与劣势 优势&#xff1a; 安装迅速&#xff1a;升级速度相比在线自动升级快&#xff0c;且可实时查看进度 即时升级&#xff1…

全国计算机等级考试WPS如何报名

全国计算机等级考试WPS如何报名&#xff1f; 注册并登录 全国计算机等级考试官网选择 考试服务-在线报名选择报考省份-开始报名

【Splitpanes】Vue.js 靠谱、简单并支持触摸的窗格分割器/调整器。

【Splitpanes】Vue.js 靠谱、简单并支持触摸的窗格分割器/调整器。 介绍安装使用示例与文档 介绍 Vue.js 靠谱、简单并支持触摸的窗格分割器/调整器。用于实现可调节窗口&#xff0c;支持Vue2、Vue3。 安装 Vue3 npm install splitpanesVue2 npm install splitpaneslegac…