WARNING: Seems to need qt 4.1.1 to work correctly
This uses QT resources to link the icons directly into the application, so
they'll always show up, even when not being run from the source directory.
Of course in practice it seems like qt 4.1.0 has a bug so the resource
feature doesn't quite work right.
+qrc_(^|/)*$
+(^|/)mussagl.app($|/)
# mussa specific thingies
\.museq$
\.muway$
# mussa specific thingies
\.museq$
\.muway$
--- /dev/null
+<!DOCTYPE RCC>
+<RCC version="1.0">
+<qresource>
+ <file>icons/exit.png</file>
+ <file>icons/filenew.png</file>
+ <file>icons/fileopen.png</file>
+ <file>icons/filesave.png</file>
+ <file>icons/help.png</file>
+ <file>icons/image2.png</file>
+ <file>icons/info.png</file>
+ <file>icons/lock.png</file>
+ <file>icons/motif_icon.png</file>
+ <file>icons/viewmag.png</file>
+</qresource>
+</RCC>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
int main(int argc, char **argv)
{
QApplication app(argc, argv);
+ Q_INIT_RESOURCE(icons);
Mussa *analysis = initialize_mussa(argc, argv);
if (analysis == 0) {
Mussa *analysis = initialize_mussa(argc, argv);
if (analysis == 0) {
alg/nway_paths.cpp \
alg/parse_options.cpp \
alg/sequence.cpp
alg/nway_paths.cpp \
alg/parse_options.cpp \
alg/sequence.cpp
mussaViewTB.addAction(toggleMotifsAction);
mussaViewTB.addAction(toggleMotifsAction);
- zoomLabel.setPixmap(QIcon("icons/viewmag.png").pixmap(16, 16));
+ zoomLabel.setPixmap(QIcon(":/icons/viewmag.png").pixmap(16, 16));
zoomLabel.setToolTip(tr("Zoom"));
zoomLabel.setWhatsThis(tr("Zoom magnification factor"));
mussaViewTB.addWidget(&zoomLabel);
zoomLabel.setToolTip(tr("Zoom"));
zoomLabel.setWhatsThis(tr("Zoom magnification factor"));
mussaViewTB.addWidget(&zoomLabel);
// the ever popular about box
aboutAction = new QAction(tr("&About"), this);
connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
// the ever popular about box
aboutAction = new QAction(tr("&About"), this);
connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
- aboutAction->setIcon(QIcon("icons/info.png"));
+ aboutAction->setIcon(QIcon(":/icons/info.png"));
// add exit
closeAction = new QAction(tr("&Close"), this);
closeAction->setStatusTip(tr("Close this window"));
connect(closeAction, SIGNAL(triggered()), this, SLOT(close()));
// add exit
closeAction = new QAction(tr("&Close"), this);
closeAction->setStatusTip(tr("Close this window"));
connect(closeAction, SIGNAL(triggered()), this, SLOT(close()));
- closeAction->setIcon(QIcon("icons/exit.png"));
+ closeAction->setIcon(QIcon(":/icons/exit.png"));
createNewAnalysisAction = new QAction(tr("Define Analysis"), this);
connect(createNewAnalysisAction, SIGNAL(triggered()),
this, SLOT(createNewAnalysis()));
createNewAnalysisAction = new QAction(tr("Define Analysis"), this);
connect(createNewAnalysisAction, SIGNAL(triggered()),
this, SLOT(createNewAnalysis()));
- createNewAnalysisAction->setIcon(QIcon("icons/filenew.png"));
+ createNewAnalysisAction->setIcon(QIcon(":/icons/filenew.png"));
createSubAnalysisAction = new QAction(tr("Define SubAnalysis"), this);
connect(createSubAnalysisAction, SIGNAL(triggered()),
createSubAnalysisAction = new QAction(tr("Define SubAnalysis"), this);
connect(createSubAnalysisAction, SIGNAL(triggered()),
loadMotifListAction = new QAction(tr("Load Motif List"), this);
connect(loadMotifListAction, SIGNAL(triggered()),
this, SLOT(loadMotifList()));
loadMotifListAction = new QAction(tr("Load Motif List"), this);
connect(loadMotifListAction, SIGNAL(triggered()),
this, SLOT(loadMotifList()));
- loadMotifListAction->setIcon(QIcon("icons/fileopen.png"));
+ loadMotifListAction->setIcon(QIcon(":/icons/fileopen.png"));
loadMupaAction = new QAction(tr("Load Mussa Parameters"), this);
connect(loadMupaAction, SIGNAL(triggered()),
this, SLOT(loadMupa()));
loadMupaAction = new QAction(tr("Load Mussa Parameters"), this);
connect(loadMupaAction, SIGNAL(triggered()),
this, SLOT(loadMupa()));
- loadMupaAction->setIcon(QIcon("icons/fileopen.png"));
+ loadMupaAction->setIcon(QIcon(":/icons/fileopen.png"));
loadSavedAnalysisAction = new QAction(tr("Load &Analysis"), this);
connect(loadSavedAnalysisAction, SIGNAL(triggered()),
this, SLOT(loadSavedAnalysis()));
loadSavedAnalysisAction = new QAction(tr("Load &Analysis"), this);
connect(loadSavedAnalysisAction, SIGNAL(triggered()),
this, SLOT(loadSavedAnalysis()));
- loadSavedAnalysisAction->setIcon(QIcon("icons/fileopen.png"));
+ loadSavedAnalysisAction->setIcon(QIcon(":/icons/fileopen.png"));
saveMotifListAction = new QAction(tr("Save Motifs"), this);
connect(saveMotifListAction, SIGNAL(triggered()),
this, SLOT(saveMotifList()));
saveMotifListAction = new QAction(tr("Save Motifs"), this);
connect(saveMotifListAction, SIGNAL(triggered()),
this, SLOT(saveMotifList()));
- saveMotifListAction->setIcon(QIcon("icons/filesave.png"));
+ saveMotifListAction->setIcon(QIcon(":/icons/filesave.png"));
showMussaViewToolbarAction = new QAction(tr("Show Toolbar"), this);
connect(showMussaViewToolbarAction, SIGNAL(triggered()),
showMussaViewToolbarAction = new QAction(tr("Show Toolbar"), this);
connect(showMussaViewToolbarAction, SIGNAL(triggered()),
connect(toggleMotifsAction, SIGNAL(triggered()),
this, SLOT(toggleMotifs()));
toggleMotifsAction->setCheckable(true);
connect(toggleMotifsAction, SIGNAL(triggered()),
this, SLOT(toggleMotifs()));
toggleMotifsAction->setCheckable(true);
- toggleMotifsAction->setIcon(QIcon("icons/motif_icon.png"));
+ toggleMotifsAction->setIcon(QIcon(":/icons/motif_icon.png"));
toggleMotifsAction->setWhatsThis(tr("Toggle motif annotations on/off\n\n"
"You can load motif annotations via "
"'File->Load Motif List' menu option."));
toggleMotifsAction->setWhatsThis(tr("Toggle motif annotations on/off\n\n"
"You can load motif annotations via "
"'File->Load Motif List' menu option."));
saveBrowserPixmapAction = new QAction(tr("Save to image..."), this);
connect(saveBrowserPixmapAction, (SIGNAL(triggered())),
&browser, SLOT(promptSaveBrowserPixmap()));
saveBrowserPixmapAction = new QAction(tr("Save to image..."), this);
connect(saveBrowserPixmapAction, (SIGNAL(triggered())),
&browser, SLOT(promptSaveBrowserPixmap()));
- saveBrowserPixmapAction->setIcon(QIcon("icons/image2.png"));
+ saveBrowserPixmapAction->setIcon(QIcon(":/icons/image2.png"));
viewMussaAlignmentAction = new QAction(tr("View mussa alignment"), this);
connect(viewMussaAlignmentAction, SIGNAL(triggered()),
viewMussaAlignmentAction = new QAction(tr("View mussa alignment"), this);
connect(viewMussaAlignmentAction, SIGNAL(triggered()),
"defined paths"));
whatsThisAction = QWhatsThis::createAction(this);
"defined paths"));
whatsThisAction = QWhatsThis::createAction(this);
- whatsThisAction->setIcon(QIcon("icons/help.png"));
+ whatsThisAction->setIcon(QIcon(":/icons/help.png"));