|
11 | 11 | import csv |
12 | 12 | import nibabel as nib |
13 | 13 | import pandas as pd |
| 14 | +import random |
14 | 15 | from bids_validator import BIDSValidator |
15 | 16 | from typing import Union |
16 | 17 | from pydicom import dcmread, datadict, config |
@@ -2070,6 +2071,14 @@ def get_help(self): |
2070 | 2071 | help_url = HELP_URLS.get(self.target_run.datatype, HELP_URL_DEFAULT) |
2071 | 2072 | webbrowser.open(help_url) |
2072 | 2073 |
|
| 2074 | + messagebox = QMessageBox(self) |
| 2075 | + messagebox.setText(f"\n{get_douglas_adams_quote()}") |
| 2076 | + messagebox.setWindowTitle("Don't panic") |
| 2077 | + messagebox.setIconPixmap(QtGui.QPixmap(str(Path(__file__).parent/'egg.png')).scaled(150, 150, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation)) |
| 2078 | + messagebox.setToolTip("Thanks for all the fish!") |
| 2079 | + messagebox.setFont(QtGui.QFont('Courier New', pointSize=13)) |
| 2080 | + messagebox.show() |
| 2081 | + |
2073 | 2082 |
|
2074 | 2083 | class CompareWindow(QDialog): |
2075 | 2084 |
|
@@ -2430,6 +2439,34 @@ def get_eventshelp(eventkey: str) -> str: |
2430 | 2439 | return f"{eventkey}\nA custom column name" |
2431 | 2440 |
|
2432 | 2441 |
|
| 2442 | +def get_douglas_adams_quote(): |
| 2443 | + quotes = ['The answer to the ultimate question of life, the universe, and everything is 42.', |
| 2444 | + "Don't Panic and always carry a towel!", |
| 2445 | + 'I love deadlines. I love the whooshing noise they make as they go by.', |
| 2446 | + 'A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.', |
| 2447 | + 'Time is an illusion. Lunchtime doubly so.', |
| 2448 | + 'Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.', |
| 2449 | + 'Flying is learning how to throw yourself at the ground and miss.', |
| 2450 | + 'It is a mistake to think you can solve any major problems just with potatoes.', |
| 2451 | + 'The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.', |
| 2452 | + "The chances of finding out what's really going on in the universe are so remote, the only thing to do is hang the sense of it and keep yourself occupied.", |
| 2453 | + 'This must be Thursday. I never could get the hang of Thursdays.', |
| 2454 | + 'For a moment, nothing happened. Then, after a second or so, nothing continued to happen.', |
| 2455 | + "The ships hung in the sky in much the same way that bricks don't.", |
| 2456 | + 'In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.', |
| 2457 | + 'I may not have gone where I intended to go, but I think I have ended up where I needed to be.', |
| 2458 | + 'He was a dreamer, a thinker, a speculative philosopher... or, as his wife would have it, an idiot.', |
| 2459 | + "Coding is simple. You just have to gaze at an empty IDE until your forehead develops a persistent twitch and your keyboard starts typing 'Hello World' by itself out of sheer pity.", |
| 2460 | + "Debugging follows the same principles as flying: The trick is to throw yourself at the keyboard, miss completely, and by some miraculous oversight of the universe's quality assurance process, end up with working code.", |
| 2461 | + "Space is big. Really big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's long way down the road to the chemist's, but that's just peanuts to space.", |
| 2462 | + "There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.\n\nThere is another theory which states that this has already happened.", |
| 2463 | + "You live and learn. At any rate, you live.", |
| 2464 | + "Anyone who is capable of getting themselves made President should on no account be allowed to do the job.", |
| 2465 | + "If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands."] |
| 2466 | + |
| 2467 | + return random.choice(quotes) |
| 2468 | + |
| 2469 | + |
2433 | 2470 | def bidseditor(bidsfolder: str, bidsmap: str='', template: str=bidsmap_template) -> None: |
2434 | 2471 | """ |
2435 | 2472 | Collects input and launches the bidseditor GUI |
|
0 commit comments