From kde-core-devel Tue Apr 08 08:58:02 2008 From: "Aaron J. Seigo" Date: Tue, 08 Apr 2008 08:58:02 +0000 To: kde-core-devel Subject: Re: Skanlite (was Glimpse) and libksane Message-Id: <200804080258.02963.aseigo () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=120764468024554 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart2236195.uTERVaGCsp" --nextPart2236195.uTERVaGCsp Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 08 April 2008, K=C3=A5re S=C3=A4rs wrote: > On Friday 04 April 2008, Aaron J. Seigo wrote: > > > > * what is the ">>>> 20 Shut of lamp <<<<" thing on the Other Options > > > > tab? > > > > > > You have found a sane option that libksane can't handle :) > > > > ah, ok .. curious: how does one go about making libksane handle it? =3D) > > e.g. which class(es) would i look into first? > > I guess this option could be a handler for a button on the scanner and at > the moment there is no handling for those. > Every option/parameter is a SaneOption object, so I guess sane_option.cpp > is a good start. ok.. btw, code like this: if (frame !=3D 0) delete(frame); is needless. deleting a null ptr is just fine. so you can just do: delete frame; > > that's fine: use a QGridLayout insert all the labels in column 0 with > > alignment Qt::AlignRight; for all the widgets to the right of the label= s, > > make sure each row of them is in their own hboxlayout (with 0 margins) > > and insert that layout into column 1. voila. > > Every visible option has it's own frame with a grid layout. I have built = an i think that's not the best way to go about it... since this code is intern= al=20 to the library and doesn't to be amazingly elegant ;) what i'd probably do = is=20 alter SaneOption by splitting frame() into QWidget *label() and QWidget=20 *controls(). then in SaneWidget right after a createWidget call, i'd do something like: if (option->label()) { if (!option->controls()) { // with a control, we assume this to be informational? layout->addWidget(currentRow, 0, 1, 0, option->label()); } else { layout->addWidget(currentRow, 0, option->label(), Qt::AlignRight); } } if (option->controls()) { layout->addWidget(currentRow, 1, option->controls()); } ++currentRow; but that's just me =3D) > Would libksane need to be moved from extragear to kdereview for a review > cycle before a move to kdegraphics? no ... has there been a final conclusion between you and the kooka dev? > I have not seen/noticed objections to moving Skanlite to > extragear/graphics/. Is it OK to move it later this week? +1 from me. =2D-=20 Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Trolltech --nextPart2236195.uTERVaGCsp Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQBH+zOa1rcusafx20MRAiwQAJ9VGqcRiUls4z0DInJNjztSWhdKiQCeIj+F 4mhOGElNlTqlYgrLks6IVpM= =UTl0 -----END PGP SIGNATURE----- --nextPart2236195.uTERVaGCsp--