From owner-freebsd-libh Tue Jan 23 13:38:54 2001 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id DD1DB37B69C for ; Tue, 23 Jan 2001 13:38:02 -0800 (PST) Received: (from alex@localhost) by usw4.freebsd.org (8.11.1/8.11.1) id f0NLaVx13456 for libh@FreeBSD.org; Tue, 23 Jan 2001 15:36:31 -0600 (CST) (envelope-from alex) Message-Id: <200101232136.f0NLaVx13456@usw4.freebsd.org> From: Alexander Langer Date: Tue, 23 Jan 2001 15:36:08 -0600 (CST) To: libh@FreeBSD.org Subject: cvs commit: libh/lib/hui Hui.cd.cc Hui.hh HuiTVision.cc HuiTVision.hh Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG alex 2001/01/23 15:36:08 CST Modified files: lib/hui Hui.cd.cc Hui.hh HuiTVision.cc HuiTVision.hh Log: I'm very happy about this commit. It cleans up a BIG design fault. Instead of duplicating almost every function between the GroupWidget and ContainerWidget function (e.g. the arrangement stuff or the adding of child-widgets, which are just the same functions - byte by byte), just make use of a C++ feature: Multiple inherintances. Class ContainerWidget now derives from Hui(Qt)::Widget _and_ Hui(Qt)::GroupWidget. It shares the functions, that make it an embedded widget from Widget and the ones that make it a parent from GroupWidget This save a LOT lines of code and make maintaince a lot easier. A lot of casts, which I had to add in the past to distinguish between Container/GroupWidgets, can now be removed again (not yet done). The UI source is much cleaner now! Revision Changes Path 1.17 +2 -254 libh/lib/hui/Hui.cd.cc 1.14 +18 -82 libh/lib/hui/Hui.hh 1.21 +26 -453 libh/lib/hui/HuiTVision.cc 1.18 +99 -176 libh/lib/hui/HuiTVision.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message