《开始使用PyQT》 第01章 PyQT入门 03 用户界面介绍

这篇具有很好参考价值的文章主要介绍了《开始使用PyQT》 第01章 PyQT入门 03 用户界面介绍。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

03 用户界面介绍

《开始使用PyQT》 第01章 PyQT入门 03 用户界面介绍

The user interface (UI) has become a key part of our everyday lives, becoming the intermediary between us and our ever-growing number of machines. A UI is designed to facilitate in human-computer interaction. The human needs to operate and control the machine to serve some purpose; meanwhile, the machine needs to simultaneously provide feedback and a means to interact with it in order to aid the human’s decisionmaking process. UIs are everywhere, from the mobile applications on our phones to web browsers, to heavy machinery controls, and even on the appliances in our kitchens. Of course, the ways in which we interact with technology is not merely limited to our hands, as many UIs also allow interaction with our other sensory organs.

用户界面(UI)已成为我们日常生活的重要组成部分,成为我们与日益增多的机器之间的中介。用户界面旨在促进人机交互。人类需要操作和控制机器,以达到某种目的;与此同时,机器需要同时提供反馈和与之互动的方式,以帮助人类做出决策。用户界面无处不在,从我们手机上的移动应用程序到网页浏览器,再到重型机械控制装置,甚至是我们厨房里的电器。当然,我们与技术互动的方式不仅仅局限于我们的双手,许多用户界面还可以与我们的其他感觉器官进行互动。

A good UI is tasked with helping a person produce a desired result while also allowing for easier, more efficient, and more friendly operation of a machine. Think about the photo editing apps on your phone. Editing the size, color, or exposure is practically effortless as you slide your fingers across the screen and watch the images change almost instantly. The user provides minimal input to achieve the desired output.

一个好的用户界面的任务是帮助用户获得理想的结果,同时还能让用户更轻松、更高效、更友好地操作机器。想想你手机上的照片编辑应用程序。编辑尺寸、颜色或曝光几乎不费吹灰之力,手指在屏幕上滑动,图像几乎瞬间就会发生变化。用户只需提供最少的输入,就能实现所需的输出。

什么是图形化用户界面?

For this book, we will be focusing on creating desktop graphical user interfaces (GUI) that take advantage of a computer’s graphics capabilities to create visual applications. Decades ago, users would have to use the command line and text commands to interact with the computer. Tasks such as opening, deleting and moving files, and searching through directories were all done by typing in certain commands. However, these were not very user-friendly or simple-to-use interfaces for the general public. So GUIs were created to allow users to interact with electronic devices using graphical controls, rather than command-line interfaces.

本书的重点是创建桌面图形用户界面(GUI),利用计算机的图形功能创建可视化应用程序。几十年前,用户必须使用命令行和文本命令与计算机交互。打开、删除和移动文件以及搜索目录等任务都是通过输入特定命令来完成的。然而,对于普通大众来说,这些界面并不是非常友好或简单易用。因此,图形用户界面应运而生,允许用户使用图形控制而不是命令行界面与电子设备进行交互。

These graphical control elements, or widgets, such as buttons, menus, and windows, make such tasks effortless. Interaction now becomes as simple as moving your mouse or touching the screen depending upon your device and clicking on the widget.

按钮、菜单和窗口等这些图形控制元素或小工具让这些任务变得毫不费力。现在,交互变得非常简单,只需移动鼠标或触摸屏幕(视设备而定),然后点击部件即可。

创建良好界面设计的理念

This, first and foremost, is a technical book written to help those of you who want to learn how to create and code your own GUI with PyQt and Python. That being said, if you plan to design any kind of UI that other people will use, then you are no longer creating a UI just to solve your own problems. You must also begin to consider other users of the application as well. Think about what you want them to accomplish, or how the application can help them. Sometimes, when we are trying to solve a problem, we get so caught up in trying to create a product that we forget about the people who actually have to interact with them.

首先,这是一本技术书籍,旨在帮助那些想学习如何使用 PyQt 和 Python 创建和编写自己的图形用户界面的人。尽管如此,如果您打算设计任何类型的用户界面供他人使用,那么您就不再只是为了解决自己的问题而创建用户界面。您还必须开始考虑应用程序的其他用户。想想你想让他们完成什么,或者应用程序能如何帮助他们。有时,当我们试图解决一个问题时,我们会过于专注于创造一个产品,而忘记了真正需要与之交互的人。

The following is a list of concepts to consider when designing your own UI. They are not set rules and by no means a complete list, but rather ideas that you should consider when designing your own applications.

以下是在设计自己的用户界面时需要考虑的一些概念。它们不是固定的规则,也绝不是完整的列表,而是您在设计自己的应用程序时应该考虑的想法。

Clarity – Using clear language, hierarchy, and flow with visualelements to avoid ambiguity. One of the ways this can be achieved is by considering visual importance to the human eye, laying out widgets with bigger sizes, darker colors, etc., in such a manner that we can visually understand the UI.

清晰度–使用清晰的语言、层次结构和视觉元素流程,避免含糊不清。实现这一点的方法之一是考虑视觉对人眼的重要性,用更大的尺寸、更深的颜色等布局部件,使我们能直观地理解用户界面。

Conciseness – Simplifying the layout to include only what the userneeds to see or interact with at a given time in order to be brief,but also comprehensive. Adding more labels or buttons in yourwindow just to give the user more options is not always better.

简洁–简化布局,只包含用户在特定时间内需要查看或交互的内容,这样既简洁又全面。在窗口中添加更多标签或按钮,只是为了给用户提供更多选择,并不总是更好的做法。

Consistency – Design the UI so that there is consistency across theapplication. This helps users to recognize patterns in the visualelements and layout and can be seen in typography that improvesthe navigation and readability of the application, image styles, oreven color schemes.

一致性–设计用户界面时要确保整个应用程序的一致性。这有助于用户识别视觉元素和布局中的模式,可体现在提高应用程序导航和可读性的排版、图像样式甚至配色方案中。

Efficiency – Utilizing good design and shortcuts to help the userimprove productivity. If a task can be accomplished in two steps,why design your GUI so that the work has to be completed in five?

效率 - 利用良好的设计和快捷方式帮助用户提高工作效率。如果一项任务只需两步就能完成,为什么还要设计图形用户界面,让用户在五步内完成工作呢?

Familiarity – Consider elements that users normally see inother UIs and how they would expect them to perform in yourapplications. For example, think about how weird it would be to have to enter your login information, only to find the password entry field is above the username. It is not wrong, but now you are unnecessarily making users think about their actions and slowing them down.

熟悉性–考虑用户通常在其他用户界面中看到的元素,以及他们希望这些元素在你的应用程序中如何执行。例如,如果要输入登录信息,却发现密码输入字段在用户名的上方,想想会有多奇怪。这并没有错,但现在您却不必要地让用户思考他们的操作,从而减慢了他们的速度。

Responsive – Give the user feedback, for example, a toggle thatchanges color to “on” or “off,” a small message to notify the user iftheir input is correct or incorrect, or even a sound effect to verify acompleted action. The user should never be left wondering if theiraction was successful or not.

响应式 - 给用户反馈,例如,将颜色切换为 "开 "或 "关 "的切换按钮、通知用户输入正确或错误的小信息,甚至是验证操作是否完成的声音效果。用户不应该怀疑自己的操作是否成功。文章来源地址https://www.toymoban.com/news/detail-833819.html

到了这里,关于《开始使用PyQT》 第01章 PyQT入门 03 用户界面介绍的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • PyQT5: 构建图形用户界面的Python指南

    PyQt5是一个Python绑定的跨平台C++库,用于创建丰富的图形用户界面(GUI)。它是Qt库的Python接口,Qt库由Qt公司开发,用于开发GUI程序,也称作应用程序框架。在此,我们将详细介绍如何使用PyQt5创建图形用户界面。 在开始之前,我们需要确保已经在Python环境中安装了PyQt5。如果

    2024年02月13日
    浏览(40)
  • C# GUI编程入门指南:学习如何使用C#创建图形用户界面

    C# GUI编程入门指南:学习如何使用C#创建图形用户界面 在本文中,我们将介绍如何使用C#编写GUI程序。GUI(Graphical User Interface)是一种以图形方式呈现信息和操作功能的界面,它使得用户与计算机更加直观和友好。C#是一种强大的编程语言,它提供了丰富的库和工具来帮助我们

    2024年01月21日
    浏览(42)
  • 从0开始写Vue项目-Vue实现用户个人信息界面上传头像

    从0开始写Vue项目-环境和项目搭建_慕言要努力的博客-CSDN博客 从0开始写Vue项目-Vue2集成Element-ui和后台主体框架搭建_慕言要努力的博客-CSDN博客 从0开始写Vue项目-Vue页面主体布局和登录、注册页面_慕言要努力的博客-CSDN博客 从0开始写Vue项目-SpringBoot整合Mybatis-plus实现登录、注

    2024年02月06日
    浏览(36)
  • Android快速入门-----用户界面(上)UI组件(1)

    @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(isChecked){ // 提示 Toast.makeText(SimpleComponActivity.this, cd_simple_pingpang.getText().toString(), 0).show(); } } }); cd_simple_foot.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton but

    2024年04月17日
    浏览(39)
  • Android快速入门-----用户界面(上)UI组件(1),附面试答案

    @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(isChecked){ // 提示 Toast.makeText(SimpleComponActivity.this, cd_simple_pingpang.getText().toString(), 0).show(); } } }); cd_simple_foot.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton but

    2024年04月25日
    浏览(33)
  • Aras入门教程3_可配置用户界面(Configurable User Interface)

    CUI模型 可配置用户界面 (CUI) 是 Aras 中的一种建模机制,它允许管理员定义客户端应用程序的布局(layout)和行为(behavior)。CUI 在 Aras11 的早期服务包中引入,最初旨在用于建模工具栏(toolbars)、菜单(menus)和键盘快捷键(keyboard shortcuts)。 到 Aras12,随着客户端的 UX/U

    2024年01月17日
    浏览(19)
  • [QT编程系列-39]:用户界面UI - 样式表QSS与样式文件快速入门

    目录 1. 概述 2. CSS 3. QSS示例 4. QT样式表文件使用方法与步骤 5. QT内置样式 6. QT常见基本样式 Qt提供了一种称为Qt样式表(Qt Style Sheets)的机制,可以用于 自定义和美化Qt应用程序的用户界面(UI) 。 使用Qt样式表,你可以通过类似 CSS 的语法来定义UI元素的外观和布局,包括颜

    2024年02月04日
    浏览(36)
  • 使用Streamlit创建AutoGen用户界面

    AutoGen作为一个最大化LLM(如GPT-4)能力的框架而脱颖而出。由微软研究院开发的AutoGen通过提供一种自动化、优化和编排工作流的方法,简化了复杂的、基于多代理llm的应用程序的创建。我们在以前的文章中也有过介绍,你可以与许多GPT交谈,并且GPT和GPT之间也可以互相交谈。每

    2024年02月04日
    浏览(80)
  • 如何使用Java实现图形用户界面(GUI)?

    随着计算机技术的不断发展,图形用户界面(GUI)成为现代软件开发的一个重要方面。通过使用GUI,开发人员可以创建具有可视化界面的应用程序,以提供更好的用户体验。在本文中,我们将介绍如何使用Java实现GUI。 Java提供了多个GUI库,包括Swing、JavaFX和AWT。其中,Swing和

    2024年02月04日
    浏览(31)
  • 使用 electronjs 实现 ibus 输入法的用户界面

    ibus 输入法框架自带一套用户界面, 比如 (ibus-libpinyin): 但是从灵活程度和可扩展的角度考虑, 最好还是另外想办法实现用户界面, 而不是用 ibus 自带的这个. 在桌面 (PC) 平台制作图形用户界面, 有很多很多种具体的技术可供选择. 但是窝觉得, 其中最简单的方式就是使用 electronj

    2024年02月22日
    浏览(30)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包