Commit 7276e6f8 authored by Harald Sitter's avatar Harald Sitter 🌺

propertly create GUI from xml thingy

parent 8d00ab65
......@@ -18,15 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#######################################################################
install(FILES filelightpart.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(PROGRAMS org.kde.filelight.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES filelightrc DESTINATION ${CONFIG_INSTALL_DIR})
install(FILES filelightpartui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}//filelightpart)
install(FILES filelightui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}//filelight)
ecm_install_icons(ICONS
32-actions-views_filelight.png
16-apps-filelight.png
16-apps-filelight.png
22-apps-filelight.png
32-apps-filelight.png
48-apps-filelight.png
......
[Desktop Entry]
Encoding=UTF-8
Name=Radial Map
Name[ar]=خريطة محوريّة
Name[ast]=Mapa radial
Name[bs]=Radial Map
Name[ca]=Mapa radial
Name[ca@valencia]=Mapa radial
Name[cs]=Kruhová mapa
Name[da]=Radialkort
Name[de]=Kreisförmige Darstellung
Name[el]=Ακτινωτός χάρτης
Name[en_GB]=Radial Map
Name[es]=Mapa radial
Name[et]=Radiaalkaart
Name[eu]=Mapa erradiala
Name[fi]=Säteittäinen kartta
Name[fr]=Carte radiale
Name[ga]=Mapa Gathach
Name[gl]=Mapa radial
Name[hr]=Zrakasta karta
Name[hu]=Kördiagram
Name[ia]=Mappa radial
Name[it]=Mappa radiale
Name[kk]=Дөңгелек картасы
Name[km]=ផែនទីនៃ​កាំ
Name[ko]=원형 지도
Name[lt]=Radialinis žemėlapis
Name[lv]=Radial Map
Name[mr]=मध्यबिंदूतून जाणारा नकाशा
Name[nb]=Radielt kart
Name[nds]=Rund Koort
Name[nl]=Radiale grafiek
Name[nn]=Radialkart
Name[pa]=ਰੇਡੀਅਨ ਮੈਪ
Name[pl]=Mapa kołowa
Name[pt]=Mapa Radial
Name[pt_BR]=Mapa radial
Name[ro]=Hartă radială
Name[ru]=Радиальная карта
Name[sk]=Radiálna mapa
Name[sl]=Krožen prikaz
Name[sr]=Кружна мапа
Name[sr@ijekavian]=Кружна мапа
Name[sr@ijekavianlatin]=Kružna mapa
Name[sr@latin]=Kružna mapa
Name[sv]=Radiell avbildning
Name[th]=Radial Map
Name[tr]=Radyal Harita
Name[uk]=Радіальна карта
Name[x-test]=xxRadial Mapxx
Name[zh_CN]=雷达图
Name[zh_TW]=放射狀地圖
MimeType=inode/directory;
ServiceTypes=KParts/ReadOnlyPart
X-KDE-Library=filelightpart
Type=Service
Icon=view_filelight
<!DOCTYPE kpartgui>
<kpartgui name="filelightpart" version="2">
<MenuBar>
<Menu name="view">
<Action name="view_zoom_in" group="view_merge_group"/>
<Action name="view_zoom_out" group="view_merge_group"/>
</Menu>
<Menu name="settings">
<Action name="configure_filelight" group="settings_configure"/>
</Menu>
</MenuBar>
<ToolBar name="viewToolBar" hidden="true"><text>View Toolbar</text>
<Action name="view_zoom_in"/>
<Action name="view_zoom_out"/>
</ToolBar>
<State name="scan_started">
<disable>
<Action name="view_zoom_in"/>
<Action name="view_zoom_out"/>
<Action name="configure_filelight"/>
</disable>
</State>
<State name="scan_complete">
<enable>
<Action name="view_zoom_in"/>
<Action name="view_zoom_out"/>
<Action name="configure_filelight"/>
</enable>
</State>
<State name="scan_failed">
<!-- only for full failure situations -->
<enable>
<Action name="configure_filelight"/>
</enable>
<disable>
<Action name="view_zoom_in"/>
<Action name="view_zoom_out"/>
</disable>
</State>
</kpartgui>
......@@ -62,13 +62,9 @@ MainWindow::MainWindow()
, m_part(this)
, m_histories(0)
{
// setXMLFile("filelightui.rc");
setStandardToolBarMenuEnabled(true);
setupActions();
#warning port
setXMLFile(QStringLiteral( "filelightpartui.rc" ));
// createGUI(m_part);
createGUI(QStringLiteral("filelightui.rc"));
setCentralWidget(m_part->widget());
stateChanged(QStringLiteral( "scan_failed" )); //bah! doesn't affect the parts' actions, should I add them to the actionCollection here?
......
......@@ -57,20 +57,16 @@ BrowserExtension::BrowserExtension(Part *parent)
Part::Part(QWidget *parentWidget, QObject *parent, const QList<QVariant>&)
// : ReadOnlyPart(parent)
: KXmlGuiWindow(parentWidget)
, m_summary(0)
, m_ext(new BrowserExtension(this))
, m_statusbar(new StatusBarExtension(this))
, m_map(0)
, m_started(false)
, m_summary(nullptr)
, m_ext(new BrowserExtension(this))
, m_statusbar(new StatusBarExtension(this))
, m_map(nullptr)
, m_started(false)
, m_widget(nullptr)
{
Config::read();
// Q_ASSERT(false); // todo
// setXMLFile(QStringLiteral( "filelightpartui.rc" ));
QScrollArea *scrollArea = new QScrollArea(parentWidget);
scrollArea->setWidgetResizable(true);
setWidget(scrollArea);
......@@ -96,14 +92,12 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QList<QVariant>&)
m_numberOfFiles = new QLabel();
m_statusbar->addStatusBarItem(m_numberOfFiles, 0, true);
#warning port
// Q_ASSERT(false); // todo
// KStandardAction::zoomIn(m_map, SLOT(zoomIn()), actionCollection());
// KStandardAction::zoomOut(m_map, SLOT(zoomOut()), actionCollection());
// QAction *action = actionCollection()->addAction(QStringLiteral("configure_filelight"));
// action->setText(i18n("Configure Filelight..."));
// action->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
// connect(action, &QAction::triggered, this, &Part::configFilelight);
KStandardAction::zoomIn(m_map, SLOT(zoomIn()), actionCollection());
KStandardAction::zoomOut(m_map, SLOT(zoomOut()), actionCollection());
QAction *action = actionCollection()->addAction(QStringLiteral("configure_filelight"));
action->setText(i18n("Configure Filelight..."));
action->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
connect(action, &QAction::triggered, this, &Part::configFilelight);
connect(m_map, &RadialMap::Widget::folderCreated, this, static_cast<void (Part::*)()>(&Part::completed));
connect(m_map, &RadialMap::Widget::folderCreated, this, &Part::mapChanged);
......
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