Fwd: Cartesian editor

Hi,

That’s great you have merged my new cartesian editor! However, there are several related problems:

  1. Since it’s my first Avogadro extension, I’m not absolutely shure I’ve made all connects/disconnects properly.
  2. I’ve used font family “Monospace”, because with standard font editor doesn’t look fine. I’m not sure if it does not break portability
  3. I’ve used fixed value of font size “10” in cartesianeditor.ui to make font slightly bigger than other in UI, but if system default is not “9” it seems too big. Maybe change it inside code to somethink like “default+1”?
  4. General problem of all “Properties” extensions is problem of multiple undos. Currently, extension supports only one undo operation, and it needs to be returned when extension starts. Properties extension makes non-modal dialogs, and if user changes several values, no undo is available, but ideally change of every parameter must have undo. Since I’ve started new cartesian editor using properties extension as reference, I’ve also made it non-modal
  5. Since it is non-modal, if user changes molecule, coordinates in editor are changed. But I didn’t find proper signal of molecule to connect with for changing coordinates on manipulations. moleculeChanged is emitted only if atoms were added/removed, atomUpdated isn’t emited on atom movements. What signal should be used?
  6. I’ve blocked old editor. If you think it isn’t useful anymore, dead code should be removed (not only commented by me, but also in propmodel.cpp. Another ways are to transofm it into fractional coordinate editor for xstallography, as it was requested recently, or move coordiantes’ columns into atom propertied dialog

04.11.09, 00:01, “Marcus D. Hanwell” :

I think the new Cartesian editor looks great, but should remain
in master only IMHO - it has new features, UI, strings, and does not
conform to our indentation style.

I see it doesn’t follow Human Interface Guides of KDE4, but I’ve tried to make it maximally ergonomic for people working in quantum chemistry (and quite convenient for others). It’s not usual text editor and shouldn’t be.
If you have ideas about UI improvement, I’ll change it gladly


Regards,
Konstantin

-------- Завершение пересылаемого сообщения --------


Regards,
Konstantin

Почта с приветом находится здесь: http://mail.yandex.ru/promo/new/cards

Hi Konstantin,

I may be able to help with a couple of these :slight_smile:

  1. I’ve used fixed value of font size “10” in cartesianeditor.ui to
    make font slightly bigger than other in UI, but if system default is
    not “9” it seems too big. Maybe change it inside code to somethink
    like “default+1”?

Take a look at QApplication::font().pointSize(). Is this what you are
looking for?

http://doc.trolltech.com/4.5/qapplication.html#font
http://doc.trolltech.com/4.5/qfont.html#pointSize

  1. Since it is non-modal, if user changes molecule, coordinates in
    editor are changed. But I didn’t find proper signal of molecule to
    connect with for changing coordinates on
    manipulations. moleculeChanged is emitted only if atoms were
    added/removed, atomUpdated isn’t emited on atom movements. What
    signal should be used?

I’m not sure about this, but maybe Avogadro::Primitive::updated(),
which Atom/Molecule inherit?

Another ways are to transofm it into fractional
coordinate editor for xstallography, as it was requested recently,

I requested this, and planned to add it myself at some point, but I
probably wouldn’t get to it for a while. So, if you’d like to put it
in, be my guest :slight_smile: If you are going to, I just wanted make you aware
of OpenBabel::OBUnitCell::GetFractionalMatrix()
http://openbabel.org/api/2.2.0/classOpenBabel_1_1OBUnitCell.shtml#2ac2c43b65936f802681d33aff49bc25
which makes the whole operation much easier.

“Marcus D. Hanwell” wrote: > I think the new Cartesian editor looks
great, but should remain > in master only IMHO - it has new features,
UI, strings, and does not > conform to our indentation style.

I see it doesn’t follow Human Interface Guides of KDE4, but I’ve
tried to make it maximally ergonomic for people working in quantum
chemistry (and quite convenient for others). It’s not usual text
editor and shouldn’t be. If you have ideas about UI improvement,
I’ll change it gladly

I believe Marcus is refering to how the code is indented, not the
output in the widget. We use the KDE conventions for code style:

http://techbase.kde.org/Policies/Kdelibs_Coding_Style

Hope this helps!

Dave

Konstantin Tokarev wrote:

Hi,

That’s great you have merged my new cartesian editor! However, there are several related problems:

04.11.09, 00:01, “Marcus D. Hanwell” :

I think the new Cartesian editor looks great, but should remain
in master only IMHO - it has new features, UI, strings, and does not
conform to our indentation style.

I see it doesn’t follow Human Interface Guides of KDE4, but I’ve tried to make it maximally ergonomic for people working in quantum chemistry (and quite convenient for others). It’s not usual text editor and shouldn’t be.
If you have ideas about UI improvement, I’ll change it gladly

Hi Konstantin,

I think it is a great addition, there are a few rough edges but they can
be worked out in master. My time has been very limited these last few
weeks as I began a new job in a new area on 1 October, and to add to
that have a new family (five month old baby).

We also just had our first stable release, and I think everyone is
getting used to that. I think that this editor belongs in master, and we
can work on any remaining issues there. I think we should be very
careful with the 1.0 branch, and most developers should not be too
concerned with it unless there are bugs that need fixing.

Thanks for contributing the Cartesian editor, I am very pleased to have
a new contributor adding cool functionality. We can test portability etc
as we ready master for a new stable release. I will also be looking into
getting the dashboards up and running again.

Thanks,

Marcus

  1. In my cartesian editor I’ve written a fuction which obtains number of element from its IUPAC name. It’s possible to move it into OpenBabel, if anybody other needs such functionality
  2. If toggle button betweeen two versions of editor is needed, two extensions (cartesianextension and propextension) will depend on each other. Is it OK?

Take a look at QApplication::font().pointSize(). Is this what you are
looking for?
http://doc.trolltech.com/4.5/qapplication.html#font
http://doc.trolltech.com/4.5/qfont.html#pointSize

Unfortunately, it doesn’t work. Since font size is default, fontPointSize() returns 0


Regards,
Konstantin

  1. Since it is non-modal, if user changes molecule, coordinates in
    editor are changed. But I didn’t find proper signal of molecule to
    connect with for changing coordinates on
    manipulations. moleculeChanged is emitted only if atoms were
    added/removed, atomUpdated isn’t emited on atom movements. What
    signal should be used?
    I’m not sure about this, but maybe Avogadro::Primitive::updated(),
    which Atom/Molecule inherit?

I’ve connected this signal, but it doesn’t work.

Regards,
Konstantin