Commit 3cabf11e authored by Harald Sitter's avatar Harald Sitter 🦄

flatten the source tree now that everything links into one binary properly

parent 98943bcb
#######################################################################
# Copyright 2008-2014 Martin Sandsmark <martin.sandsmark@kde.org>
# Copyright 2008-2009 Martin Sandsmark <martin.sandsmark@kde.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
......@@ -18,5 +18,32 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#######################################################################
add_subdirectory(app)
add_subdirectory(part)
set(filelight_SRCS
radialMap/widget.cpp
radialMap/map.cpp
radialMap/widgetEvents.cpp
radialMap/labels.cpp
part.cpp
scan.cpp
progressBox.cpp
Config.cpp
settingsDialog.cpp
fileTree.cpp
localLister.cpp
remoteLister.cpp
summaryWidget.cpp
historyAction.cpp
mainWindow.cpp
main.cpp)
message(WARNING "sort srcs")
ki18n_wrap_ui(filelight_SRCS dialog.ui)
add_executable(filelight ${filelight_SRCS})
target_link_libraries(filelight
KF5::Parts
KF5::XmlGui
)
install(TARGETS filelight ${INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -23,7 +23,7 @@
#ifndef DEFINE_H
#define DEFINE_H
#include "part/Config.h"
#include "Config.h"
#undef VERSION
#undef PACKAGE
......
......@@ -20,7 +20,7 @@
***********************************************************************/
#include "mainWindow.h"
#include "part/part.h"
#include "part.h"
#include "historyAction.h"
#include <cstdlib> //std::exit()
......
#######################################################################
# Copyright 2008-2009 Martin Sandsmark <martin.sandsmark@kde.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License or (at your option) version 3 or any later version
# accepted by the membership of KDE e.V. (or its successor approved
# by the membership of KDE e.V.), which shall act as a proxy
# defined in Section 14 of version 3 of the license.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#######################################################################
set(filelight_PART_SRCS
radialMap/widget.cpp
radialMap/map.cpp
radialMap/widgetEvents.cpp
radialMap/labels.cpp
part.cpp
scan.cpp
progressBox.cpp
Config.cpp
settingsDialog.cpp
fileTree.cpp
localLister.cpp
remoteLister.cpp
summaryWidget.cpp)
ki18n_wrap_ui(filelight_PART_SRCS dialog.ui)
add_library(filelightpart STATIC ${filelight_PART_SRCS})
target_include_directories(filelightpart INTERFACE "$<INSTALL_INTERFACE:${CURRENT_SOURCE_DIR}>")
target_link_libraries(filelightpart
KF5::Parts
KF5::KIOCore
)
install(TARGETS filelightpart DESTINATION ${PLUGIN_INSTALL_DIR})
......@@ -24,8 +24,8 @@
#include <QPainter>
#include <QVector>
#include "part/Config.h"
#include "part/fileTree.h"
#include "Config.h"
#include "fileTree.h"
#include "radialMap.h"
#include "sincos.h"
#include "widget.h"
......@@ -98,7 +98,7 @@ void RadialMap::Widget::paintExplodedLabels(QPainter &paint) const
for (Segment *segment : *m_map.m_signature) {
if (segment->length() > 288) {
list.append(new Label(segment, 0));
}
}
}
......@@ -121,7 +121,7 @@ void RadialMap::Widget::paintExplodedLabels(QPainter &paint) const
return (angle1 < angle2);
});
//2. Check to see if any adjacent labels are too close together
// if so, remove it (the least significant labels, since we sort by level too).
......@@ -146,7 +146,7 @@ void RadialMap::Widget::paintExplodedLabels(QPainter &paint) const
font.setPointSize(Config::minFontPitch);
paint.setFont(font);
}
QVector<Label*>::iterator it;
do {
......
......@@ -31,8 +31,8 @@
#include "radialMap.h" // defines
#include "part/Config.h"
#include "part/fileTree.h"
#include "Config.h"
#include "fileTree.h"
#define SINCOS_H_IMPLEMENTATION (1)
#include "sincos.h"
#include "widget.h"
......@@ -102,7 +102,7 @@ void RadialMap::Map::make(const Folder *tree, bool refresh)
colorise();
m_centerText = tree->humanReadableSize();
//paint the pixmap
paint();
......
......@@ -22,7 +22,7 @@
#ifndef MAP_H
#define MAP_H
#include "part/fileTree.h"
#include "fileTree.h"
#include <KColorScheme>
......
......@@ -21,8 +21,8 @@
#include "widget.h"
#include "part/Config.h"
#include "part/fileTree.h"
#include "Config.h"
#include "fileTree.h"
#include "radialMap.h" //constants
#include "map.h"
......
......@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************/
#include "part/fileTree.h"
#include "part/Config.h"
#include "fileTree.h"
#include "Config.h"
#include "radialMap.h" //class Segment
#include "widget.h"
......@@ -153,22 +153,22 @@ void RadialMap::Widget::mouseMoveEvent(QMouseEvent *e)
QString string = m_focus->file()->fullPath(m_tree)
+ QLatin1Char('\n')
+ m_focus->file()->humanReadableSize();
if (m_focus->file()->isFolder()) {
int files = static_cast<const Folder*>(m_focus->file())->children();
const uint percent = uint((100 * files) / (double)m_tree->children());
string += QLatin1Char('\n');
string += i18np("File: %1", "Files: %1", files);
if (percent > 0) string += QString(QLatin1String(" (%1%)")).arg(percent);
}
const QUrl url = Widget::url(m_focus->file());
if (m_focus == m_rootSegment && url != KIO::upUrl(url)) {
string += i18n("\nClick to go up to parent directory");
}
// Calculate a semi-sane size for the tooltip
QFontMetrics fontMetrics(font());
int tooltipWidth = 0;
......@@ -217,7 +217,7 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
{
if (!isEnabled())
return;
//m_focus is set correctly (I've been strict, I assure you it is correct!)
if (!m_focus || m_focus->isFake()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment