parent
b2b0b6ccfa
commit
45ad84b548
@ -0,0 +1,107 @@
|
||||
#=============================================================================
|
||||
# The lxqt_translate_desktop() function was copied from the the
|
||||
# LXQt LxQtTranste.cmake
|
||||
#
|
||||
# Original Author: Alexander Sokolov <sokoloff.a@gmail.com>
|
||||
#
|
||||
# funtion lxqt_translate_desktop(_RESULT
|
||||
# SOURCES <sources>
|
||||
# [TRANSLATION_DIR] translation_directory
|
||||
# )
|
||||
# Output:
|
||||
# _RESULT The generated .desktop (.desktop) files
|
||||
#
|
||||
# Input:
|
||||
#
|
||||
# SOURCES List of input desktop files (.destktop.in) to be translated
|
||||
# (merged), relative to the CMakeList.txt.
|
||||
#
|
||||
# TRANSLATION_DIR Optional path to the directory with the .ts files,
|
||||
# relative to the CMakeList.txt. Defaults to
|
||||
# "translations".
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
function(lxqt_translate_desktop _RESULT)
|
||||
# Parse arguments ***************************************
|
||||
set(oneValueArgs TRANSLATION_DIR)
|
||||
set(multiValueArgs SOURCES)
|
||||
|
||||
cmake_parse_arguments(_ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
# check for unknown arguments
|
||||
set(_UNPARSED_ARGS ${_ARGS_UNPARSED_ARGUMENTS})
|
||||
if (NOT ${_UNPARSED_ARGS} STREQUAL "")
|
||||
MESSAGE(FATAL_ERROR
|
||||
"Unknown arguments '${_UNPARSED_ARGS}'.\n"
|
||||
"See lxqt_translate_desktop() documenation for more information.\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED _ARGS_SOURCES)
|
||||
set(${_RESULT} "" PARENT_SCOPE)
|
||||
return()
|
||||
else()
|
||||
set(_sources ${_ARGS_SOURCES})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED _ARGS_TRANSLATION_DIR)
|
||||
set(_translationDir "translations")
|
||||
else()
|
||||
set(_translationDir ${_ARGS_TRANSLATION_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
get_filename_component (_translationDir ${_translationDir} ABSOLUTE)
|
||||
|
||||
foreach (_inFile ${_sources})
|
||||
get_filename_component(_inFile ${_inFile} ABSOLUTE)
|
||||
get_filename_component(_fileName ${_inFile} NAME_WE)
|
||||
#Extract the real extension ............
|
||||
get_filename_component(_fileExt ${_inFile} EXT)
|
||||
string(REPLACE ".in" "" _fileExt ${_fileExt})
|
||||
#.......................................
|
||||
set(_outFile "${CMAKE_CURRENT_BINARY_DIR}/${_fileName}${_fileExt}")
|
||||
|
||||
file(GLOB _translations
|
||||
${_translationDir}/${_fileName}_*${_fileExt}
|
||||
${_translationDir}/local/${_fileName}_*${_fileExt}
|
||||
)
|
||||
|
||||
set(_pattern "'\\[.*]\\s*='")
|
||||
if (_translations)
|
||||
add_custom_command(OUTPUT ${_outFile}
|
||||
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMAND grep -h ${_pattern} ${_translations} >> ${_outFile}
|
||||
COMMENT "Generating ${_fileName}${_fileExt}"
|
||||
)
|
||||
else()
|
||||
add_custom_command(OUTPUT ${_outFile}
|
||||
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMENT "Generating ${_fileName}${_fileExt}"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(__result ${__result} ${_outFile})
|
||||
|
||||
|
||||
# TX file ***********************************************
|
||||
set(_txFile "${CMAKE_BINARY_DIR}/tx/${_fileName}${_fileExt}.tx.sh")
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_translationDir ${_translationDir})
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_inFile ${_inFile})
|
||||
string(REPLACE "." "" _fileType ${_fileExt})
|
||||
|
||||
file(WRITE ${_txFile}
|
||||
"[ -f ${_inFile} ] || exit 0\n"
|
||||
"echo '[lxde-qt.${_fileName}_${_fileType}]'\n"
|
||||
"echo 'type = DESKTOP'\n"
|
||||
"echo 'source_lang = en'\n"
|
||||
"echo 'source_file = ${_tx_inFile}'\n"
|
||||
"echo 'file_filter = ${_tx_translationDir}/${_fileName}_<lang>${_fileExt}'\n"
|
||||
"echo ''\n"
|
||||
)
|
||||
|
||||
endforeach()
|
||||
|
||||
set(${_RESULT} ${__result} PARENT_SCOPE)
|
||||
endfunction(lxqt_translate_desktop)
|
@ -0,0 +1,131 @@
|
||||
#=============================================================================
|
||||
# Copyright 2014 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
#
|
||||
# funtion lxqt_translate_ts(qmFiles
|
||||
# [USE_QT5 [Yes | No]]
|
||||
# [UPDATE_TRANSLATIONS [Yes | No]]
|
||||
# SOURCES <sources>
|
||||
# [TEMPLATE] translation_template
|
||||
# [TRANSLATION_DIR] translation_directory
|
||||
# [INSTALL_DIR] install_directory
|
||||
# )
|
||||
# Output:
|
||||
# qmFiles The generated compiled translations (.qm) files
|
||||
#
|
||||
# Input:
|
||||
# USE_QT5 Optional flag to choose between Qt4 and Qt5. Defaults to Qt5
|
||||
#
|
||||
# UPDATE_TRANSLATIONS Optional flag. Setting it to Yes, extracts and
|
||||
# compiles the translations. Setting it No, only
|
||||
# compiles them.
|
||||
#
|
||||
# TEMPLATE Optional translations files base name. Defaults to
|
||||
# ${PROJECT_NAME}. An .ts extensions is added.
|
||||
#
|
||||
# TRANSLATION_DIR Optional path to the directory with the .ts files,
|
||||
# relative to the CMakeList.txt. Defaults to
|
||||
# "translations".
|
||||
#
|
||||
# INSTALL_DIR Optional destination of the file compiled files (qmFiles).
|
||||
# If not present no installation is performed
|
||||
|
||||
|
||||
|
||||
# CMake v2.8.3 needed to use the CMakeParseArguments module
|
||||
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
|
||||
|
||||
# We use our patched version to round a annoying bug.
|
||||
include(Qt5PatchedLinguistToolsMacros)
|
||||
|
||||
function(lxqt_translate_ts qmFiles)
|
||||
set(oneValueArgs USE_QT5 UPDATE_TRANSLATIONS TEMPLATE TRANSLATION_DIR INSTALL_DIR)
|
||||
set(multiValueArgs SOURCES)
|
||||
cmake_parse_arguments(TR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if (NOT DEFINED TR_UPDATE_TRANSLATIONS)
|
||||
set(TR_UPDATE_TRANSLATIONS "No")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED TR_USE_QT5)
|
||||
set(TR_USE_QT5 "Yes")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED TR_TEMPLATE)
|
||||
set(TR_TEMPLATE "${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED TR_TRANSLATION_DIR)
|
||||
set(TR_TRANSLATION_DIR "translations")
|
||||
endif()
|
||||
|
||||
file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}_*.ts")
|
||||
set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts")
|
||||
|
||||
if(TR_USE_QT5)
|
||||
# Qt5
|
||||
if (TR_UPDATE_TRANSLATIONS)
|
||||
qt5_patched_create_translation(QMS
|
||||
${TR_SOURCES}
|
||||
${templateFile}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
qt5_patched_create_translation(QM
|
||||
${TR_SOURCES}
|
||||
${tsFiles}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
else()
|
||||
qt5_patched_add_translation(QM ${tsFiles})
|
||||
endif()
|
||||
else()
|
||||
# Qt4
|
||||
if(TR_UPDATE_TRANSLATIONS)
|
||||
qt4_create_translation(QMS
|
||||
${TR_SOURCES}
|
||||
${templateFile}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
qt4_create_translation(QM
|
||||
${TR_SOURCES}
|
||||
${tsFiles}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
else()
|
||||
qt4_add_translation(QM ${tsFiles})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TR_UPDATE_TRANSLATIONS)
|
||||
add_custom_target("update_${TR_TEMPLATE}_ts" ALL DEPENDS ${QMS})
|
||||
endif()
|
||||
|
||||
if(DEFINED TR_INSTALL_DIR)
|
||||
install(FILES ${QM} DESTINATION ${TR_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
set(${qmFiles} ${QM} PARENT_SCOPE)
|
||||
endfunction()
|
@ -0,0 +1,112 @@
|
||||
#=============================================================================
|
||||
# Copyright 2005-2011 Kitware, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the name of Kitware, Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
function(QT5_PATCHED_CREATE_TRANSLATION _qm_files)
|
||||
set(options)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs OPTIONS)
|
||||
|
||||
cmake_parse_arguments(_LUPDATE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
set(_lupdate_files ${_LUPDATE_UNPARSED_ARGUMENTS})
|
||||
set(_lupdate_options ${_LUPDATE_OPTIONS})
|
||||
|
||||
set(_my_sources)
|
||||
set(_my_tsfiles)
|
||||
foreach(_file ${_lupdate_files})
|
||||
get_filename_component(_ext ${_file} EXT)
|
||||
get_filename_component(_abs_FILE ${_file} ABSOLUTE)
|
||||
if(_ext MATCHES "ts")
|
||||
list(APPEND _my_tsfiles ${_abs_FILE})
|
||||
else()
|
||||
list(APPEND _my_sources ${_abs_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(_ts_file ${_my_tsfiles})
|
||||
if(_my_sources)
|
||||
# make a list file to call lupdate on, so we don't make our commands too
|
||||
# long for some systems
|
||||
# get_filename_component(_ts_name ${_ts_file} NAME_WE)
|
||||
|
||||
get_filename_component(_name ${_ts_file} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _ts_name ${_name})
|
||||
|
||||
set(_ts_lst_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lst_file")
|
||||
set(_lst_file_srcs)
|
||||
foreach(_lst_file_src ${_my_sources})
|
||||
set(_lst_file_srcs "${_lst_file_src}\n${_lst_file_srcs}")
|
||||
endforeach()
|
||||
|
||||
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
|
||||
foreach(_pro_include ${_inc_DIRS})
|
||||
get_filename_component(_abs_include "${_pro_include}" ABSOLUTE)
|
||||
set(_lst_file_srcs "-I${_pro_include}\n${_lst_file_srcs}")
|
||||
endforeach()
|
||||
|
||||
file(WRITE ${_ts_lst_file} "${_lst_file_srcs}")
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${_ts_file}
|
||||
COMMAND ${Qt5_LUPDATE_EXECUTABLE}
|
||||
ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
|
||||
DEPENDS ${_my_sources} ${_ts_lst_file} VERBATIM)
|
||||
endforeach()
|
||||
qt5_patched_add_translation(${_qm_files} ${_my_tsfiles})
|
||||
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
function(QT5_PATCHED_ADD_TRANSLATION _qm_files)
|
||||
foreach(_current_FILE ${ARGN})
|
||||
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
# get_filename_component(qm ${_abs_FILE} NAME_WE)
|
||||
|
||||
get_filename_component(_name ${_abs_FILE} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" qm ${_name})
|
||||
|
||||
get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION)
|
||||
if(output_location)
|
||||
file(MAKE_DIRECTORY "${output_location}")
|
||||
set(qm "${output_location}/${qm}.qm")
|
||||
else()
|
||||
set(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${qm}
|
||||
COMMAND ${Qt5_LRELEASE_EXECUTABLE}
|
||||
ARGS ${_abs_FILE} -qm ${qm}
|
||||
DEPENDS ${_abs_FILE} VERBATIM
|
||||
)
|
||||
list(APPEND ${_qm_files} ${qm})
|
||||
endforeach()
|
||||
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
|
||||
endfunction()
|
@ -0,0 +1,90 @@
|
||||
/*
|
||||
Menu with entries to create new folders and files.
|
||||
Copyright (C) 2012 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "createnewmenu.h"
|
||||
#include "folderview.h"
|
||||
#include "icontheme.h"
|
||||
#include "utilities.h"
|
||||
|
||||
namespace Fm {
|
||||
|
||||
CreateNewMenu::CreateNewMenu(QWidget* dialogParent, FmPath* dirPath, QWidget* parent):
|
||||
QMenu(parent), dialogParent_(dialogParent), dirPath_(dirPath) {
|
||||
QAction* action = new QAction(QIcon::fromTheme("folder-new"), tr("Folder"), this);
|
||||
connect(action, &QAction::triggered, this, &CreateNewMenu::onCreateNewFolder);
|
||||
addAction(action);
|
||||
|
||||
action = new QAction(QIcon::fromTheme("document-new"), tr("Blank File"), this);
|
||||
connect(action, &QAction::triggered, this, &CreateNewMenu::onCreateNewFile);
|
||||
addAction(action);
|
||||
|
||||
// add more items to "Create New" menu from templates
|
||||
GList* templates = fm_template_list_all(fm_config->only_user_templates);
|
||||
if(templates) {
|
||||
addSeparator();
|
||||
for(GList* l = templates; l; l = l->next) {
|
||||
FmTemplate* templ = (FmTemplate*)l->data;
|
||||
/* we support directories differently */
|
||||
if(fm_template_is_directory(templ))
|
||||
continue;
|
||||
FmMimeType* mime_type = fm_template_get_mime_type(templ);
|
||||
const char* label = fm_template_get_label(templ);
|
||||
QString text = QString("%1 (%2)").arg(QString::fromUtf8(label)).arg(QString::fromUtf8(fm_mime_type_get_desc(mime_type)));
|
||||
FmIcon* icon = fm_template_get_icon(templ);
|
||||
if(!icon)
|
||||
icon = fm_mime_type_get_icon(mime_type);
|
||||
QAction* action = addAction(IconTheme::icon(icon), text);
|
||||
action->setObjectName(QString::fromUtf8(fm_template_get_name(templ, NULL)));
|
||||
connect(action, &QAction::triggered, this, &CreateNewMenu::onCreateNew);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CreateNewMenu::~CreateNewMenu() {
|
||||
}
|
||||
|
||||
void CreateNewMenu::onCreateNewFile() {
|
||||
if(dirPath_)
|
||||
createFileOrFolder(CreateNewTextFile, dirPath_);
|
||||
}
|
||||
|
||||
void CreateNewMenu::onCreateNewFolder() {
|
||||
if(dirPath_)
|
||||
createFileOrFolder(CreateNewFolder, dirPath_);
|
||||
}
|
||||
|
||||
void CreateNewMenu::onCreateNew() {
|
||||
QAction* action = static_cast<QAction*>(sender());
|
||||
QByteArray name = action->objectName().toUtf8();
|
||||
GList* templates = fm_template_list_all(fm_config->only_user_templates);
|
||||
FmTemplate* templ = NULL;
|
||||
for(GList* l = templates; l; l = l->next) {
|
||||
FmTemplate* t = (FmTemplate*)l->data;
|
||||
if(name == fm_template_get_name(t, NULL)) {
|
||||
templ = t;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(templ) { // template found
|
||||
if(dirPath_)
|
||||
createFileOrFolder(CreateWithTemplate, dirPath_, templ, dialogParent_);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Fm
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
Menu with entries to create new folders and files.
|
||||
Copyright (C) 2012 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef FM_CREATENEWMENU_H
|
||||
#define FM_CREATENEWMENU_H
|
||||
|
||||
#include "libfmqtglobals.h"
|
||||
#include <QMenu>
|
||||
#include <libfm/fm.h>
|
||||
|
||||
namespace Fm {
|
||||
|
||||
class FolderView;
|
||||
|
||||
class LIBFM_QT_API CreateNewMenu : public QMenu {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CreateNewMenu(QWidget* dialogParent, FmPath* dirPath,
|
||||
QWidget* parent = 0);
|
||||
virtual ~CreateNewMenu();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onCreateNewFolder();
|
||||
void onCreateNewFile();
|
||||
void onCreateNew();
|
||||
|
||||
private:
|
||||
QWidget* dialogParent_;
|
||||
FmPath* dirPath_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // FM_CREATENEWMENU_H
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue