Extension question -- spectra extension added

I’ve moved the vibrationplot.* out to the vibrations extension and
into it’s own Spectra extension. I’m running into a bug I can’t quite
track down:

Open the Spectra extension from the menu without a molecule loaded (or
with, it doesn’t matter). An error pops up about there not being a
molecule, the plot dialog comes up, so far so good. Now close the
dialog and try to re-open it from the menu – nothing happens. It
should open back up.

Any ideas? Feel free to pull my repo,
git://github.com/dlonie/avogadro.git to point out my mistake :slight_smile:

Other than that, I think I’m happy with the capabilities of the
extension and will start adding in other spectra types. If anyone has
some calculated spectra that they’d like added, please send me:
a) A supported output file of some simple example molecule
b) A reference spectrum of the example molecule
c) The input file used to generate the output
d) Any additional info about what you’d like to have the ability to customize

I think we’re getting close to publication quality images from this –
I just need to add in support for
pdf/ps/svg/some-scale-friendly-format, and a dpi setting. Here’s a
nice preview using the methanol.nwo (thanks Michael for adding in
support for this so quickly!) and methanol.jdx files I just added to
testfiles:

http://drunks.servebeer.com/david/misc/test.png

The labels are a little funky, but they can be turned off. I think the
plotwidget just needs to mask the plotted points in addition to the
other labels when painting.

Dave

On Fri, Apr 3, 2009 at 11:29 PM, David Lonie loniedavid@gmail.com wrote:

I’ve moved the vibrationplot.* out to the vibrations extension and
into it’s own Spectra extension. I’m running into a bug I can’t quite
track down:

Open the Spectra extension from the menu without a molecule loaded (or
with, it doesn’t matter). An error pops up about there not being a
molecule, the plot dialog comes up, so far so good. Now close the
dialog and try to re-open it from the menu – nothing happens. It
should open back up.

Any ideas? Feel free to pull my repo,
git://github.com/dlonie/avogadro.git to point out my mistake :slight_smile:

Aha, nvm – I found it:

 if (!m_dialog) {
   m_dialog = new SpectraDialog(qobject_cast<QWidget*>(parent()));
   m_dialog->setMolecule(m_molecule);
  •  m_dialog->show();
    
    }
  • m_dialog->show();