File: dialogeditstatus.h

package info (click to toggle)
bibledit-gtk 4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 31,668 kB
  • ctags: 11,053
  • sloc: xml: 289,607; sql: 160,978; cpp: 86,450; sh: 3,316; makefile: 609; ansic: 398; perl: 143; python: 36
file content (95 lines) | stat: -rw-r--r-- 3,231 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
 ** Copyright (©) 2003-2012 Teus Benschop.
 **  
 ** 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 3 of the License, or
 ** (at your option) any later version.
 **  
 ** 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, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 **  
 */


#ifndef INCLUDED_DIALOGEDITSTATUS_H
#define INCLUDED_DIALOGEDITSTATUS_H


#include <gtk/gtk.h>
#include "ustring.h"
#include "libraries.h"
#include "reporting.h"


enum EditStatusType {estNone, estBook, estBooks, estChapter, estChapters, estVerse, estVerses};


class EditStatusDialog
{
public:
  EditStatusDialog(const ustring& project_in, unsigned int book, unsigned int chapter);
  ~EditStatusDialog();
  int run();
protected:
  GtkWidget *editstatusdialog;
  GtkWidget *dialog_vbox1;
  GtkWidget *hbox;
  GtkWidget *scrolledwindow_books;
  GtkWidget *treeview_books;
  GtkWidget *scrolledwindow_chapters;
  GtkWidget *treeview_chapters;
  GtkWidget *scrolledwindow_verses;
  GtkWidget *treeview_verses;
  GtkWidget *scrolledwindow_status;
  GtkWidget *viewport_status;
  GtkWidget *vbox_status;
  GtkWidget *dialog_action_area1;
  GtkWidget *cancelbutton;
  GtkWidget *okbutton;
private:
  ustring project;
  ProjectStatus * projectstatus;
  unsigned int alltasks_size;
  
  GtkListStore *liststore_books;
  static gboolean on_treeview_books_button_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
  static gboolean on_treeview_books_key_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data);
  void on_treeview_books_cursor();
  vector <int> currentbooks;

  GtkListStore *liststore_chapters;
  void load_chapters();
  static gboolean on_treeview_chapters_button_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
  static gboolean on_treeview_chapters_key_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data);
  void on_treeview_chapters_cursor();
  vector <int> currentchapters;

  GtkListStore *liststore_verses;
  void load_verses();
  static gboolean on_treeview_verses_button_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
  static gboolean on_treeview_verses_key_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data);
  void on_treeview_verses_cursor();
  vector <int> currentverses;

  EditStatusType editstatustype();
  vector <GtkWidget *> statusbuttons;
  void show_status();
  bool setting_status;
  void set_status (ProjectStatusRecord * statusrecord);
  static void on_checkbutton_status_toggled(GtkToggleButton *togglebutton, gpointer user_data);
  void on_checkbutton_status(GtkToggleButton *togglebutton);

  static void on_okbutton_clicked(GtkButton *button, gpointer user_data);
  void on_okbutton();
};


#endif