#include <iis.h>
Public Slots | |
void | newWindow () |
void | recalcNow () |
void | allowUserInput () |
void | insertRows () |
void | insertCols () |
void | copyRight () |
void | copyDown () |
void | openFile () |
void | saveFile () |
void | saveFileAs () |
void | doAbout () |
Public Member Functions | |
ApplicationWindow () | |
Private Attributes | |
QWorkspace * | workspace |
Definition at line 12 of file iis.h.
|
Definition at line 14 of file iis.cpp. References allowUserInput(), copyDown(), copyRight(), doAbout(), insertCols(), insertRows(), newWindow(), openFile(), saveFile(), saveFileAs(), and workspace. Referenced by main(). 00015 { 00016 workspace = new QWorkspace(this); 00017 setCentralWidget(workspace); 00018 QPopupMenu * files = new QPopupMenu(this); 00019 QAction * action = new QAction( "New File", QIconSet(), "&New", CTRL+Key_N, this, "new" ); 00020 action->addTo(files); 00021 connect(action,SIGNAL(activated()),this,SLOT(newWindow())); 00022 00023 action = new QAction( "Save", QIconSet(), "&Save", CTRL+Key_S, this, "save" ); 00024 action->addTo(files); 00025 connect(action,SIGNAL(activated()),this,SLOT(saveFile())); 00026 00027 action = new QAction( "Open", QIconSet(), "&Open...", CTRL+Key_O, this, "open" ); 00028 action->addTo(files); 00029 connect(action,SIGNAL(activated()),this,SLOT(openFile())); 00030 00031 action = new QAction( "Save as...", QIconSet(), "&Save as...", CTRL+Key_N, this, "saveas" ); 00032 action->addTo(files); 00033 connect(action,SIGNAL(activated()),this,SLOT(saveFileAs())); 00034 00035 //ALT+Key_Enter 00036 QPopupMenu * spreadsheet = new QPopupMenu(this); 00037 action = new QAction( "User input", QIconSet(), "&Start user input", QKeySequence(), this, "userinput"); 00038 action->addTo(spreadsheet); 00039 connect(action,SIGNAL(activated()),this,SLOT(allowUserInput())); 00040 00041 action = new QAction( "Insert Rows", QIconSet(), "&Insert Rows", QKeySequence(), this, "insertrows"); 00042 action->addTo(spreadsheet); 00043 connect(action,SIGNAL(activated()),this,SLOT(insertRows())); 00044 00045 action = new QAction( "Insert Cols", QIconSet(), "&Insert Cols", QKeySequence(), this, "insertcols"); 00046 action->addTo(spreadsheet); 00047 connect(action,SIGNAL(activated()),this,SLOT(insertCols())); 00048 00049 action = new QAction( "Copy Right", QIconSet(), "&Copy Right", QKeySequence(), this, "copyright"); 00050 action->addTo(spreadsheet); 00051 connect(action,SIGNAL(activated()),this,SLOT(copyRight())); 00052 00053 action = new QAction( "Copy Down", QIconSet(), "&Copy Down", QKeySequence(), this, "copyright"); 00054 action->addTo(spreadsheet); 00055 connect(action,SIGNAL(activated()),this,SLOT(copyDown())); 00056 00057 QPopupMenu * help = new QPopupMenu(this); 00058 action = new QAction("About", QIconSet(), "&About", QKeySequence(), this, "about"); 00059 action->addTo(help); 00060 connect(action,SIGNAL(activated()),this,SLOT(doAbout())); 00061 00062 menuBar() -> insertItem("&Files",files); 00063 menuBar() -> insertItem("&Spreadsheet",spreadsheet); 00064 menuBar() -> insertItem("&Help",help); 00065 }
|
|
Definition at line 83 of file iis.cpp. References SpreadSheet::allowUserInput(), and workspace. Referenced by ApplicationWindow(). 00084 { 00085 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00086 if (!w) return; 00087 w->allowUserInput(); 00088 }
|
|
Definition at line 111 of file iis.cpp. References SpreadSheet::copyDown(), and workspace. Referenced by ApplicationWindow(). 00112 { 00113 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00114 if (!w) return; 00115 w->copyDown(); 00116 }
|
|
Definition at line 104 of file iis.cpp. References SpreadSheet::copyRight(), and workspace. Referenced by ApplicationWindow(). 00105 { 00106 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00107 if (!w) return; 00108 w->copyRight(); 00109 }
|
|
Definition at line 158 of file iis.cpp. References AboutGelSignal::versionlabel. Referenced by ApplicationWindow(). 00159 { 00160 #ifdef GELSIGNAL 00161 AboutGelSignal about(this); 00162 about.versionlabel->setText(QString("v" IIS_VERSION)); 00163 about.exec(); 00164 #endif 00165 }
|
|
Definition at line 97 of file iis.cpp. References SpreadSheet::insertCols(), and workspace. Referenced by ApplicationWindow(). 00098 { 00099 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00100 if (!w) return; 00101 w->insertCols(); 00102 }
|
|
Definition at line 90 of file iis.cpp. References SpreadSheet::insertRows(), and workspace. Referenced by ApplicationWindow(). 00091 { 00092 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00093 if (!w) return; 00094 w->insertRows(); 00095 }
|
|
Definition at line 67 of file iis.cpp. References workspace. Referenced by ApplicationWindow(). 00068 { 00069 SpreadSheet * w = new SpreadSheet( workspace, 0, WDestructiveClose ); 00070 if ( workspace->windowList().isEmpty() ) 00071 w->showMaximized(); 00072 else 00073 w->show(); 00074 }
|
|
Definition at line 142 of file iis.cpp. References workspace. Referenced by ApplicationWindow(). 00143 { 00144 QString s = QFileDialog::getOpenFileName(".", 00145 "Images (*"IIS_EXTENSION")", 00146 NULL, 00147 "Select filename", 00148 "Choose a file"); 00149 if(s.isEmpty()) return; 00150 00151 SpreadSheet * w = new SpreadSheet( s, workspace, 0, WDestructiveClose ); 00152 if ( workspace->windowList().isEmpty() ) 00153 w->showMaximized(); 00154 else 00155 w->show(); 00156 }
|
|
Definition at line 76 of file iis.cpp. References SpreadSheet::recalcSelection(), and workspace. 00077 { 00078 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00079 if (!w) return; 00080 w->recalcSelection(); 00081 }
|
|
Definition at line 118 of file iis.cpp. References SpreadSheet::hasFilename(), SpreadSheet::saveFile(), saveFileAs(), and workspace. Referenced by ApplicationWindow(). 00119 { 00120 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00121 if (!w) return; 00122 if (w->hasFilename()) 00123 w->saveFile(); 00124 else 00125 saveFileAs(); 00126 }
|
|
Definition at line 128 of file iis.cpp. References SpreadSheet::saveFile(), SpreadSheet::setFilename(), and workspace. Referenced by ApplicationWindow(), and saveFile(). 00129 { 00130 SpreadSheet * w = (SpreadSheet*)workspace->activeWindow(); 00131 if (!w) return; 00132 QString s = QFileDialog::getSaveFileName(".", 00133 "Images (*"IIS_EXTENSION")", 00134 NULL, 00135 "Select filename", 00136 "Choose a file"); 00137 if(s.isEmpty()) return; 00138 w->setFilename(s); 00139 w->saveFile(); 00140 }
|
|
Definition at line 16 of file iis.h. Referenced by allowUserInput(), ApplicationWindow(), copyDown(), copyRight(), insertCols(), insertRows(), newWindow(), openFile(), recalcNow(), saveFile(), and saveFileAs(). |