]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocWidget.cpp
use "real" resources
[lyx.git] / src / frontends / qt4 / TocWidget.cpp
index 63c6fe4d08b9adfeb77003cbf5f61d03c40c9f68..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);
@@ -232,7 +216,7 @@ void TocWidget::enableControls(bool enable)
 void TocWidget::updateView()
 {
        LYXERR(Debug::GUI) << "In TocWidget::updateView()" << endl;
-       select(form_.getCurrentIndex(typeCO->currentIndex()));
+       select(form_.currentIndex(typeCO->currentIndex()));
 }
 
 
@@ -289,7 +273,7 @@ void TocWidget::setTocModel(size_t type)
 
        LYXERR(Debug::GUI) << "In TocWidget::updateGui()" << endl;
 
-       select(form_.getCurrentIndex(typeCO->currentIndex()));
+       select(form_.currentIndex(typeCO->currentIndex()));
 
        if (toc_model) {
                LYXERR(Debug::GUI)
@@ -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