• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_UnixDialog_RDFEditor.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2011 AbiSource, Inc.
00003  * Copyright (C) Ben Martin
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301 USA.
00019  */
00020 
00021 #ifndef AP_UNIXDIALOG_RDFEDITOR_H
00022 #define AP_UNIXDIALOG_RDFEDITOR_H
00023 
00024 #include "ap_Dialog_RDFEditor.h"
00025 #include "fv_View.h"
00026 
00027 class XAP_UnixFrame;
00028 
00029 
00030 
00031 class AP_UnixDialog_RDFEditor: public AP_Dialog_RDFEditor
00032 {
00033 public:
00034     AP_UnixDialog_RDFEditor (XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00035     virtual ~AP_UnixDialog_RDFEditor (void);
00036 
00037     static XAP_Dialog *static_constructor (XAP_DialogFactory *,
00038                                            XAP_Dialog_Id id);
00039 
00040     virtual void runModeless       (XAP_Frame *pFrame);
00041     virtual void notifyActiveFrame (XAP_Frame *pFrame);
00042     virtual void activate          (void);
00043     virtual void destroy           (void);
00044 
00045     void onExecuteClicked();
00046     void onShowAllClicked();
00047     void onDelClicked();
00048     void onCellEdited( GtkCellRendererText *cell,
00049                        gchar *path_string,
00050                        gchar *new_text,
00051                        int cidx );
00052     void onImportRDFXML();
00053     void onExportRDFXML();
00054     void onCursorChanged();
00055 
00056     const GtkWidget *getWindow (void) { return m_wDialog; }
00057 
00058     virtual void clear();
00059     virtual void addStatement( const PD_RDFStatement& st );
00060     virtual void setStatus( const std::string& msg );
00061     virtual void removeStatement( const PD_RDFStatement& st );
00062     virtual std::list< PD_RDFStatement > getSelection();
00063     virtual void setSelection( const std::list< PD_RDFStatement >& l );
00064     virtual void hideRestrictionXMLID( bool v );
00065 
00066     PD_RDFStatement next( const PD_RDFStatement& st );
00067 
00068 protected:
00069 
00070     void _constructWindow     (XAP_Frame *pFrame);
00071     void _updateWindow        (void);
00072 
00073 private:
00074 
00075     enum
00076     {
00077         C_SUBJ_COLUMN = 0,
00078         C_PRED_COLUMN,
00079         C_OBJ_COLUMN,
00080         C_COLUMN_COUNT
00081     };
00082 
00083     GtkTreeViewColumn* w_cols[C_COLUMN_COUNT];
00084 
00085     GtkWidget *m_wDialog;
00086     GtkWidget *m_btClose;
00087     GtkWidget *m_btShowAll;
00088     GtkTreeView*  m_resultsView;
00089     GtkTreeStore* m_resultsModel;
00090     GtkWidget *m_status;
00091     GSimpleAction *m_anewtriple;
00092     GSimpleAction *m_acopytriple;
00093     GSimpleAction *m_adeletetriple;
00094     GSimpleAction *m_aimportrdfxml;
00095     GSimpleAction *m_aexportrdfxml;
00096     GtkComboBox *m_selectedxmlid;
00097     GtkWidget   *m_restrictxmlidhidew;
00098 
00099     GtkTreeIter getGIter( PD_RDFStatement st );
00100     PD_RDFStatement GIterToStatement( GtkTreeIter* giter );
00101 
00102 };
00103 
00104 #endif

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1