use qt resources for icons
[mussa.git] / qui / MussaWindow.cpp
index a132f33401b007274fd7895c3f5c6b554a373aa1..7abf8f3d34451e1fb6b64da2777bf2cd5f910b24 100644 (file)
@@ -43,7 +43,7 @@ MussaWindow::MussaWindow(Mussa *analysis_, QWidget *parent) :
 
   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);
@@ -89,18 +89,18 @@ void MussaWindow::setupActions()
   // 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()));
-  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->setIcon(QIcon("icons/filenew.png"));
+  createNewAnalysisAction->setIcon(QIcon(":/icons/filenew.png"));
   
   createSubAnalysisAction = new QAction(tr("Define SubAnalysis"), this);
   connect(createSubAnalysisAction, SIGNAL(triggered()), 
@@ -112,22 +112,22 @@ void MussaWindow::setupActions()
   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->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->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->setIcon(QIcon("icons/filesave.png"));
+  saveMotifListAction->setIcon(QIcon(":/icons/filesave.png"));
 
   showMussaViewToolbarAction = new QAction(tr("Show Toolbar"), this);
   connect(showMussaViewToolbarAction, SIGNAL(triggered()), 
@@ -139,7 +139,7 @@ void MussaWindow::setupActions()
   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."));
@@ -148,7 +148,7 @@ void MussaWindow::setupActions()
   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()),
@@ -158,7 +158,7 @@ void MussaWindow::setupActions()
                                             "defined paths"));
 
   whatsThisAction = QWhatsThis::createAction(this);
-  whatsThisAction->setIcon(QIcon("icons/help.png"));
+  whatsThisAction->setIcon(QIcon(":/icons/help.png"));
 
 }