1 Star 0 Fork 2

尘中远 / SAColorWidgets

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

说明

颜色操作组件主要是为工业软件的颜色操作过程提供便利的封装,主要提供了颜色选择ToolButton,ColorGrid,实现了类似Office的颜色选择操作

颜色相关的操作有很多开源的封装,例如有ctk的ctkColorPickerButton,有kColorPicker,但这些都无法实现像Office的颜色选择操作,这个简单的控件就是为了实现类似Office的颜色操作方式

效果

总体效果

SAColorToolButton

实现颜色设置的工具按钮,在原来ToolButton的基础上,加上了设置颜色的接口,并会把颜色显示到按钮上,同时也可以设置图标,让颜色和图标同时显示

Qt::ToolButtonIconOnly模式

没有设置图标:

有设置图标:

有菜单:

Qt::ToolButtonTextOnly模式

Qt::ToolButtonTextBesideIcon模式

Qt::ToolButtonTextUnderIcon模式:

SAColorGridWidget

这是一个颜色块,用于给用户进行颜色选择,效果如下:

SAColorPaletteGridWidget

这是一个颜色选择板,有一行标准颜色(最顶上的一行),下面会根据标准颜色进行加亮80%,60%,40%,加暗25%,50%的色块(可以设置比例因子),效果如下:

SAColorMenu

这是一个颜色选择菜单,可以实现类似office的颜色选择功能

MIT License Copyright (c) 2023 尘中远 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Provide Qt controls about to color operations,such as office style color toolbutton 展开 收起
C++ 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/czyt1988/SAColorWidgets.git
git@gitee.com:czyt1988/SAColorWidgets.git
czyt1988
SAColorWidgets
SAColorWidgets
master

搜索帮助