]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocWidget.cpp
use "real" resources
[lyx.git] / src / frontends / qt4 / TocWidget.cpp
index faa8b035bd867433ec3bb5adcd43bd890f016a50..7fef1afd3596a4eba4e7a1e0235e0b9106b8fd54 100644 (file)
@@ -15,8 +15,6 @@
 
 #include "GuiToc.h"
 #include "qt_helpers.h"
-#include "support/filetools.h"
-#include "support/lstrings.h"
 
 #include "debug.h"
 
 #include <QTreeWidgetItem>
 
 #include <vector>
-#include <string>
-#include <stack>
 
 using std::endl;
-using std::pair;
-using std::stack;
 using std::vector;
-using std::string;
 
 
 namespace lyx {
-
-using support::FileName;
-using support::libFileSearch;
-
 namespace frontend {
 
 TocWidget::TocWidget(GuiToc & form, QWidget * parent)
@@ -50,16 +39,11 @@ TocWidget::TocWidget(GuiToc & form, QWidget * parent)
 
        connect(&form_, SIGNAL(modelReset()), SLOT(updateGui()));
 
-       FileName icon_path = libFileSearch("images", "promote.png");
-       moveOutTB->setIcon(QIcon(toqstr(icon_path.absFilename())));
-       icon_path = libFileSearch("images", "demote.png");
-       moveInTB->setIcon(QIcon(toqstr(icon_path.absFilename())));
-       icon_path = libFileSearch("images", "up.png");
-       moveUpTB->setIcon(QIcon(toqstr(icon_path.absFilename())));
-       icon_path = libFileSearch("images", "down.png");
-       moveDownTB->setIcon(QIcon(toqstr(icon_path.absFilename())));
-       icon_path = libFileSearch("images", "reload.png");
-       updateTB->setIcon(QIcon(toqstr(icon_path.absFilename())));
+       moveOutTB->setIcon(QIcon(":/images/promote.png"));
+       moveInTB->setIcon(QIcon(":/images/demote.png"));
+       moveUpTB->setIcon(QIcon(":/images/up.png"));
+       moveDownTB->setIcon(QIcon(":/images/down.png"));
+       updateTB->setIcon(QIcon(":/images/reload.png"));
 
        // avoid flickering
        tocTV->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
@@ -315,11 +299,8 @@ void TocWidget::reconnectSelectionModel()
 void TocWidget::disconnectSelectionModel()
 {
        disconnect(tocTV->selectionModel(),
-                  SIGNAL(currentChanged(const QModelIndex &,
-                         const QModelIndex &)),
-                  this,
-                  SLOT(selectionChanged(const QModelIndex &,
-                       const QModelIndex &)));
+               SIGNAL(currentChanged(QModelIndex, QModelIndex)),
+               this, SLOT(selectionChanged(QModelIndex, QModelIndex)));
 }
 
 } // namespace frontend