mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
add folder wizard class
This commit is contained in:
parent
4e45cab2c1
commit
e721acd7e8
4 changed files with 306 additions and 1 deletions
|
@ -3,11 +3,17 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
|
set(mirall_UI
|
||||||
|
mirall/folderwizard.ui
|
||||||
|
)
|
||||||
|
qt4_wrap_ui(mirall_UI_SRCS ${mirall_UI})
|
||||||
|
|
||||||
set(mirall_SRCS
|
set(mirall_SRCS
|
||||||
mirall/application.cpp
|
mirall/application.cpp
|
||||||
mirall/fileutils.cpp
|
mirall/fileutils.cpp
|
||||||
mirall/folder.cpp
|
mirall/folder.cpp
|
||||||
mirall/folderwatcher.cpp
|
mirall/folderwatcher.cpp
|
||||||
|
mirall/folderwizard.cpp
|
||||||
mirall/gitfolder.cpp
|
mirall/gitfolder.cpp
|
||||||
mirall/inotify.cpp
|
mirall/inotify.cpp
|
||||||
mirall/temporarydir.cpp
|
mirall/temporarydir.cpp
|
||||||
|
@ -15,7 +21,8 @@ mirall/unisonfolder.cpp
|
||||||
)
|
)
|
||||||
qt4_automoc(${mirall_SRCS})
|
qt4_automoc(${mirall_SRCS})
|
||||||
|
|
||||||
add_library(mirall_static STATIC ${mirall_SRCS})
|
|
||||||
|
add_library(mirall_static STATIC ${mirall_SRCS} ${mirall_UI_SRCS})
|
||||||
|
|
||||||
add_executable(mirall main.cpp)
|
add_executable(mirall main.cpp)
|
||||||
target_link_libraries(mirall mirall_static)
|
target_link_libraries(mirall mirall_static)
|
||||||
|
|
15
src/mirall/folderwizard.cpp
Normal file
15
src/mirall/folderwizard.cpp
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
#include "mirall/folderwizard.h"
|
||||||
|
|
||||||
|
namespace Mirall
|
||||||
|
{
|
||||||
|
|
||||||
|
FolderWizard::FolderWizard(QWidget *parent)
|
||||||
|
: QWizard(parent)
|
||||||
|
{
|
||||||
|
_ui.setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "folderwizard.moc"
|
22
src/mirall/folderwizard.h
Normal file
22
src/mirall/folderwizard.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
#ifndef MIRALL_FOLDERWIZARD_H
|
||||||
|
#define MIRALL_FOLDERWIZARD_H
|
||||||
|
|
||||||
|
#include "ui_folderwizard.h"
|
||||||
|
#include <QWizard>
|
||||||
|
|
||||||
|
namespace Mirall {
|
||||||
|
|
||||||
|
class FolderWizard : public QWizard
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FolderWizard(QWidget *parent);
|
||||||
|
private:
|
||||||
|
Ui_FolderWizard _ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // ns Mirall
|
||||||
|
|
||||||
|
#endif
|
261
src/mirall/folderwizard.ui
Normal file
261
src/mirall/folderwizard.ui
Normal file
|
@ -0,0 +1,261 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>FolderWizard</class>
|
||||||
|
<widget class="QWizard" name="FolderWizard">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>565</width>
|
||||||
|
<height>387</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Folder Setup</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWizardPage" name="localFolderPage">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Which folder in your computer you want to backup/synchronize?</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="localFolderLineEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>/home/local1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="localFolderChooseBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Choose...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWizardPage" name="remoteFolderPage">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Sync with:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="localFolderRadioBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Another local folder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>17</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="localFolder2LineEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>/home/local2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="localFolder2ChooseBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>C&hoose..</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="sshFolderRadioBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Remote folder (SSH)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>17</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="sshFolderLineEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>ssh://john@host.com//myfolder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>17</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Sync only when the computer is connected to the network</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_9">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>38</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Only when connected to this local network</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_10">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
Reference in a new issue