Now that KDE 4 has been available for some time, we can see that its good looks is one of its most appealing features. In the meanwhile, fluid and rich UIs became a standard in the mobile world. Together, these trends made users see their desktop from a new perspective, where software must go beyond functionality and look nice too.
High level initiatives like the Plasma new generation desktop, KWin composite effects and the new Oxygen themes, as well as low level ones like the Qt Animation Framework and the Declarative UI, are enabling us to reach such high level of user experience, something that used to be a 'plus' but is now a 'must'.
An often overlooked tool that helps making KDE aesthetically better is the Layouting mechanism. The simple idea of describing how things look instead of moving elements to hardcoded positions on the screen has great and unexplored potential. We want to show how KDE projects can take advantage of that.
This talk will cover flexible layouts, self-animated layouts and animation between different layouts, recent features we have been developing for Qt framework, together with Qt Software. Subjects will include the use cases that drove us, implementation constraints we had, APIs, usage and the benefits that arise from the use of such technologies.
This chapter introduces Java GUI programming using Swing. It discusses the motivations for using Swing over AWT, outlines the objectives to be covered, and provides examples of creating basic Swing components like buttons, labels, text fields etc. It also explains the Swing and AWT class hierarchies with Container and Helper classes.
Here are the key methods in the Color class:
- Color(int red, int green, int blue) - Creates a color with the specified red, green, and blue values.
- static Color getColor(String colorName) - Returns a predefined color specified by name, such as "red", "blue", etc.
- int getRed() - Returns the red component of this color.
- int getGreen() - Returns the green component of this color.
- int getBlue() - Returns the blue component of this color.
So in summary, the Color class allows you to create colors from RGB values or predefined names, and retrieve the RGB components of existing colors. This enables
This 3 slide presentation encourages the viewer to care deeply about others in a world where many do not. It suggests being a person who cares greatly rather than not caring at all. The slides were created by Amy Seah.
How to Keep Hackers Out of Your OrganisationIBM Danmark
This document provides an overview of how penetration testing can identify security vulnerabilities by simulating real-world hacking attacks. It discusses how the presenter's company conducted penetration tests for customers by exploiting vulnerabilities like default passwords and misconfigurations to gain access to internal systems. Case studies show how vulnerabilities in web applications and networks were found that allowed unauthorized access to sensitive data. The document emphasizes that many security incidents can be avoided through basic measures like strong passwords and patching systems. It promotes the value of penetration testing for identifying issues before exploitation and provides an action plan for remediation.
#India’s #InflationReview for July 2014:
#Inflation at #WholesalePrices and #ConsumerPrices.
India's Annual Inflation rate based on all India general Consumer Price Index CPI for July 2014 stood at 7.96% as compared to 7.46% for June 2014.
India's WPI Wholesale Inflation stood at 5.19% for the month of July 2014 as compared to 5.43% for June 2014 and 5.85% for July 2013.
#IndiaInflationData #WholesalePriceIndex #ConsumerPriceIndex #IndiaInflationIndex #Inflation #India #RetailInflation #WholealeInflation
The document outlines 10 critical success factors for successful project portfolio management: 1) Senior management commitment and consensus, 2) Communication of strategic objectives, 3) Strategically aligned investment selection, 4) Institutionalized investment management process, 5) Governance framework aligned with enterprise decision making, 6) Integrated program/project management discipline, 7) Consistent risk and performance measurement, 8) Portfolio reviews to support investment priority realignment, 9) Effective balance of investments, and 10) Strategic focus transforming strategy into operational excellence. Adopting more of these factors provides more value, but success is still possible if senior management commits to the process. Project portfolio management infuses strategy into investment decisions.
Closing the Gap Between Project Management and Governance
In today’s increasingly competitive marketplace, budgets are tight and resources are limited. Consequently, making decisions about which projects to pursue is vital in supporting an organization’s growth, vision, and value. For this dilemma, there is a powerful cost containment and risk mitigation strategy—a combination of IT governance and portfolio management. This approach is highly relevant for budget issues state agencies and departments currently face. With the proliferation of technology at greater and greater speed, the options that could bring potential benefit are seemingly endless. Gone are the days when a great technological idea was an end in itself. Technology has truly become an enabler across all sizes and types of organizations. The challenge now is to understand which business goals can be enabled by a technology and choose the best projects to accomplish those goals. The best way to ensure and demonstrate value to the organization is to know how these projects are supporting the organization financially and operationally. Implementing sound project management practices along with a governance framework can enable this kind of visibility and control.
Re-architecting visualisations in Java Swingmartinjgraham
hallelujah moment as I realise coding everything from scratch is a waste of time. So I decide to code a toolkit from scratch instead.... well, almost, i extend various Java Swing widgets
This chapter introduces Java GUI programming using Swing. It discusses the motivations for using Swing over AWT, outlines the objectives to be covered, and provides examples of creating basic Swing components like buttons, labels, text fields etc. It also explains the Swing and AWT class hierarchies with Container and Helper classes.
Here are the key methods in the Color class:
- Color(int red, int green, int blue) - Creates a color with the specified red, green, and blue values.
- static Color getColor(String colorName) - Returns a predefined color specified by name, such as "red", "blue", etc.
- int getRed() - Returns the red component of this color.
- int getGreen() - Returns the green component of this color.
- int getBlue() - Returns the blue component of this color.
So in summary, the Color class allows you to create colors from RGB values or predefined names, and retrieve the RGB components of existing colors. This enables
This 3 slide presentation encourages the viewer to care deeply about others in a world where many do not. It suggests being a person who cares greatly rather than not caring at all. The slides were created by Amy Seah.
How to Keep Hackers Out of Your OrganisationIBM Danmark
This document provides an overview of how penetration testing can identify security vulnerabilities by simulating real-world hacking attacks. It discusses how the presenter's company conducted penetration tests for customers by exploiting vulnerabilities like default passwords and misconfigurations to gain access to internal systems. Case studies show how vulnerabilities in web applications and networks were found that allowed unauthorized access to sensitive data. The document emphasizes that many security incidents can be avoided through basic measures like strong passwords and patching systems. It promotes the value of penetration testing for identifying issues before exploitation and provides an action plan for remediation.
#India’s #InflationReview for July 2014:
#Inflation at #WholesalePrices and #ConsumerPrices.
India's Annual Inflation rate based on all India general Consumer Price Index CPI for July 2014 stood at 7.96% as compared to 7.46% for June 2014.
India's WPI Wholesale Inflation stood at 5.19% for the month of July 2014 as compared to 5.43% for June 2014 and 5.85% for July 2013.
#IndiaInflationData #WholesalePriceIndex #ConsumerPriceIndex #IndiaInflationIndex #Inflation #India #RetailInflation #WholealeInflation
The document outlines 10 critical success factors for successful project portfolio management: 1) Senior management commitment and consensus, 2) Communication of strategic objectives, 3) Strategically aligned investment selection, 4) Institutionalized investment management process, 5) Governance framework aligned with enterprise decision making, 6) Integrated program/project management discipline, 7) Consistent risk and performance measurement, 8) Portfolio reviews to support investment priority realignment, 9) Effective balance of investments, and 10) Strategic focus transforming strategy into operational excellence. Adopting more of these factors provides more value, but success is still possible if senior management commits to the process. Project portfolio management infuses strategy into investment decisions.
Closing the Gap Between Project Management and Governance
In today’s increasingly competitive marketplace, budgets are tight and resources are limited. Consequently, making decisions about which projects to pursue is vital in supporting an organization’s growth, vision, and value. For this dilemma, there is a powerful cost containment and risk mitigation strategy—a combination of IT governance and portfolio management. This approach is highly relevant for budget issues state agencies and departments currently face. With the proliferation of technology at greater and greater speed, the options that could bring potential benefit are seemingly endless. Gone are the days when a great technological idea was an end in itself. Technology has truly become an enabler across all sizes and types of organizations. The challenge now is to understand which business goals can be enabled by a technology and choose the best projects to accomplish those goals. The best way to ensure and demonstrate value to the organization is to know how these projects are supporting the organization financially and operationally. Implementing sound project management practices along with a governance framework can enable this kind of visibility and control.
Re-architecting visualisations in Java Swingmartinjgraham
hallelujah moment as I realise coding everything from scratch is a waste of time. So I decide to code a toolkit from scratch instead.... well, almost, i extend various Java Swing widgets
This document provides guidance on framework design. It discusses how organizational structure and culture can impact a product. Frameworks should manage dependencies and balance new features with maintaining compatibility. Duplication and unfinished features should be avoided. APIs should be designed based on code samples for key scenarios before defining object models. Simplicity is important and thorough testing and measurement is needed. Framework engineering best practices from Microsoft, Cwalina, and Schmidt are referenced.
This document provides an overview of Java GUI programming using AWT and Swing. It discusses:
1. AWT and Swing - the two main sets of visual components for building Java GUIs. AWT relies on native platform components while Swing uses pure Java components.
2. Key concepts of AWT and Swing including lightweight vs heavyweight components, advantages and disadvantages of each, and common GUI component and container classes.
3. The Java GUI API class hierarchy including component classes, container classes, and helper classes for graphics, colors, fonts etc.
4. Event handling in Java GUI programs using the delegation model where components fire events and listener objects handle them. Common user actions, event
This document summarizes a new display manager called caQtDM, which was developed to replace MEDM at the Paul Scherrer Institut. caQtDM is based on Qt rather than MOTIF and X11 like MEDM. It reproduces MEDM's functionality and can run on Windows as well as platforms where Qt is supported. MEDM display files were converted to the new XML format and edited in Qt Designer. caQtDM integrates well with EPICS and other control systems. It has a library class that handles data acquisition and display separately from the display definitions.
This document discusses CAQTDM, a new display manager for EPICS control systems based on Qt. It was developed at Paul Scherrer Institut to replace their aging MEDM display manager. CAQTDM reproduces MEDM's functionality and can display EPICS and other control system data. It uses the Qt framework for cross-platform support. Control displays are designed using the Qt Designer and displayed using the CAQTDM application. The architecture separates display design from data acquisition, allowing it to interface with multiple control systems like EPICS and ACS.
In the era of Microservices, Cloud Computing and Serverless architecture, it’s useful to understand Kubernetes and learn how to use it. However, the official Kubernetes documentation can be hard to decipher, especially for newcomers. In this book, I will present a simplified view of Kubernetes and give examples of how to use it for deploying microservices using different cloud providers, including Azure, Amazon, Google Cloud and even IBM.
The document introduces JConqurr, an Eclipse toolkit for parallel programming in Java that supports common parallel patterns like task, data, divide-and-conquer, and pipeline parallelism. JConqurr uses annotations and directives to extract parallelism from sequential code. It can parallelize code for both CPUs and GPUs. The toolkit was tested on common parallel algorithms and showed significant performance gains.
An Introduction to Computer Science with Java .docxdaniahendric
An Introduction to
Computer Science with Java
Copyright 2013 by C. Herbert, all rights reserved.
Last edited August 21, 2013 by C. Herbert
This document is a draft of a chapter from Computer Science with Java, written by Charles Herbert with the assistance of Craig
Nelson. It is available free of charge for students in Computer Science 111 at Community College of Philadelphia during the Fall
2013 semester. It may not be reproduced or distributed for any other purposes without proper prior permission.
CSCI 111 Chapter 11 Graphics pg. 2
Introduction to
Computer Science with Java
Chapter 11 – Java Graphics
This short chapter describes how programmers can create and manipulate two-dimensional graphics in
Java. It includes creating.
Chapter Learning Outcomes
Upon completion of this chapter students should be able to:
Describe what a graphics processing unit (GPU) is and why GPUs are used
with modern computers.
Describe what the java.awt.Canvas and java.awt.Graphics classes are and
how they are used.
Describe how to do each of the following using the Java Graphics class:
o setting the Color for graphics;
o drawing lines;
o drawing rectangles, and rectangles with rounded corners;
o drawing ovals, circles, and arc of ovals and circles;
o drawing polygons;
o drawing text on the screen.
Describe how to create graphs and charts illustrating business and scientific data.
Create software that uses the Java Graphics class to create figurative and abstract images.
11.1 Overview of Graphics Programming in Java
Graphics programming in Java is done through the use of APIs, including the java.awt.Graphics class and
the Java 2D API that are both part of AWT; Java OpenGL (JOGL), Java 3D (J3D), and Java Advanced
Imaging (JAI), which are official Java APIs; and many third party APIs, such as the Java LightWeight
Game Library (JLWGL). The graphics capabilities in the AWT and the Java OpenGL graphics libraries are
by far the most commonly used.
In this chapter we will focus on creating simple graphics and concepts of graphics programming using
the graphics classes included in AWT, which will allow us to create and manipulate simple graphic
images that can be displayed using the same containers as those used for Swing components.
The graphics capabilities in AWT should work equally as well on Windows, Mac and Linux-based
systems, although specialized coding for certain devices and unique hardware configurations may
require the use of specialized APIs.
CSCI 111 Chapter 11 Graphics pg. 3
Generally, instructions in Java, as in any programming language are fed through the operating system to
the computer’s hardware. In the case of graphics programming, an additional component is often
present – a graphics processing unit. A graphics processing unit (GPU), often called a graphics
accelerator, is a specialized processing unit for rendering high quality im ...
The document outlines structural design patterns including Adapter, Facade, Decorator, Composite, and Proxy patterns. It provides definitions and examples of how each pattern allows objects to be combined into larger structures. The key purpose of structural patterns is that they involve connections between objects and define how components should be structured to work together flexibly in a system.
Software objects contain state and behavior. An object's state is stored in fields and its behavior is exposed through methods. Hiding internal data and only allowing access through methods is known as encapsulation. Common behavior can be defined in a superclass and inherited into subclasses using the extends keyword. A collection of related classes organized into a namespace is called a package.
This is what I created in 2006 - 2007. Inspired by Ruby on Rails, I wanted to have something similar for Java, J2EE that would accelerate building web apps. I have built few projects on top it and those worked pretty well.
We don't this. Java also has many solid options now like Play, Spring and more.
The document describes a project to develop software to reverse engineer Java source code files and generate UML class diagrams. The software takes Java source files as input, parses them using Java tools, and identifies classes, attributes, relationships between classes. It then generates dot files that are converted into images displaying the class diagrams. The diagrams show classes, attributes, methods, and relationships like inheritance, aggregation, and dependencies. The software is intended to help understand object models from existing Java code.
This document introduces Qt 4's model/view/delegate architecture, focusing on delegates. Delegates provide complete control over data presentation and editing. The document discusses using data() to customize read-only data display and implementing a custom delegate to control editable data. It notes that delegates often duplicate code and presents a generic delegate class that can be used for any model without code duplication.
Object-Oriented Programming in Java
Java is a well-liked programming language that may be used to create a wide range of applications, from straightforward desktop programs to intricate web programs. It is an object-oriented programming language that enables programmers to create modular, reusable code, making it simple to maintain and update.
We shall look at the fundamentals of Java object-oriented programming in this tutorial. The fundamentals of object-oriented programming in Java, oops concepts such as classes and objects, inheritance, polymorphism, and encapsulation will all be covered. You will have a solid understanding of object-oriented programming in Java and how to use it to create robust and scalable programs at the end of this article.
Introduction to OOPs concept
Object-oriented programming in Java is a programming paradigm that revolves around objects. An object is a real-world entity that has a set of attributes and behaviors. In Java, even basic data types like integers and booleans are considered objects.
In OOPS, a program is designed by creating objects that interact with each other to perform tasks. Objects have attributes that define their properties and methods that define their behavior.
In Java, we create classes, which are templates that define the attributes and behaviors of objects. A class can be compared to an object creation blueprint. Once a class is defined, objects can be created based on that class.
Principles of Object-Oriented Programming
There are four main principles of object-oriented programming:
a. Abstraction
Abstraction is the process of hiding complex details and providing a simplified interface for the user. It helps developers to create simpler and more understandable models of a complex system, by just exposing only the required features and not the implementation part. In Java, abstraction can be achieved using interfaces and abstract classes.
b. Encapsulation
Encapsulation is the process of hiding the internal details of an object and providing a public interface for accessing and modifying the object. It helps in maintaining the integrity of the object and ensures that its internal state cannot be modified by external code. In Java, encapsulation can be achieved using access modifiers such as public, private, and protected.
Got confused between Abstraction and Encapsulation?
Abstraction is about simplifying the complexity of a system by focusing on its essential features, while encapsulation is about protecting the integrity of an object by hiding its internal details.
c. Inheritance
The process of creating a new class from an existing one is called Inheritance. The new class inherits the attributes and behaviors of the existing class and can add additional attributes and behaviors. This helps in reducing code duplication, promoting code reuse, and making the code more modular and maintainable. In Java, the extend keyword is useful for achieving inheritance.
d. Polymorphism
The ability of an
The document compares Eclipse, Netbeans, and Railo development tools. Both Eclipse and Netbeans are open-source integrated development environments (IDEs) that support development in multiple languages like Java, C/C++, and PHP. Railo is an open-source ColdFusion Markup Language (CFML) engine. Key differences include Eclipse having more advanced features while Netbeans may be better for beginners. Both provide rich APIs and support. Railo provides specific support for CFML development and integrates with tools like FusionDebug.
A System For Building Animated Presentations Over The WebSara Alvarez
This document describes Leonardo Web, a system for creating animated presentations for teaching and learning. It has three main components: the Builder visual editor, the Player viewer, and the Library script generation library. The Builder allows creating presentations by assembling key frames containing graphical objects. The Player can display presentations as standalone applications or web applets, supporting step-by-step or continuous playback. The Library allows generating animation scripts programmatically from Java code to batch-produce visualizations. Presentations can combine script generation and visual editing for flexibility.
This document discusses creating graphical user interfaces (GUIs) in Java. It covers the basics of GUI components like frames, buttons, and menus. It explains that AWT and Swing are the two main APIs for creating GUIs in Java, and that Swing is now more commonly used. The document provides code examples for creating simple window frames both with the AWT Frame class and the Swing JFrame class. It also discusses GUI layout and event handling.
Swing is a widget toolkit for Java. It is part of Sun Microsystems' Java Foundation Classes (JFC) — an API for providing a graphical user interface (GUI) for Java programs.
Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit. Swing provides a native look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform.ThesisScientist.com
UML allows for extending diagrams and modeling elements through three main techniques:
1. Stereotypes allow applying tags to existing modeling elements like classes, associations, etc. to add domain-specific meaning.
2. Profiles extend UML with new modeling elements tailored for specific domains or platforms.
3. Extension mechanisms allow precisely defining new constructs that integrate with the UML metamodel. Together these techniques make UML extensible for multiple domains.
This document outlines an agenda for an Android Study Jam session on user interfaces, layouts, and views. The session will cover topics like what user interfaces are, different views and view groups in Android like TextView and ImageView, various layouts like linear, relative and constraint layouts, and how to dynamically change content in views using Kotlin code. It will also discuss activities, intents and iterating over views using lists and recyclers. The session aims to help participants learn about building good user interfaces for Android apps.
PySide is a Python binding for the Qt framework that was developed by INdT to provide Python bindings under the LGPL license. It consists of PySide, which is imported, libpyside which handles Qt signals and slots, and libshiboken which helps interface Python and C++. Shiboken is the binding generator used to create the PySide bindings and can generate bindings for any C++ library. Currently, many Qt modules like QtCore and QtGui are supported. Future work includes improving the binding generation process and expanding platform support.
Connecting Technology for Great Experiences - How does QML and Web fit together?OpenBossa
The document discusses connecting technology for great experiences. It summarizes Kenneth Rohde Christiansen's presentation at the Bossa Conference in March 2010. The presentation discusses current technology trends like the ubiquity of the web, social networking, and the importance of personal data and fluid interfaces. It also discusses the power and limitations of using the web for applications. While the web provides access to existing content and services, it can be challenging to create responsive apps due to DOM manipulation overhead and lack of offline support. The presentation also highlights benefits of using Qt's declarative QML interface language for developing fluid, personalized user interfaces that support rapid development and animation.
More Related Content
Similar to The Unusual Suspect: Layouts for sleeker KDE applications
This document provides guidance on framework design. It discusses how organizational structure and culture can impact a product. Frameworks should manage dependencies and balance new features with maintaining compatibility. Duplication and unfinished features should be avoided. APIs should be designed based on code samples for key scenarios before defining object models. Simplicity is important and thorough testing and measurement is needed. Framework engineering best practices from Microsoft, Cwalina, and Schmidt are referenced.
This document provides an overview of Java GUI programming using AWT and Swing. It discusses:
1. AWT and Swing - the two main sets of visual components for building Java GUIs. AWT relies on native platform components while Swing uses pure Java components.
2. Key concepts of AWT and Swing including lightweight vs heavyweight components, advantages and disadvantages of each, and common GUI component and container classes.
3. The Java GUI API class hierarchy including component classes, container classes, and helper classes for graphics, colors, fonts etc.
4. Event handling in Java GUI programs using the delegation model where components fire events and listener objects handle them. Common user actions, event
This document summarizes a new display manager called caQtDM, which was developed to replace MEDM at the Paul Scherrer Institut. caQtDM is based on Qt rather than MOTIF and X11 like MEDM. It reproduces MEDM's functionality and can run on Windows as well as platforms where Qt is supported. MEDM display files were converted to the new XML format and edited in Qt Designer. caQtDM integrates well with EPICS and other control systems. It has a library class that handles data acquisition and display separately from the display definitions.
This document discusses CAQTDM, a new display manager for EPICS control systems based on Qt. It was developed at Paul Scherrer Institut to replace their aging MEDM display manager. CAQTDM reproduces MEDM's functionality and can display EPICS and other control system data. It uses the Qt framework for cross-platform support. Control displays are designed using the Qt Designer and displayed using the CAQTDM application. The architecture separates display design from data acquisition, allowing it to interface with multiple control systems like EPICS and ACS.
In the era of Microservices, Cloud Computing and Serverless architecture, it’s useful to understand Kubernetes and learn how to use it. However, the official Kubernetes documentation can be hard to decipher, especially for newcomers. In this book, I will present a simplified view of Kubernetes and give examples of how to use it for deploying microservices using different cloud providers, including Azure, Amazon, Google Cloud and even IBM.
The document introduces JConqurr, an Eclipse toolkit for parallel programming in Java that supports common parallel patterns like task, data, divide-and-conquer, and pipeline parallelism. JConqurr uses annotations and directives to extract parallelism from sequential code. It can parallelize code for both CPUs and GPUs. The toolkit was tested on common parallel algorithms and showed significant performance gains.
An Introduction to Computer Science with Java .docxdaniahendric
An Introduction to
Computer Science with Java
Copyright 2013 by C. Herbert, all rights reserved.
Last edited August 21, 2013 by C. Herbert
This document is a draft of a chapter from Computer Science with Java, written by Charles Herbert with the assistance of Craig
Nelson. It is available free of charge for students in Computer Science 111 at Community College of Philadelphia during the Fall
2013 semester. It may not be reproduced or distributed for any other purposes without proper prior permission.
CSCI 111 Chapter 11 Graphics pg. 2
Introduction to
Computer Science with Java
Chapter 11 – Java Graphics
This short chapter describes how programmers can create and manipulate two-dimensional graphics in
Java. It includes creating.
Chapter Learning Outcomes
Upon completion of this chapter students should be able to:
Describe what a graphics processing unit (GPU) is and why GPUs are used
with modern computers.
Describe what the java.awt.Canvas and java.awt.Graphics classes are and
how they are used.
Describe how to do each of the following using the Java Graphics class:
o setting the Color for graphics;
o drawing lines;
o drawing rectangles, and rectangles with rounded corners;
o drawing ovals, circles, and arc of ovals and circles;
o drawing polygons;
o drawing text on the screen.
Describe how to create graphs and charts illustrating business and scientific data.
Create software that uses the Java Graphics class to create figurative and abstract images.
11.1 Overview of Graphics Programming in Java
Graphics programming in Java is done through the use of APIs, including the java.awt.Graphics class and
the Java 2D API that are both part of AWT; Java OpenGL (JOGL), Java 3D (J3D), and Java Advanced
Imaging (JAI), which are official Java APIs; and many third party APIs, such as the Java LightWeight
Game Library (JLWGL). The graphics capabilities in the AWT and the Java OpenGL graphics libraries are
by far the most commonly used.
In this chapter we will focus on creating simple graphics and concepts of graphics programming using
the graphics classes included in AWT, which will allow us to create and manipulate simple graphic
images that can be displayed using the same containers as those used for Swing components.
The graphics capabilities in AWT should work equally as well on Windows, Mac and Linux-based
systems, although specialized coding for certain devices and unique hardware configurations may
require the use of specialized APIs.
CSCI 111 Chapter 11 Graphics pg. 3
Generally, instructions in Java, as in any programming language are fed through the operating system to
the computer’s hardware. In the case of graphics programming, an additional component is often
present – a graphics processing unit. A graphics processing unit (GPU), often called a graphics
accelerator, is a specialized processing unit for rendering high quality im ...
The document outlines structural design patterns including Adapter, Facade, Decorator, Composite, and Proxy patterns. It provides definitions and examples of how each pattern allows objects to be combined into larger structures. The key purpose of structural patterns is that they involve connections between objects and define how components should be structured to work together flexibly in a system.
Software objects contain state and behavior. An object's state is stored in fields and its behavior is exposed through methods. Hiding internal data and only allowing access through methods is known as encapsulation. Common behavior can be defined in a superclass and inherited into subclasses using the extends keyword. A collection of related classes organized into a namespace is called a package.
This is what I created in 2006 - 2007. Inspired by Ruby on Rails, I wanted to have something similar for Java, J2EE that would accelerate building web apps. I have built few projects on top it and those worked pretty well.
We don't this. Java also has many solid options now like Play, Spring and more.
The document describes a project to develop software to reverse engineer Java source code files and generate UML class diagrams. The software takes Java source files as input, parses them using Java tools, and identifies classes, attributes, relationships between classes. It then generates dot files that are converted into images displaying the class diagrams. The diagrams show classes, attributes, methods, and relationships like inheritance, aggregation, and dependencies. The software is intended to help understand object models from existing Java code.
This document introduces Qt 4's model/view/delegate architecture, focusing on delegates. Delegates provide complete control over data presentation and editing. The document discusses using data() to customize read-only data display and implementing a custom delegate to control editable data. It notes that delegates often duplicate code and presents a generic delegate class that can be used for any model without code duplication.
Object-Oriented Programming in Java
Java is a well-liked programming language that may be used to create a wide range of applications, from straightforward desktop programs to intricate web programs. It is an object-oriented programming language that enables programmers to create modular, reusable code, making it simple to maintain and update.
We shall look at the fundamentals of Java object-oriented programming in this tutorial. The fundamentals of object-oriented programming in Java, oops concepts such as classes and objects, inheritance, polymorphism, and encapsulation will all be covered. You will have a solid understanding of object-oriented programming in Java and how to use it to create robust and scalable programs at the end of this article.
Introduction to OOPs concept
Object-oriented programming in Java is a programming paradigm that revolves around objects. An object is a real-world entity that has a set of attributes and behaviors. In Java, even basic data types like integers and booleans are considered objects.
In OOPS, a program is designed by creating objects that interact with each other to perform tasks. Objects have attributes that define their properties and methods that define their behavior.
In Java, we create classes, which are templates that define the attributes and behaviors of objects. A class can be compared to an object creation blueprint. Once a class is defined, objects can be created based on that class.
Principles of Object-Oriented Programming
There are four main principles of object-oriented programming:
a. Abstraction
Abstraction is the process of hiding complex details and providing a simplified interface for the user. It helps developers to create simpler and more understandable models of a complex system, by just exposing only the required features and not the implementation part. In Java, abstraction can be achieved using interfaces and abstract classes.
b. Encapsulation
Encapsulation is the process of hiding the internal details of an object and providing a public interface for accessing and modifying the object. It helps in maintaining the integrity of the object and ensures that its internal state cannot be modified by external code. In Java, encapsulation can be achieved using access modifiers such as public, private, and protected.
Got confused between Abstraction and Encapsulation?
Abstraction is about simplifying the complexity of a system by focusing on its essential features, while encapsulation is about protecting the integrity of an object by hiding its internal details.
c. Inheritance
The process of creating a new class from an existing one is called Inheritance. The new class inherits the attributes and behaviors of the existing class and can add additional attributes and behaviors. This helps in reducing code duplication, promoting code reuse, and making the code more modular and maintainable. In Java, the extend keyword is useful for achieving inheritance.
d. Polymorphism
The ability of an
The document compares Eclipse, Netbeans, and Railo development tools. Both Eclipse and Netbeans are open-source integrated development environments (IDEs) that support development in multiple languages like Java, C/C++, and PHP. Railo is an open-source ColdFusion Markup Language (CFML) engine. Key differences include Eclipse having more advanced features while Netbeans may be better for beginners. Both provide rich APIs and support. Railo provides specific support for CFML development and integrates with tools like FusionDebug.
A System For Building Animated Presentations Over The WebSara Alvarez
This document describes Leonardo Web, a system for creating animated presentations for teaching and learning. It has three main components: the Builder visual editor, the Player viewer, and the Library script generation library. The Builder allows creating presentations by assembling key frames containing graphical objects. The Player can display presentations as standalone applications or web applets, supporting step-by-step or continuous playback. The Library allows generating animation scripts programmatically from Java code to batch-produce visualizations. Presentations can combine script generation and visual editing for flexibility.
This document discusses creating graphical user interfaces (GUIs) in Java. It covers the basics of GUI components like frames, buttons, and menus. It explains that AWT and Swing are the two main APIs for creating GUIs in Java, and that Swing is now more commonly used. The document provides code examples for creating simple window frames both with the AWT Frame class and the Swing JFrame class. It also discusses GUI layout and event handling.
Swing is a widget toolkit for Java. It is part of Sun Microsystems' Java Foundation Classes (JFC) — an API for providing a graphical user interface (GUI) for Java programs.
Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit. Swing provides a native look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform.ThesisScientist.com
UML allows for extending diagrams and modeling elements through three main techniques:
1. Stereotypes allow applying tags to existing modeling elements like classes, associations, etc. to add domain-specific meaning.
2. Profiles extend UML with new modeling elements tailored for specific domains or platforms.
3. Extension mechanisms allow precisely defining new constructs that integrate with the UML metamodel. Together these techniques make UML extensible for multiple domains.
This document outlines an agenda for an Android Study Jam session on user interfaces, layouts, and views. The session will cover topics like what user interfaces are, different views and view groups in Android like TextView and ImageView, various layouts like linear, relative and constraint layouts, and how to dynamically change content in views using Kotlin code. It will also discuss activities, intents and iterating over views using lists and recyclers. The session aims to help participants learn about building good user interfaces for Android apps.
Similar to The Unusual Suspect: Layouts for sleeker KDE applications (20)
PySide is a Python binding for the Qt framework that was developed by INdT to provide Python bindings under the LGPL license. It consists of PySide, which is imported, libpyside which handles Qt signals and slots, and libshiboken which helps interface Python and C++. Shiboken is the binding generator used to create the PySide bindings and can generate bindings for any C++ library. Currently, many Qt modules like QtCore and QtGui are supported. Future work includes improving the binding generation process and expanding platform support.
Connecting Technology for Great Experiences - How does QML and Web fit together?OpenBossa
The document discusses connecting technology for great experiences. It summarizes Kenneth Rohde Christiansen's presentation at the Bossa Conference in March 2010. The presentation discusses current technology trends like the ubiquity of the web, social networking, and the importance of personal data and fluid interfaces. It also discusses the power and limitations of using the web for applications. While the web provides access to existing content and services, it can be challenging to create responsive apps due to DOM manipulation overhead and lack of offline support. The presentation also highlights benefits of using Qt's declarative QML interface language for developing fluid, personalized user interfaces that support rapid development and animation.
This document introduces QML (Declarative UI) which allows describing user interface objects and properties in a declarative way and embedding JavaScript code. It discusses using QML to build user interfaces with animations and event handling. While QML is often used for mobile apps and small applications, it provides opportunities for designers to work more closely with developers. The document concludes by mentioning some features of QML and encouraging feedback on the ongoing Declarative UI project.
Este documento apresenta uma agenda para um treinamento básico sobre Qt que inclui uma introdução teórica, um almoço e uma sessão prática. Os palestrantes são Anselmo Lacerda Silveira de Melo e Eduardo Madeira Fleury do Instituto Nokia de Tecnologia e irão abordar tópicos como o que é Qt, quem usa, classes C++, modelo de objetos, sinais e slots e ferramentas Qt.
Developers have been facing increasingly stronger requirements
regarding application interfaces. Current UIs have to support
different resolutions, match different devices and be
themeable. Besides that, the technology used is ever-changing thus
trying to keep such applications with a fresh look may require a lot
of rework.
Many theories have been proposed for this problem but the actual
solutions not always work due to failures in real world
implementations.
The Unusual Suspect: Layouts for sleeker KDE applicationsOpenBossa
Now that KDE 4 has been available for some time, we can see that its good looks is one of its most appealing features. In the meanwhile, fluid and rich UIs became a standard in the mobile world. Together, these trends made users see their desktop from a new perspective, where software must go beyond functionality and look nice too.
High level initiatives like the Plasma new generation desktop, KWin composite effects and the new Oxygen themes, as well as low level ones like the Qt Animation Framework and the Declarative UI, are enabling us to reach such high level of user experience, something that used to be a 'plus' but is now a 'must'.
An often overlooked tool that helps making KDE aesthetically better is the Layouting mechanism. The simple idea of describing how things look instead of moving elements to hardcoded positions on the screen has great and unexplored potential. We want to show how KDE projects can take advantage of that.
This talk will cover flexible layouts, self-animated layouts and animation between different layouts, recent features we have been developing for Qt framework, together with Qt Software. Subjects will include the use cases that drove us, implementation constraints we had, APIs, usage and the benefits that arise from the use of such technologies.
Este documento apresenta uma agenda para um treinamento básico sobre Qt. A agenda inclui uma introdução teórica, um almoço, e depois uma sessão prática ("Hands on"). O treinamento também introduz os palestrantes e suas experiências com Qt e código aberto, além de apresentar os principais conceitos e ferramentas do framework Qt.
Hoje existe uma grande variedade de netbooks no mercado mas todos falham no quesito "experiência de usuário" devido ao fato dos fabricantes pensarem no netbook como um desktop menor ou até um grande computador de bolso. O projeto Plasma Netbook é sobre isso: levar os usuários o desktop do futuro (Plasma) e uma experiência de usuário nova sem perder identidade com a versão "completa" do KDE.
Durante a palestra serão mostradas diferentes ideias e conceitos presentes em diversos netbooks e onde suas interfaces falharam em proporcionar uma boa experiência ao usuário. O palestrante também irá falar dos principais usos dos netbooks e mostrar resultados de uma pesquisa envolvendo Linux, netbooks e o que realmente importa para o usuário final.
O status atual de netbooks baseados em Linux e o status atual do projeto Plasma Netbook serão mostrados, com um demo ao vivo e explicações sobre as soluções adotadas para os problemas mostrados durante nossa pesquisa.
Today we have a lot of different netbooks out there but all of them fail to deliver a good user experience because the people behind netbooks tend to think as it being a small desktop or a big 'pocket computer'. Plasma-MID is all about this: deliver the desktop shell of the future (Plasma) and a custom experience without losing identity with the 'full version' of KDE.
During my talk I'll show different concepts and ideas taken from various existing MID devices and where their interfaces failed to give the user an ideal experience. I'll also go through the most common use cases and show the results of research regarding linux, netbooks and what really matters to the end user.
The current status of linux based netbooks and the current status of the Plasma-MID project will also be shown, with a live demo and explanations about the solutions for the problems we found during our research.
Plasma has started to show its power as a development framework with the Plasma Netbook workspace shell. Not only a desktop shell effort, Plasma Netbook was the start to bring KDE to the next level, making it a real competitor to other solutions for netbook devices.
At least due to the success of the Plasma Netbook idea to create software suited for a mobile device, we started thinking about what a KDE phone look like. Instead of "putting your desktop" inside a different device, we are now thinking about how it would be possible for us to have a KDE-based mobile phone in the future.
Dividing and konquering, Plasma Mobile aims at creating a new experience for mobile phones, showing how KDE technology can enrich the user experience and bring more integration between the machines that are around the user, while simultaneously removing the focus from them and giving it to the user and his tasks.
Brasil, Open Source e o Mundo dos NegóciosOpenBossa
O documento discute o Instituto Nokia de Tecnologia e o mundo dos negócios de código aberto. O INdT realiza pesquisas em áreas como mecânica, software e eletrônica usando ferramentas e plataformas de código aberto. O documento também discute como as empresas e indivíduos podem se beneficiar do investimento no código aberto através de modelos de negócios inovadores, qualidade de software e aumento da inovação.
O documento discute como empresas podem gerar negócios através do open source. Ele apresenta exemplos de empresas que usam componentes de código aberto em seus produtos e serviços e discute modelos de negócio como fornecer serviços, licenciar software dualmente e vender módulos adicionais.
Things to Consider When Choosing a Website Developer for your Website | FODUUFODUU
Choosing the right website developer is crucial for your business. This article covers essential factors to consider, including experience, portfolio, technical skills, communication, pricing, reputation & reviews, cost and budget considerations and post-launch support. Make an informed decision to ensure your website meets your business goals.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfTechgropse Pvt.Ltd.
In this blog post, we'll delve into the intersection of AI and app development in Saudi Arabia, focusing on the food delivery sector. We'll explore how AI is revolutionizing the way Saudi consumers order food, how restaurants manage their operations, and how delivery partners navigate the bustling streets of cities like Riyadh, Jeddah, and Dammam. Through real-world case studies, we'll showcase how leading Saudi food delivery apps are leveraging AI to redefine convenience, personalization, and efficiency.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
The Unusual Suspect: Layouts for sleeker KDE applications
1. Akademy 2009 ~ Technical Papers July 3 to 11 2009 ~ Las Palmas, Gran Canaria, Spain
The Unusual Suspect:
Layouts for sleeker KDE applications
Eduardo Madeira Fleury Caio Marcelo de Oliveira Filho
openBossa/INdT openBossa/INdT
Recife, PE, Brazil Recife, PE, Brazil
eduardo.fleury@openbossa.org caio.oliveira@openbossa.org
ABSTRACT Layouts in Qt
This paper complements the homonimous talk presented at In the framework there are two families of visual elements,
Akademy 2009. It covers flexible layouts, self-animated Qwidget which represents the traditional Qt GUI
layouts and animation between different layouts, recent elements, and QgraphicsWidget, built on top of the
features we have been developing for Qt framework, Graphics View system. In this article, we'll assume the
together with Qt Software. Subjects include the use cases Graphics View family of widgets and its base layout class,
that drove us, implementation constraints we had, APIs, QGraphicsLayout, since our concrete work is built on
usage and the benefits that arise from the use of such that. However most of the discussion is also valid for
technologies. traditional family of widgets.
GENERAL TERMS AND KEYWORDS In Qt 4.5 (the latest release as of today), there are two
Flexible Layouts, Custom Layouts, Layout Animation, different basic layouts implemented in the Graphics View
Declarative UI system: QGraphicsLinearLayout, which essentially
arranges the items side by side (or vertically one on top of
INTRODUCTION the other), and QGraphicsGridLayout, which allow a
The Qt framework has in its graphics subsystem the notion more complex arrangement based on a table-like structure.
of Layouts, which are entities responsible for arranging the Curiously the linear layout is implemented using the same
visual elements, usually Widgets or other Layouts, on the engine as for the grid, but providing a simpler API.
screen.
Layouts in KDE
A given Widget can delegate the arrangement of its Applications in KDE make use of the existing layouts in Qt,
children widgets to a certain Layout, this delegation is but for specific user interfaces, some custom-made layouts
referred as installing the layout on the widget. By moving were developed. For QWidget, most of the layouts are
the arrangement logic into a separate class, it becomes
variations of Flow Layout example in Qt, which arranges
possible t Layouts o reuse that logic in different contexts,
the items in a similar way to the one in which words are
for different Widgets and children.
arranged in a paragraph or items are arranged in a HTML
It is not enough to install the layout in the widget, it is also page.
needed to add the items to the layout, since the layout may
The Graphics View subsystem has a few different layouts
need more parameters to know how to arrange the items
implemented, most of them as part of Lancelot [9], the most
(for example, the position on a grid).
interesting of them is the NodeLayout, which will be
The objective of this article is, first, to describe our explained better in the next section.
explorations of the Layout idea:
As of today, there is no work related to animation based on
1. Implementation of a different and powerful layout, layouts, in neither of the senses that we are going to explain
based on the idea of anchoring sides of children to in this text: animation inside a custom layout or animation
each other. between two layouts.
2. The use of Custom Layouts to create specific interfaces
FLEXIBLE LAYOUTS
from Interaction Designers specifications.
Flexible layouts are layouts in which most of the behavior
3. The animation of screen states using layouts. is configured after the creation of the layout. In other
words, part of the implementation of how the items are
And second, to illustrate how these enhanced uses of going to be arranged is done by calling methods on the
layouting can be used to improve KDE and Qt applications, layout object.
making them not only more beautiful but also keeping the
benefits of layout usage. With an API to configure the items in the layout it is
1
2. Akademy 2009 ~ Technical Papers July 3 to 11 2009 ~ Las Palmas, Gran Canaria, Spain
possible to make high level tools usable by designers. This points and anchors. The former are special points each item
makes it possible for them to setup the application layouts have (right, left, top and bottom edges, as well as its
rather than requiring a C++ developer for that task. center). The latter represent links between two anchorage
points and can be created from one item to another, or from
A Flexible layout is more a tool to build layouts than a
one item to the layout frame itself. The logic is the same for
ready to use layout (which you just add and remove items).
vertical and horizontal anchoring, so we'll illustrate only
Note that this classification is not ``all or nothing'', for
one dimension.
example, the QGraphicsLinearLayout can be used
by just adding the items, but also have some parameters For example, one can anchor the right side of item A with
configured, like margins and item spacings. the left side of item B. So when the layout set the geometry,
one restriction that the layout will respect is that the two
Concrete Implementations items are glued together. In other words, the layout will
There are different implementations of this Flexible layout enforce that the distance between these two edges is equal
idea. One example, outside Qt and KDE, is the Edje to the length of the anchor created between them.
layouting mechanism. Edje is part of the Enlightenment
It follows that anchoring the item to the layout in both
Foundation Libraries [10], a set of lightweight libraries
sides, will make the item grow together with the layout.
used for E17 window manager and also many embedded
This property allows us to configure the items in a way they
applications.
will scale, which is a desired property for a Qt layout.
Edje layouting is done by defining a set of areas defined by
coordinates relative to the parent widget1 or to other areas in Linear programming
the layout. Edje also has support to define different states to There are other implementations of anchor-based layouts in
those areas. other libraries but our understanding is that most of these
have limitations that prevent them from being used by end
Then items can be added to those areas, in most cases users. Some like Java's SpringLayout seems to work as a
images, widgets from other existing libraries and other Edje tool for layout designers to use as their engine. Others while
layouts. For many interfaces that we dealt with, this proved targeted at the end user, require too much concern from him
to be more effective than mapping the designer's mockups with regard to the way the anchors are created. In many
into vertical and horizontal boxes. cases a slightly misplaced anchor leads to a situation where
A similar layout present in KDE codebase is the the layout is unable to calculate its geometries.
NodeLayout used in Lancelot. The idea is that you add Given that experience, when developing an AnchorLayout
items with a pair of textit{nodes} which are points for the Qt framework, we decided we would like a layout
representing the top-left and the bottom-right corners. It is that were both robust and easy to use.
simpler than Edje, in the sense that the nodes can be
specified relative to the parent widget, but not relative to While such a flexible layout provides countless possibilities
other nodes. to the users, it also allows them to fall into linear
dependencies, inconsistent setups and other corner-cases
Anchor Layout that could risk the whole user experience. Avoiding such
Another example of Flexible layout is the situations was an obstacle the implementation of such
QGraphicsAnchorLayout, a layout that is being layout had to deal with.
developed by openBossa together with Qt Software and An anchor layout is fun to use as long as the user does not
should be integrated at the Qt main repository soon. Its have to worry about
development was motivated by two main goals: to provide
a way of designing layouts that is accessible to UI designers anchor dependencies or the order in which he creates them.
and to act as a powerful layout for applications that That meant the layout itself could not make hard
currently set their geometries manually or with a series of assumptions of how would the anchors be created and
simpler layouts. instead, it had to be solid enough to withstand some sort of
abuse by those creating the anchors.
In most cases, one Anchor Layout can substitute a series of
nested Vertical and Horizontal linear layouts, the layouts Given such situation, we decided to use a Linear
that are normally used to build complex arrangements of Programming approach to optimize the distribution of the
items on the screen. items. From the items and anchors the layout identifies its
constraints and its objective function which are then passed
An anchor layout is based on two concepts: anchorage to a Linear Programming solver. While that might seem as
an implementation detail, it explains why
1
This terminology is not exactly the one used by Edje developers, QGraphicsAnchorLayout handles anchor setups that
but the analogy holds. In Edje the layout itself also acts as the
cause similar layouts to fail.
parent widget.
2
3. Akademy 2009 ~ Technical Papers July 3 to 11 2009 ~ Las Palmas, Gran Canaria, Spain
CUSTOM LAYOUTS or removal of an item triggers a complete change in the
Another important family of advanced layouts are those we layout organization. In this case it was easier to create an
call Custom. In opposition to the very versatile layouts we appropriate engine than to deal with creation and
talked about earlier, these are rather specific classes, destruction of several anchors each time an item was added
tailored to the very special needs of each situation. or removed.
When comparing the two families of layouts, there is no
Animations
answer to the question regarding which one is the best.
The Canola Layout example shows another feature that is
Instead, the idea is to understand the differences between
often a requirement in applications with rich UI (user
them so the right tool for the right task can be used.
interfaces) – animations. Designers can ask developers to
animate the addition of items, their removal and finally,
Creation
Important differences exist between Flexible and Custom changes in their position.
layouts, among those is the different creative processes that When creating Custom layouts, it is easy to add such
are associated to each one of them. The creative process for animations, and further than that, it is easy to keep the dirty
Custom layouts is different because each Custom layout is work inside the layout class itself. By keeping all the magic
implemented as a layout class of its own. This means that is hidden, we ensure that users only have to worry about
not possible to instantiate a ready-made layout and using the layout, nothing more.
configure it as we did with AnchorLayout, for instance.
LAYOUTS OF WIDGETS?
As before, the high level ideas come from the designers.
The idea of Custom Layouts described before has some
Usually though, those are not able to use standard similarities with the existing widgets dedicated to work as
programming languages to implement the actual layout containers, like the classes of Qt ItemViews or ItemViews-NG (a
classes. This means that developers must collaborate in this research project in Qt Labs).
creative process.
A container widget is a widget focused in displaying a set of data
Developers must come up with a procedural method for (in Qt usually this data is available through a Model class). The
calculating the geometries of the items on the screen, based most common container widgets are lists and grids that create
on the designers feeling of what is beautiful. In other words, visual representations once given the data representing their
elements.
they must come up with an algorithm to model their way of
thinking. These representations can be customized, by using factories of
widgets for handling elements, in Qt4 the factories are called
The algorithm is then implemented in the form of a layout delegates, and in ItemViews-NG they are item creators. The
engine. This is usually harder and more costly than factory creates a visual element for a given piece of data.
allowing the designers to configure existing layouts. As an
If you think about the previous Canola Layout example, assuming
example, we could have a high level tool to help designers
that we have a list of icons and that items would be represented by
create the anchors for an AnchorLayout, while for custom those icons,
layouts, C++ knowledge is required.
a different implementation could be: to use the same engine as
Usage before, but implementing a container widget. The parent
While the creation of a Custom layout can be complex, it (container) widget would accept a list of icons and use a factory to
create the necessary children widgets.
pays itself in some situations.
Other examples of container widgets are:
The first advantage is that once a Custom layout class is
created, it can be used like a ready-made Qt layout. All that • a taskbar: the data is the window information, and the factory
is needed is to instantiate the class and add items, then its creates buttons to represent that window;
up with the engine to do its job. • a grid of photos: the data is a list of pictures, and the factory
Furthermore, depending on the way the engine was created, creates a widget that can show one of these pictures.
the addition and removal of items is straightforward. • a list of songs: the data is a list of song objects, and the
Simply add or remove the items and it works out of the box. factory creates a widget that show selected information from
Compare that to the use of AnchorLayout, in that case new song objects.
Anchors would have to be created each time an item was Note that when using those specialized container widgets, you can
added. abstract away the presentation elements -- and even encapsulate
Finally, it is interesting to use specialized layout engines them in the container widget. The focus is to provide the correct
data so the view will show it correctly. This separation is present
when the desired behavior has a complexity that goes
in both Qt4 and ItemViews-NG and allows to easily swap the
beyond the boundaries of what Flexible layouts can do. visual representation.
For instance, in the Canola Layout example [5] the addition
3
4. Akademy 2009 ~ Technical Papers July 3 to 11 2009 ~ Las Palmas, Gran Canaria, Spain
The similarities with layouts lie mostly on the fact that both • Create the second layout (a grid).
Layouts and Container Widgets are responsible for positioning the
children on the available screen space. However, the layout is just • Fill the second layout with the same items, in a
that, while the container widget is a more complex entity. different distribution.
Essentially, it is possible to derive a Container Widget from a Usage:
Layout and a Factory that is capable of converting model
information into proper widgets. Using layouts is more adequated • Apply the first layout.
in the case that the model information is complex enough that it is
better encapsulated in widgets. For example, a complex taskbar • When needed, take the current layout out of the widget
integrated with a notification area API, in which the different and apply the new one, repeat.
windows would be represented by custom widgets. In this case a
layout is more fit to the job than making a widget that accepted Taking a Layout from QgraphicsWidget
other widgets as models. In the existing versions of Qt, there was no way of
Sometimes you can both create a custom layout or create a custom removing a layout from a QgraphicsWidget without
container widget, for example, the Canola Layout previously causing it to be deleted. The same is true for QWidget
shown, could be designed as a parent widget that set the children class, which is out of the scope of this document. Therefore,
position using the same engine as the layout. If the application if one wanted to keep switching between two layouts, he
does not need arbitrary widgets in the Canola grid, the parent would have to keep iterating on the following process:
widget could simply have a method to add a new item for a given
image, or even having this information in a separated model. • Create a new layout.
The solutions provide different benefits, the layout can be reused • Add widgets to it.
in other contexts, with arbitrary widgets; on the other hand the
container widget can provide specialized ways to add children and • Apply the new layout in the widget (causing the
can result in a simpler code if the children widgets are all similar. deletion of the previous one).
MULTIPLE LAYOUTS This was not practical nor elegant. That's why we added the
In rich UI applications, designers try to make application events be QGraphicsWidget::takeLayout() method to
represented in a nice way on the screen. This usually requires remove a layout from a widget without deleting it.
widgets to grow, shrink and move around, into or out of the
screen. Adding an Item to Several Layouts
As a result we have that, while a given layout can suit the At that point we had the ability to remove a layout from a
distribution we need in some situations, the same may not be true widget to reuse it later. However, we still could not create
when a change in the items distribution is required. In that case, several layouts and keep them ready to use.
we may need not one, but several layouts, one for each
distribution. In other words, we would like a group of layouts to In order to do that, we would have to add the same set of
swap among. widgets to more than one QGraphicsLayout at the same
time, what was not possible in Qt. Talking to the developers
Unfortunately though it was not easy to swap between layouts in
Qt. In the following subsections we explain the most important at Qt Software, we came up with the solution of creating a
changes made to make that possible and fulfill the requirements new kind of layout element that would act as a proxy
set. between the actual widget and the layouts.
From Qt Software we had two important requirements. The first The idea was to create several layout proxies and have all
was not to break binary compatibility, this is only acceptable of them pointing to a single QGraphicsWidget, then we
between major release versions. The second was to support would add the proxies to the different layouts (one proxy in
existing third-party layouts, rather than simply modifying the each layout) instead of trying to add the same widget to
built-in Qt layouts to support the new functionality.
more than one layout.
The Desired Usage For example, we would like to add a button to both a linear
Our goal was to be able to create all the layouts we wanted layout and a grid layout. In order to that we now create two
only once and then use them appropriately, talking high proxies, add one of them to each layout and finally, have
level, see the following example: the proxies pointing at the shared button widget.
Setup: While that is not as straightforward as simply adding the
same buttons to several layouts, this approach required less
• Create the items of my screen (two buttons, a text box,
intrusive changes in Qt and supports existing layouts, as
etc).
explained earlier.
• Create the first layout (a linear layout, for instance).
Animation Between Layouts
• Fill the first layout with the items in the correct order. We were already able to switch between layouts, and that
4
5. Akademy 2009 ~ Technical Papers July 3 to 11 2009 ~ Las Palmas, Gran Canaria, Spain
was good. However there are the designers, and with them, Y position of an item. Once we define that an item has its X
the question: “OK, you have two layouts, but it is so ugly to position equal to the right edge of another item, we have
swap them at once! Can't you just ask them to animate created an anchor. Similarly, we can define the width of an
too?” “Sure..., we said. item to be equal to 2/3 the size of another item. That is how
Edje's parametric layouting system work.
The idea once again was to add animation support to all
existent layouts,thus modifying QGraphicsLayout So, how do we compare that to the layouts we explained
instances was not an option. The solution was to add before? These methods are complementary, with the
animation capability to the same proxies that allowed us to following differences:
solve the previous issue.
Real layouts:
Proxies were then blessed with QAnimations, and so
• A separate entity that takes care of the items.
their task became slightly different. They were then
responsible for running an animation between the current • Only handles geometries.
item geometry and the new one, rather than simply
forwarding the setGeometry() call as they used to do. • Uses a specialized C++ implementation.
Property propagation:
LAYOUTS IN DECLARATIVE UI
At the time of this writing, the layouts available for use in • No external entities are required.
Qt Declarative UI are not compatible with • Handles anything that can be exported as a property.
QGraphicsWidgets. Instead, they are based on an
alternative item class called QFxItems, which is out of the • Implemented using Qt Script and recursion.
scope of this document. From those differences it is important to note that for some
Declarative UI is under heavy development and work is uses like binding colors, transparencies, states and
being done with regard to the addition of standard everything apart from geometries, property binding is the
QGraphicsLayouts support. In the following sections solution. When it comes to geometries though, some care
we assume this will be ready in the short-term future. We must be taken.
understand that support for both Flexible and Custom By using a specialized implementation, layouts can be
layouts should be available in Declarative UI. faster and more powerful than properties. When using
To enable the use of Flexible layouts we must ensure that property propagation to bind together the geometries of
there is proper API to configure such layouts. To declare several items, it is easy to follow in a circular dependency
the anchors, for instance. Custom layouts on the other hand, problem or to loose track of the intended setup.
are implemented as third-party classes. This means that Furthermore, the code can become hard to maintain with
Declarative UI files must support custom keywords and geometry constraints spread among the declaration of
custom user classes for the latter to work. distinct items. In such cases, having an entity whose only
task is to manage geometries is a faster, more maintainable
Property Propagation and more scalable solution.
The Qt Declarative UI project introduced a powerful feature
called Property propagation. It allows users to associate CONCLUSION
script expressions to object properties. This means that From our experience with Qt Layouts, we understand that
properties like transparency, color, position and size, that these layouting tools can be used in existing and new KDE
otherwise would be attributed fixed values, can now be applications in order to improve their appearance as well as
bond to a mathematical expression involving values from the user experience they provide.
other items' properties and constants, to be constantly Part of our current work is being integrated right into the Qt
evaluated. main repository. We are also working on examples based
Such feature can be used to bind one item's behavior to on real KDE applications that can benefit from such tools
those of others. For instance, one item can be set to follow and will release them as soon as they are ready.
the color of another one. Or else, its size can be defined to
be the sum of the sizes of other two. In the layouting ACKNOWLEDGEMENTS
context, property propagation can be used in a similar The content exposed in this paper result from the
fashion to how Anchor Layout is used, it is easy to simulate cooperative work that has been done by the authors together
part of the features of the anchors by setting the geometry with their co-workers at the openBossa labs and the
properties of the items involved. developers from Qt Software.
In Declarative UI there are properties that define the X and We would like to thank everyone that contributed to this
5
6. Akademy 2009 ~ Technical Papers July 3 to 11 2009 ~ Las Palmas, Gran Canaria, Spain
work. In special the KDE e.V. for their support, our co- 5. Canola Layout.
workers Anselmo Lacerda Silveira de Melo, Artur Duque http://www.youtube.com/watch?v=eJcTBJaPRZg
de Souza, Jesus Sanchez-Palencia and Renato Chencarek.
6. Eduardo Madeira Fleury’s Blog.
Thanks also to those at Qt Software: Andreas Aardal
http://eduardofleury.com
Hanssen, Jan-Arve Sæther and Alexis Ménard.
7. Linear Programming.
REFERENCES http://en.wikipedia.org/wiki/Linear_Programming
1. OpenBossa Labs. http://www.openbossa.org 8. Ivan Cukić post on NodeLayout.
2. OpenBossa Channel on YouTube. http://ivan.fomentgroup.org/blog/2007/10/13/nodelayout-
http://www.youtube.com/openbossa for-plasma/
3. Qt Software. http://www.qtsoftware.com 9. Lancelot Application Launcher.
http://lancelot.fomentgroup.org
4. AnchorLayout in Gitorious. http://qt.gitorious.org/
+openbossa-developers/qt/openbossa- 10. Enlightenment Foundation Libraries.
clone/commits/anchorlayout http://www.enlightenment.org/p.php?p=about/efl
6