-
Notifications
You must be signed in to change notification settings - Fork 0
Home
These are the following steps in order to let SMASH create issues into a Redmine Server.
- Create the required directories:
- export/gtt
- import/gtt
-
In
export/gtt
directory create the filegtt_export.dart
and copy the contents of export/gtt_export.dart from the Hyakumori's gtt/main GitHub repository. -
Remove all the library import code and add the following code:
part of smash_import_export_plugins;
class GttExportPlugin extends AExportPlugin {
ProjectDb projectDb;
BuildContext context;
@override
void setContext(BuildContext context) {
this.context = context;
}
@override
Icon getIcon() {
return Icon(
MdiIcons.cloudLock,
color: SmashColors.mainDecorations,
);
}
@override
String getTitle() {
return "GTT";
}
@override
String getDescription() {
return IEL.of(context).exportWidget_exportToGTT;
}
@override
void setProjectDatabase(ProjectDb projectDb) {
this.projectDb = projectDb;
}
@override
Widget getExportPage() {
return GttExportWidget(
projectDb,
);
}
@override
Widget getSettingsPage() {
return GttSettings();
}
}
-
Change
final GeopaparazziProjectDb projectDb;
intofinal ProjectDb projectDb;
in GttExportWidget class. -
Comment out the following code in lines 576 - 581
/*if (noteUpdated) {
ProjectState projectState =
Provider.of<ProjectState>(context, listen: false);
projectState.reloadProject(context);
}*/
- Change all instances of
GeopaparazziProjectDb
toProjectDb
.
-
In
import/gtt
directory create the filegtt_import.dart
and copy the contents of import/gtt_import.dart from the Hyakumori's gtt/main GitHub repository. -
Remove all the library import code and add the following code:
part of smash_import_export_plugins;
class GttImportPlugin extends AImportPlugin {
ProjectDb projectDb;
BuildContext context;
@override
void setContext(BuildContext context) {
this.context = context;
}
@override
Icon getIcon() {
return Icon(
MdiIcons.cloudLock,
color: SmashColors.mainDecorations,
);
}
@override
String getTitle() {
return "GTT";
}
@override
String getDescription() {
return IEL.of(context).importWidget_importFromGTT;
}
@override
void setProjectDatabase(ProjectDb projectDb) {
this.projectDb = projectDb;
}
@override
Widget getImportPage() {
return GttImportWidget();
}
@override
Widget getSettingsPage() {
return GttSettings();
}
}
-
In the
utils
directory, create the filegtt_utilities.dart
and copy the contents of gtt/gtt_utilities.dart from the Hyakumori's gtt/main GitHub repository. -
Remove all the library import code and add the following code:
part of smash_import_export_plugins;
- Copy the classes
GttSettings
andGttSettingsState
from the widgets/settings.dart of the Hyakumori's gtt/main GitHub repository and place it at the bottom portion of thegtt_utilities.dart
-
Open
plugins.dart
and addGttImportPlugin(),
toList<AImportPlugin> importPlugins
. -
Add
GttExportPlugin(),
toList<AExportPlugin> exportPlugins
.
- Open
smash_import_export_plugins.dart
and add the following:
import 'package:intl/intl.dart';
and
part 'com/hydrologis/smash/import_export_plugins/export/gtt/gtt_export.dart';
part 'com/hydrologis/smash/import_export_plugins/import/gtt/gtt_import.dart';
part 'com/hydrologis/smash/import_export_plugins/utils/gtt_utilities.dart';